Vishal Tyagi
← Projects
Automation·shipped

OMR Sheet Automation

Built a staged, fault-tolerant Python OMR pipeline that processed over 90,000 physical examination forms.

Date2024-04
Reading TimeN/A
Statusshipped
StackPython, OpenCV, Optical Mark Recognition+1

90,000+

Forms processed

[Verified]

4 stages with resume-from-failure

Pipeline shape

[High Confidence]

What it does

High-volume paper exams produce thousands of optical-mark sheets. Manual grading does not scale; naive single-pass scanners fail on skew, dust, low contrast, smudges, and partial erasures.

This pipeline stages the work: normalize → align → extract bubble density → score with rules — and keeps intermediate artifacts so a bad file does not force a full 90k re-run.

Constraints

  • Distinguish real marks from faint erasures and print artifacts
  • Accept variable scan angle, DPI, and lighting
  • Process large batches without leaking memory
  • Leave an audit trail for ambiguous cells

Decisions & tradeoffs

  1. Four isolated stages with persisted intermediates
  2. Perspective / affine correction before density analysis
  3. Relative histogram density vs control margins (less sensitive to global lighting)
  4. Deterministic CV over ML — reproducible scores, no GPU dependency, smaller footprint
flowchart LR
  RawScan[Raw Physical Scans] --> Stage1[Normalization and Perspective Warp]
  Stage1 --> Stage2[Affine Anchor Alignment]
  Stage2 --> Stage3[Pixel Density Extraction]
  Stage3 --> Stage4[Rule-Based Evaluation and Audit Log]
  Stage3 -->|Ambiguous Mark| Flag[Audit Inspection Queue]

Tradeoffs: intermediate artifacts use disk and make edge-case tuning far cheaper. Deterministic math means no learned bubble detector — ambiguous cases go to a review queue instead.

What it demonstrates

  • Batch automation under real physical-document failure modes
  • Pipeline design that favors resume and auditability over a single monolithic script
  • Choosing boring, reproducible CV when stakes are institutional grading