Mathi.
← All work

Own project

ScoreCheck

Scores TNPSC and TCS iON response sheets against an answer key whose questions are in a different order — with classical maths first and an LLM last.

FastAPITesseractOpenCVscikit-learnSciPyDocker

The problem

Candidates get a response sheet and a separately published answer key, but the question order is shuffled between them. Matching by number is useless; matching by hand takes hours.

My role

Solo build: OCR pipeline, matching algorithm, tick detection, API, tests and documentation.

How it works

  1. 01ReadResponse sheet from its text layer; answer key scans via Tesseract OCR
  2. 02MatchCharacter 3–5-gram TF-IDF similarity between every pair of questions
  3. 03AssignHungarian algorithm: optimal one-to-one matching; weak or close matches flagged
  4. 04Detect ticksStroke size, coloured ink and excess dark ink around each option label
  5. 05ReviewAnything uncertain is shown side by side for a person to confirm

Screens

Review screen showing an unclear tick: answer key crop beside the matched response question, match score 0.89, and other likely matches
Review before results: an unclear tick, shown beside its matched question (synthetic sample).
Results page: 15.0 marks out of 18, 10 correct, 1 wrong, 1 unanswered, with a table of every question
Results: score, counts and every question’s match (synthetic sample).

Key decisions

Treat matching as an assignment problem

Greedy “best match per question” lets two questions claim the same answer. The Hungarian algorithm maximizes total similarity under a strict one-to-one constraint. A pair is flagged when its score is below 0.35, its lead over the runner-up is under 0.08, or the row’s best match disagrees with the assignment.

Ink signals before AI

A ticked label often OCRs as junk or vanishes, so ticks are found from three image signals, not text. One clear winner is accepted; otherwise the question is marked uncertain. An LLM fallback exists but is off by default, and anything it decides is flagged.

Built to be safe in public

PDFs are validated before processing, uploads are rate-limited, and each candidate’s data is deleted automatically after 2 hours.

Outcome