Otocropper — Offline Question Cropper for Scanned Question Banks
An offline Mac app that turns scanned Turkish question-bank PDFs into one image per question, named by the printed question number and filed by unit and test. Built for teachers at Erkan Ulu Okulları in Istanbul. A 414-page book (1,831 questions) goes from import to ready-to-review crops in 6 min 22 s on an M5 Max.
- Client Erkan Ulu Schools
- Sector K‑12 education
- Platform macOS, offline
- Owner Savas Tutumlu
- Status Deployed · v1.0.4
Inside Otocropper
From scanned page to filed questions, the review app and the held-out test. Publisher pages are blurred. Select any image to open it at full size.
The Problem
Question banks arrive as scanned books. Teachers needed every question as its own image, filed the way the book is printed, without leaving their Mac.
Crowded pages
A scanned page mixes several questions with passages, figures, instructions, section headers, headers and footers, and answer keys.
Filed like the book
Each question has to come out as its own image, named by its printed number and filed by unit and test.
No setup for teachers
Teachers need no Terminal, Python or internet connection: everything runs offline inside one app.
What Was Built
A trained detector and a native Mac app, from data labeling to a notarized release.
Page-region detector
An RT-DETRv2 object detector fine-tuned on 7 page-region classes (question, passage, figure, instruction, section header, header/footer, answer key), using pages from a five-book labeled corpus.
Labeling pipeline
Draft labels went through a verifier pass and a FastAPI box editor, which fed reviewed labels into COCO train, validation and test splits.
Four-pass inference
Two checkpoints and three input scales, fused with weighted box fusion. Thresholds were calibrated on the validation split.
Rules from error analysis
Three post-processing rules (ink gate, right-edge trim, class competition) came from reviewing every remaining error by eye, and each was measured on validation before test.
Names from OCR
Tesseract reads question numbers and test and unit headers, so exports mirror the printed book: 1.jpg, 4-G.jpg for full-width questions, 7_with_passage.jpg for shared passages.
Native Mac app
A SwiftUI app bundling Python 3.13, PyTorch on the Apple GPU (MPS), Tesseract and both checkpoints, signed with Developer ID and notarized.
The held-out book was never used in training. Thresholds and rules were chosen on the validation split, then frozen for the test book.
Engineering Highlights
Measured on validation, tested on a book the model never saw, shipped to teachers' Macs.
- Strict scoring — a predicted question box counts as correct only at IoU ≥ 0.9 with the reference label.
- Multi-scale fusion — fusing three input scales of one checkpoint raised fully correct held-out pages from 90.3% to 92.0%; the shipped detector adds a second checkpoint as a fourth pass.
- Error-analysis rules — the ink gate removed 12 false positives and class competition 5 more, at no cost in true positives on the test book; right-edge trim added 4 true positives.
- Licence-aware model choice — RT-DETRv2 rather than YOLO: the app ships no Ultralytics or DocLayout-YOLO code, to avoid AGPL licensing.
- On-device inference — PyTorch on the Apple GPU (MPS), fully offline.
- Release discipline — checked against 20 PDFs from the school (4,813 pages) before release 1.0.2; five versions shipped between 8 and 14 September 2026, the last two in response to teacher reports.
Pipeline
TRAINING (CUDA workstation)
+------------------------------+
| five-book labeled corpus |
| draft labels -> verifier |
| FastAPI box editor |
| COCO train / val / test |
| fine-tune RT-DETRv2 |
| calibrate on validation |
+--------------+---------------+
|
| weights (2 checkpoints)
v
ON THE MAC (offline)
+------------------------------+
| render PDF pages |
| detect: 4 passes, fused |
| clean up: 3 rules |
| Tesseract OCR (Turkish) |
| review in SwiftUI app |
| export: unit / test / 1.jpg |
+------------------------------+
Technology stack
Status
- August 2026 Corpus, labeling and model training.
- 8 September 2026 Version 1.0.0 released to the school.
- 9–14 September 2026 Versions 1.0.1 to 1.0.4; 1.0.3 and 1.0.4 followed teacher reports.
- 24 September 2026 A practice-exam edition, 1.0.0.
- Today Deployed and in use by teachers at Erkan Ulu Okulları (school app 1.0.4; practice-exam edition 1.0.0).
Role: Savas Tutumlu was the sole developer: data labeling, model training and evaluation, the macOS app, packaging and release.
For other schools: Otocropper is offered by Okul Yazılım Evi, Stratagem Systems' school software line, at okulyazilimevi.com (in Turkish).
Related Services and Reading
The services behind an on-device computer vision tool, and articles from the same work.
Machine Learning Services
Custom detectors trained, calibrated and tested on data the model never saw.
ServiceE-Learning Software Development
Tools that fit how teachers already prepare lessons and homework.
ServiceCustom Software Development
Native desktop apps, packaged, signed and released to the people who use them.
Further reading
How AI answer-sheet grading works
Vision models reading exam sheets for the same school, step by step.
ArticleOMR software vs AI grading
When a classic bubble-sheet scanner is enough, and when a vision model pays off.
ArticleWhat fine-tuning costs in 2026
GPU prices and the arithmetic behind training a model on your own data.