๐Ÿ“„ Document Analysis Pipeline

Upload a PDF document to extract structured data including questions, options, answers, passages, and embedded images.

Pipeline Steps:

  1. ๐Ÿ” YOLO/OCR Preprocessing (word extraction + figure/equation detection)
  2. ๐Ÿค– LayoutLMv3 Inference (BIO tagging)
  3. ๐Ÿ“Š Structured JSON Decoding
  4. ๐Ÿ–ผ๏ธ Base64 Image Embedding

โ„น๏ธ Notes:

  • Processing may take several minutes depending on PDF size
  • Figures and equations will be extracted and embedded as Base64
  • The output JSON includes structured questions, options, and answers

๐Ÿ“‹ Output Format

The pipeline generates JSON with the following structure:

  • Questions: Extracted question text
  • Options: Multiple choice options (A, B, C, D, etc.)
  • Answers: Correct answer(s)
  • Passages: Associated reading passages
  • Images: Base64-encoded figures and equations (embedded with keys like figure1, equation2)