OMR Grading API
A production-ready API service that uses computer vision techniques to detect, analyze, and grade bubble-sheet (OMR) examinations. The system handles image preprocessing, bubble detection, answer extraction, and scoring with high accuracy.
Problem Statement
Manual grading of bubble-sheet exams is time-consuming, error-prone, and doesn't scale. Existing OMR solutions are often expensive proprietary systems requiring specialized hardware.
Solution
Built a software-only OMR solution using OpenCV that processes standard camera/scanner images. The FastAPI service provides a scalable REST endpoint that accepts exam images and returns graded results with per-question analytics.
Key Features
- ▸Perspective correction for skewed/rotated sheets
- ▸Robust bubble detection using contour analysis
- ▸Multi-answer and no-answer detection
- ▸RESTful API with batch processing support
- ▸Per-question analytics and score breakdown
- ▸Docker containerized for easy deployment
Challenges
- ⚡Handling varied image quality and lighting conditions
- ⚡Robust perspective transformation for skewed documents
- ⚡Distinguishing between partially filled and fully filled bubbles
- ⚡Achieving real-time processing speed for batch grading
Results & Metrics
98%+ grading accuracy on properly scanned sheets
Processes 50+ sheets per minute in batch mode
Deployed as Docker container with automated CI/CD
Reduces grading time by 95% compared to manual grading
Lessons Learned
- 💡Image preprocessing is the most critical factor in CV pipeline accuracy
- 💡Adaptive thresholding outperforms fixed thresholds for varied conditions
- 💡FastAPI's async capabilities are ideal for I/O-heavy image processing APIs
Case Study Overview
Case Study: OMR Grading API
High-performance computer vision implementation for automated grading, packaged as a FastAPI backend.
Related Projects
Garbage Classification
Deep learning model for automated waste classification into recyclable categories using CNN architectures, achieving high accuracy on diverse waste images.