MAYAS.AK
Back to workHybrid CV

DocParse

End-to-end computer vision pipeline converting camera photos into structured, searchable PDFs.

DocParse preview

The problem

Mobile photos of paper documents suffer from perspective skew, uneven lighting, and noise. Standard OCR fails to extract clean text unless geometric correction, layout analysis, and reading order are solved first.

Approach

Built a 4-phase document reconstruction pipeline: (1) perspective rectification using multi-channel edge detection and CLAHE contrast enhancement, (2) layout analysis with a fine-tuned YOLOv10 on DocLayNet combined with recursive XY-cut for multi-column reading order, (3) adaptive Tesseract OCR with per-region PSM modes and morphological table extraction, and (4) vector PDF reconstruction with a searchable invisible text layer.

At a glance

4-Phase Pipeline
Architecture
Geometry → Layout → OCR → Synthesis
YOLOv10
Layout Detection
Fine-tuned on DocLayNet
9 Categories
Segmented Classes
Text, tables, figures, formulas, headers
Searchable, Editable PDF
Final Output
Embedded selectable text layer

Stack

PythonOpenCVYOLOv10Tesseract OCRPyMuPDFStreamlit