Overview
Instead of forcing image questions through one method, the platform selects among OCR, multimodal vision, and hybrid processing and presents results in a comparable evaluation flow.
Problem and goal
Text-heavy, formula-based, and visually contextual questions need different preprocessing. One pipeline does not behave equally well for every question type.
My role
- Unified OCR, vision, and hybrid routes behind one service contract.
- Developed image preprocessing and adaptive selection logic.
- Split pipeline behavior into testable units with Pytest.
Solution
- Input quality and question structure informed pipeline selection.
- OpenCV/Tesseract handled extraction while a multimodal LLM supported visually contextual questions.
- A Streamlit interface made method results easier to review.
Architecture
The system’s main components and data/decision flow are separated as follows.
Tech stack
Image preparation and OCR
Visually contextual question processing
Service and review interface
Pipeline behavior checks
Implementation decisions
- Use a shared result contract for OCR, Vision, and Hybrid outputs.
- Base adaptive routing on OCR signals and visual question properties.
Results and evaluation
- Compared OCR, Vision, Hybrid, and Adaptive pipelines in one evaluation framework.
- The repository reports 140 passing Pytest tests; Adaptive scored 31/34 on the expanded synthetic set and 11/12 on the realistic synthetic set, while Hybrid scored 10/12.
Challenges and solutions
- Variable image quality → preprocessing plus alternative pipelines.
- Different output shapes → a shared response and evaluation contract.
What I learned
The work showed the importance of input analysis before model calls and of testable pipeline boundaries in adaptive AI applications.