omrkit 2.1.0__tar.gz → 2.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. {omrkit-2.1.0 → omrkit-2.2.0}/PKG-INFO +58 -50
  2. omrkit-2.2.0/README.md +233 -0
  3. {omrkit-2.1.0 → omrkit-2.2.0}/pyproject.toml +2 -1
  4. {omrkit-2.1.0 → omrkit-2.2.0}/src/omrkit/__init__.py +1 -2
  5. omrkit-2.2.0/src/omrkit/_version.py +3 -0
  6. {omrkit-2.1.0 → omrkit-2.2.0}/src/omrkit/api/app.py +3 -2
  7. {omrkit-2.1.0 → omrkit-2.2.0}/src/omrkit/api/routes.py +150 -23
  8. omrkit-2.2.0/src/omrkit/api/static/assets/index-DPM1YTLN.js +249 -0
  9. omrkit-2.2.0/src/omrkit/api/static/assets/index-fkgIgDbH.css +1 -0
  10. {omrkit-2.1.0 → omrkit-2.2.0}/src/omrkit/api/static/index.html +4 -4
  11. {omrkit-2.1.0 → omrkit-2.2.0}/src/omrkit/cli/app.py +16 -7
  12. {omrkit-2.1.0 → omrkit-2.2.0}/src/omrkit/core/benchmark.py +3 -1
  13. {omrkit-2.1.0 → omrkit-2.2.0}/src/omrkit/core/migrator.py +44 -6
  14. {omrkit-2.1.0 → omrkit-2.2.0}/src/omrkit/core/scanner.py +46 -0
  15. {omrkit-2.1.0 → omrkit-2.2.0}/src/omrkit/core/validators.py +3 -3
  16. {omrkit-2.1.0 → omrkit-2.2.0}/src/omrkit/generator/pdf_sheet.py +29 -23
  17. {omrkit-2.1.0 → omrkit-2.2.0}/src/omrkit/generator/presets.py +74 -15
  18. {omrkit-2.1.0 → omrkit-2.2.0}/src/omrkit/grading/grader.py +16 -8
  19. {omrkit-2.1.0 → omrkit-2.2.0}/src/omrkit/io/exporters.py +68 -39
  20. {omrkit-2.1.0 → omrkit-2.2.0}/src/omrkit/io/loader.py +24 -0
  21. omrkit-2.2.0/src/omrkit/io/pdf_fonts.py +89 -0
  22. {omrkit-2.1.0 → omrkit-2.2.0}/src/omrkit/models/scan.py +16 -1
  23. {omrkit-2.1.0 → omrkit-2.2.0}/src/omrkit/models/template.py +22 -4
  24. {omrkit-2.1.0 → omrkit-2.2.0}/src/omrkit/vision/detector.py +115 -10
  25. {omrkit-2.1.0 → omrkit-2.2.0}/src/omrkit/vision/grid_finder.py +67 -8
  26. {omrkit-2.1.0 → omrkit-2.2.0}/src/omrkit/vision/registration.py +102 -31
  27. {omrkit-2.1.0 → omrkit-2.2.0}/src/omrkit/vision/visualizer.py +4 -1
  28. omrkit-2.1.0/README.md +0 -226
  29. omrkit-2.1.0/src/omrkit/api/static/assets/index-BFfdzDls.js +0 -224
  30. omrkit-2.1.0/src/omrkit/api/static/assets/index-DRPOjlrM.css +0 -1
  31. {omrkit-2.1.0 → omrkit-2.2.0}/.gitignore +0 -0
  32. {omrkit-2.1.0 → omrkit-2.2.0}/LICENSE +0 -0
  33. {omrkit-2.1.0 → omrkit-2.2.0}/src/omrkit/__main__.py +0 -0
  34. {omrkit-2.1.0 → omrkit-2.2.0}/src/omrkit/api/__init__.py +0 -0
  35. {omrkit-2.1.0 → omrkit-2.2.0}/src/omrkit/api/settings.py +0 -0
  36. {omrkit-2.1.0 → omrkit-2.2.0}/src/omrkit/cli/__init__.py +0 -0
  37. {omrkit-2.1.0 → omrkit-2.2.0}/src/omrkit/core/__init__.py +0 -0
  38. {omrkit-2.1.0 → omrkit-2.2.0}/src/omrkit/core/auto_scanner.py +0 -0
  39. {omrkit-2.1.0 → omrkit-2.2.0}/src/omrkit/generator/__init__.py +0 -0
  40. {omrkit-2.1.0 → omrkit-2.2.0}/src/omrkit/grading/__init__.py +0 -0
  41. {omrkit-2.1.0 → omrkit-2.2.0}/src/omrkit/grading/analytics.py +0 -0
  42. {omrkit-2.1.0 → omrkit-2.2.0}/src/omrkit/io/__init__.py +0 -0
  43. {omrkit-2.1.0 → omrkit-2.2.0}/src/omrkit/models/__init__.py +0 -0
  44. {omrkit-2.1.0 → omrkit-2.2.0}/src/omrkit/models/grading.py +0 -0
  45. {omrkit-2.1.0 → omrkit-2.2.0}/src/omrkit/py.typed +0 -0
  46. {omrkit-2.1.0 → omrkit-2.2.0}/src/omrkit/vision/__init__.py +0 -0
  47. {omrkit-2.1.0 → omrkit-2.2.0}/src/omrkit/vision/preprocess.py +0 -0
  48. {omrkit-2.1.0 → omrkit-2.2.0}/src/omrkit/vision/qr.py +0 -0
@@ -1,8 +1,9 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: omrkit
3
- Version: 2.1.0
3
+ Version: 2.2.0
4
4
  Summary: Modern Optical Mark Recognition engine with PDF/ArUco alignment, confidence-scored hybrid bubble detection, printable sheet generation, exam psychometrics, REST API, and Visual Web Studio.
5
5
  Project-URL: Homepage, https://github.com/duhanguler/omr
6
+ Project-URL: Live Demo, https://omrkit-studio.onrender.com/
6
7
  Project-URL: Repository, https://github.com/duhanguler/omr
7
8
  Project-URL: Documentation, https://github.com/duhanguler/omr#readme
8
9
  Project-URL: Changelog, https://github.com/duhanguler/omr/blob/main/CHANGELOG.md
@@ -58,38 +59,45 @@ Description-Content-Type: text/markdown
58
59
 
59
60
  <div align="center">
60
61
 
61
- # OMRKit v2.1
62
+ # OMRKit v2.2
62
63
 
63
- **Zero-calibration Optical Mark Recognition engine with QR auto-template detection, blank-form auto-grid finder, live browser camera scanner, printable ArUco sheet generator, Classical Test Theory psychometrics, FastAPI REST API, and React Web Studio.**
64
+ **Zero-calibration Optical Mark Recognition engine with 3-of-4 occluded ArUco recovery, erased-smudge resilience, photocopy drift micro-alignment, QR auto-template detection, blank-form auto-grid finder, live browser camera scanner, printable Unicode ArUco sheet generator, Classical Test Theory psychometrics, FastAPI REST API, and 6-language Web Studio.**
64
65
 
65
66
  [![CI](https://github.com/duhanguler/omr/actions/workflows/ci.yml/badge.svg)](https://github.com/duhanguler/omr/actions/workflows/ci.yml)
66
- [![Release](https://img.shields.io/github/v/release/duhanguler/omr?style=flat-square&color=1D4ED8)](https://github.com/duhanguler/omr/releases)
67
- [![License: MIT](https://img.shields.io/badge/License-MIT-0F8A5F.svg?style=flat-square)](LICENSE)
68
- [![Python 3.10+](https://img.shields.io/badge/Python-3.10%2B-14181F.svg?style=flat-square)](pyproject.toml)
67
+ [![PyPI](https://img.shields.io/pypi/v/omrkit?style=flat-square&color=0D7A52&logo=pypi&logoColor=white)](https://pypi.org/project/omrkit/)
68
+ [![Live Demo](https://img.shields.io/badge/Live_Demo-OMRKit_Studio-1849C6?style=flat-square&logo=render&logoColor=white)](https://omrkit-studio.onrender.com/)
69
+ [![Release](https://img.shields.io/github/v/release/duhanguler/omr?style=flat-square&color=111317)](https://github.com/duhanguler/omr/releases)
70
+ [![License: MIT](https://img.shields.io/badge/License-MIT-0D7A52.svg?style=flat-square)](LICENSE)
71
+ [![Python 3.10+](https://img.shields.io/badge/Python-3.10%2B-111317.svg?style=flat-square)](pyproject.toml)
69
72
  [![Docker GHCR](https://img.shields.io/badge/Docker-ghcr.io%2Fduhanguler%2Fomr-2496ED.svg?style=flat-square)](https://github.com/duhanguler/omr/pkgs/container/omr)
70
73
 
71
- [English](README.md) · [Türkçe](README.tr.md) · [Deployment & PyPI Guide](docs/DEPLOYMENT.md) · [Examples](examples/) · [Contributing](CONTRIBUTING.md)
74
+ [**Live Demo**](https://omrkit-studio.onrender.com/) · [**PyPI**](https://pypi.org/project/omrkit/) · [Deployment Guide](docs/DEPLOYMENT.md) · [Examples](examples/) · [Contributing](CONTRIBUTING.md)
75
+
76
+ **English** · [Türkçe](README.tr.md) · [简体中文](README.zh.md) · [Deutsch](README.de.md) · [Русский](README.ru.md) · [Español](README.es.md)
72
77
 
73
78
  </div>
74
79
 
80
+ > **Live Web Studio:** Open **[omrkit-studio.onrender.com](https://omrkit-studio.onrender.com/)** directly in your browser (supports **EN · TR · ZH · DE · RU · ES**) — click **Sample Cohort** in the top bar to scan & grade 5 optical sheets, triage flagged bubbles with keyboard shortcuts (`A–E`, `Backspace`, `↑↓`), test **Live Camera**, or generate printable ArUco + QR sheets. *(Hosted on Render's free tier; cold start takes ~20–30s.)*
81
+
75
82
  ---
76
83
 
77
84
  ## Why OMRKit?
78
85
 
79
- Traditional open-source OMR scripts force you to hand-edit pixel coordinates in brittle JSON files, break on rotated mobile photos, fail on checkmarks/crosses, and dump raw CSVs without confidence scores or grading analytics. **OMRKit v2.1** solves the entire lifecycle in one clean MIT-licensed toolkit:
86
+ Traditional open-source OMR scripts require manual pixel-editing in brittle JSON files, break on rotated photos, fail when a thumb covers a corner fiducial or an eraser leaves a faint smudge, and output unverified CSV dumps. **OMRKit v2.2** handles the full optical grading pipeline in one MIT-licensed toolkit:
80
87
 
81
- | Capability | Legacy OMR Scripts | **OMRKit v2.1** |
88
+ | Capability | Legacy OMR Scripts | **OMRKit v2.2** |
82
89
  | :--- | :---: | :---: |
83
- | **Printable PDF Sheet Generator + Auto Template** | Manual JSON pixels | **1-Click Vector PDF (ArUco + QR) + Exact `template.json`** |
90
+ | **Printable PDF Generator + Exact Template** | Manual JSON pixels | **1-Click Unicode Vector PDF (ArUco + QR) + Exact `template.json`** |
91
+ | **Occluded Corner & Photocopy Drift** | Fails if 1 corner hidden or shifted | **3-of-4 ArUco 12-Point Recovery + ±6px Block Micro-Alignment** |
92
+ | **Erased Pencil Smudges vs. Double Marks** | False multi-mark flags | **Darkness-Dominance Filter (Rejects Smudges, Catches Double Marks)** |
84
93
  | **Zero-Template QR Auto-Scanning** | Must pass template manually | **`omrkit scan sheet.jpg` auto-detects template from QR** |
85
- | **Auto-Detect Grids on Existing Blank Forms** | Measure pixels by hand | **`omrkit detect-layout blank.jpg` + Studio Canvas Wizard** |
86
- | **Live Webcam / Mobile Browser Scanner** | Static files only | **Real-time `getUserMedia` Viewfinder with Auto-Lock** |
87
- | **Multi-Page PDF & EXIF Auto-Orientation** | Single images only | **Native `pypdfium2` + EXIF Auto-Orient** |
88
- | **0° / 90° / 180° / 270° Auto-Rotation** | Breaks when sideways | **ArUco IDs + Template-Structure Disambiguation** |
89
- | **Checkmarks (✓), Crosses (✗) & Shadow Tolerance** | Global intensity only | **Illumination Normalization + Hybrid Ink Scorer** |
90
- | **Confidence Scores & Human-in-the-Loop (HITL)** | Silent errors in CSV | **Calibrated `0–1` Confidence + 1-Click Review Queue** |
91
- | **Exam Psychometrics & Scorecards** | Basic score sum | **CTT Difficulty ($p$), Discrimination ($D$), KR-20, Excel & PDF Cards** |
92
- | **Legacy `OMRChecker` Template Migration** | Manual rewrite | **`omrkit migrate-template old.json -o new.json`** |
94
+ | **Auto-Detect Grids on Blank Forms** | Measure pixels by hand | **Auto-Deskew (±12°) `omrkit detect-layout` + Interactive Canvas** |
95
+ | **Live Webcam / Mobile Browser Scanner** | Static files only | **Real-Time `getUserMedia` Viewfinder with Auto-Lock** |
96
+ | **Multi-Page PDF & EXIF Orientation** | Single images only | **Native `pypdfium2` + EXIF Auto-Orient** |
97
+ | **Checkmarks (✓), Crosses (✗) & Shadows** | Global intensity only | **Illumination Normalization + Hybrid Fill/Ring/Ink Classifier** |
98
+ | **Confidence & Keyboard HITL Review** | Silent errors in CSV | **Calibrated `0–1` Confidence + Zoomed Bubble Crops + `A–E` Triage** |
99
+ | **Exam Psychometrics & Scorecards** | Basic score sum | **CTT Difficulty ($p$), Discrimination ($D$), KR-20, Excel & Unicode PDF Cards** |
100
+ | **Legacy `OMRChecker` v1 Migration** | Manual rewrite | **`omrkit migrate-template old.json -o new.json`** |
93
101
 
94
102
  ---
95
103
 
@@ -100,12 +108,12 @@ Traditional open-source OMR scripts force you to hand-edit pixel coordinates in
100
108
  <td width="54%" align="center">
101
109
  <img src="https://raw.githubusercontent.com/duhanguler/omr/main/docs/assets/scan_overlay_demo.jpg" alt="OMRKit real-world phone scan verification overlay" />
102
110
  <br />
103
- <sub><b>Real mobile photo scan:</b> Emerald = confident (including ✓ & ✗ marks), Crimson = multi-marked, Amber = faint marks queued for 1-click HITL review.</sub>
111
+ <sub><b>Real mobile photo scan:</b> Emerald = confident (including ✓ & ✗ marks), Crimson = multi-marked, Amber = faint marks queued for zoomed HITL keyboard review.</sub>
104
112
  </td>
105
113
  <td width="46%" align="center">
106
114
  <img src="https://raw.githubusercontent.com/duhanguler/omr/main/docs/assets/generated_sheet_preview.jpg" alt="OMRKit generated ArUco + QR optical answer sheet" />
107
115
  <br />
108
- <sub><b>Zero-calibration generated PDF:</b> Vector A4/Letter layout with ArUco corners [0,1,2,3], embedded auto-detect QR badge, and exact companion <code>template.json</code>.</sub>
116
+ <sub><b>Zero-calibration generated PDF:</b> Vector A4/Letter layout with native Unicode typography, ArUco corners [0,1,2,3], QR badge, and companion <code>template.json</code>.</sub>
109
117
  </td>
110
118
  </tr>
111
119
  </table>
@@ -114,21 +122,19 @@ Traditional open-source OMR scripts force you to hand-edit pixel coordinates in
114
122
 
115
123
  ## Quickstart (60 Seconds)
116
124
 
117
- ### 1. Run Instantly (Docker / One-Click Cloud Demo / Python)
125
+ ### 1. Install from PyPI, Run via Docker, or Try Online
118
126
 
119
127
  ```bash
120
- # Option A: Prebuilt official Docker image (zero build!)
121
- docker run -p 8000:8000 ghcr.io/duhanguler/omr:latest
128
+ # Option A: Install from PyPI (recommended)
129
+ pip install omrkit # Core CV engine + PDF + ArUco/QR + Sheet Generator + CLI
130
+ pip install "omrkit[all]" # Full platform: adds 6-language Web Studio, FastAPI REST API & Excel
122
131
 
123
- # Option B: Install from source (or `pip install "omrkit[all]"` once PyPI publishing is enabled)
124
- git clone https://github.com/duhanguler/omr.git
125
- cd omr
126
- pip install -e ".[all]"
132
+ # Option B: Prebuilt official Docker image (zero build)
133
+ docker run -p 8000:8000 ghcr.io/duhanguler/omr:latest
127
134
  ```
128
135
 
129
- **One-Click Free Cloud Live Demo:**
130
- - **Render Blueprint:** [![Deploy to Render](https://img.shields.io/badge/Deploy_to-Render-14181F?style=flat-square&logo=render)](https://dashboard.render.com/blueprint/new?repo=https://github.com/duhanguler/omr)
131
- - **HuggingFace Spaces (Docker + Auto-Sync):** See [docs/DEPLOYMENT.md](docs/DEPLOYMENT.md) for the 2-minute free HTTPS setup (supports browser **Live Camera**!).
136
+ - **Live Public Demo:** [https://omrkit-studio.onrender.com/](https://omrkit-studio.onrender.com/) (OpenAPI docs at [`/docs`](https://omrkit-studio.onrender.com/docs))
137
+ - **Self-Host (1-Click Render Blueprint):** [![Deploy to Render](https://img.shields.io/badge/Deploy_to-Render-111317?style=flat-square&logo=render)](https://dashboard.render.com/blueprint/new?repo=https://github.com/duhanguler/omr) · See [docs/DEPLOYMENT.md](docs/DEPLOYMENT.md) for GHCR & cloud deployment details.
132
138
 
133
139
  ### 2. Generate a Print-Ready ArUco + QR Sheet
134
140
 
@@ -140,7 +146,7 @@ omrkit generate --preset standard_mcq_40 -o my_exam
140
146
  Built-in presets (`omrkit generate --list`):
141
147
  - `quick_quiz_20` — 20 questions (A–D), 6-digit Student ID
142
148
  - `standard_mcq_40` — 40 questions (A–E), 8-digit Student ID, Booklet (A–D)
143
- - `turkish_exam_50` — 50 questions (A–E), 6-digit Sınav Kodu, 11-digit **TC Kimlik No** (with checksum validation), Booklet
149
+ - `turkish_exam_50` — 50 questions (A–E), native Turkish Unicode headings, 6-digit Sınav Kodu, 11-digit **TC Kimlik No** (checksum validated), Booklet
144
150
  - `turkish_yks_120` — 120-question YKS / TYT layout (4 columns × 30 rows)
145
151
 
146
152
  ### 3. Scan Images or Multi-Page PDFs (Explicit or Zero-Template QR Auto-Scan)
@@ -157,14 +163,14 @@ omrkit scan examples/standard_mcq_40q/scans \
157
163
  --format csv,json,xlsx,scorecards \
158
164
  -o outputs/demo
159
165
 
160
- # Auto-detect bubble grids from ANY existing blank optical sheet:
166
+ # Auto-detect bubble grids from ANY blank form (with automatic ±12° deskew):
161
167
  omrkit detect-layout examples/turkish_exam_50q/blank_form.jpg -o auto_template.json
162
168
 
163
169
  # Migrate a legacy OMRChecker v1 template.json in one command:
164
170
  omrkit migrate-template old_template.json -o template_v2.json
165
171
  ```
166
172
 
167
- Try the real-world hand-marked Turkish 50-question mobile scans too:
173
+ Try the real-world hand-marked Turkish 50-question mobile scans:
168
174
 
169
175
  ```bash
170
176
  omrkit scan examples/turkish_exam_50q/scans \
@@ -208,23 +214,23 @@ print(f"KR-20 Reliability: {report.analytics.kr20_reliability}")
208
214
  ```mermaid
209
215
  flowchart LR
210
216
  A["Images / Multi-Page PDF"] --> B["EXIF Auto-Orient + PDFium Loader"]
211
- B --> C["5-Mode Registration: ArUco / Markers / PageQuad / ORB / Direct"]
212
- C --> D["Shadow & Illumination Normalization"]
213
- D --> E["Hybrid Bubble Detector (Fill + Ring Contrast + Ink Stroke)"]
217
+ B --> C["5-Mode Registration: ArUco (4pt / 3pt Recovery) / Markers / Quad / ORB / Direct"]
218
+ C --> D["Shadow Normalization + Block Micro-Alignment (±6px)"]
219
+ D --> E["Hybrid Bubble Detector (Fill + Ring + Ink + Smudge Filter)"]
214
220
  E --> F{"Confidence & Validator Check"}
215
221
  F -- "High Confidence" --> G["ExamGrader + CTT Psychometrics"]
216
- F -- "Low Conf / Multi-Mark / Bad Checksum" --> H["HITL Review Queue (Web Studio)"]
222
+ F -- "Low Conf / Multi-Mark / Bad Checksum" --> H["HITL Review Queue (Zoomed Crops + Keyboard Triage)"]
217
223
  H --> G
218
- G --> I["CSV / JSON / Multi-Sheet Excel / PDF Scorecards / Overlays"]
224
+ G --> I["CSV / JSON / Multi-Sheet Excel / Unicode PDF Scorecards / Overlays"]
219
225
  ```
220
226
 
221
227
  ### Key Technical Features
222
- - **5 Registration Engines:** `aruco` (instant 0/90/180/270° recovery), `markers` (multi-scale concentric markers with template-structure orientation recovery), `page_quad` (borderless page contour), `homography` (ORB + RANSAC), and `none` (flatbed).
223
- - **Shape-Aware Hybrid Bubble Classifier:** Evaluates inner circular fill ratio, 75th-percentile local ring contrast (immune to printed borders/numbers), and dark ink stroke density so pen checkmarks (`✓`) and crosses (`✗`) read accurately while smudges and multi-marks route to the HITL review queue.
228
+ - **Resilient 5-Mode Registration:** `aruco` with 0°/90°/180°/270° recovery **plus 3-of-4 occluded corner 12-point homography (`aruco_3pt`)**, `markers` (multi-scale concentric markers), `page_quad` (borderless contour with polar corner ordering), `homography` (ORB + RANSAC), and `none` (flatbed).
229
+ - **Photocopy Micro-Alignment & Smudge-Safe Detector:** Per-block Sobel rim correlation snaps misaligned photocopies (`±6px`) back onto exact bubble centers. Hybrid inner fill + 75th-percentile ring contrast + ink stroke scoring + darkness-dominance smudge rejection reads checkmarks (`✓`), crosses (`✗`), and light pencil marks cleanly while flagging true double marks.
224
230
  - **Built-in Field Validators:** Algorithmic **Turkish TC Kimlik No** (11-digit mod-10/11), **Luhn**, `digits`, and `non_empty` validators flag misread IDs automatically.
225
- - **Classical Test Theory (CTT) Psychometrics:** Mean, median, standard deviation, percentiles, per-item difficulty ($p$), upper/lower 27% discrimination index ($D$), option distractor distribution, and **KR-20** internal consistency reliability.
226
- - **Grading Policies:** Standard, Turkish **YKS/TYT & KPSS** (4 wrong = -1 correct), **LGS** (3 wrong = -1 correct), multi-booklet (`A/B/C/D`), bonus/cancelled questions, and weighted sections.
227
- - **Privacy Utility:** `omrkit strip-exif <dir> -o <clean_dir>` permanently bakes EXIF orientation into pixels and removes GPS/device metadata.
231
+ - **Classical Test Theory (CTT) Psychometrics:** Mean, median, standard deviation, percentiles, item difficulty ($p$), upper/lower 27% discrimination index ($D$), distractor distribution, and **KR-20** reliability.
232
+ - **Grading Policies & Native Unicode PDFs:** Standard, **YKS/TYT & KPSS** (4 wrong = -1 correct), **LGS** (3 wrong = -1 correct), multi-booklet (`A/B/C/D`), bonus/cancelled items, weighted sections, and automatic TrueType Unicode font discovery (`LiberationSans` / `DejaVuSans`) for generated sheets and student scorecards.
233
+ - **Privacy Utility:** `omrkit strip-exif <dir> -o <clean_dir>` bakes EXIF orientation into pixels and strips GPS/device metadata.
228
234
 
229
235
  ---
230
236
 
@@ -238,6 +244,8 @@ Run `omrkit benchmark --samples 5` on your own machine to reproduce:
238
244
  | Mobile Perspective + Uneven Shadow | **100.00%** | 99.2% | 0 | **~310 OMR/min** |
239
245
  | Rotated 90° / 180° / 270° + Perspective | **100.00%** | 99.2% | 0 | **~415 OMR/min** |
240
246
  | Pen Checkmarks (`✓`) + Shadow | **100.00%** | 99.1% | 0 | **~440 OMR/min** |
247
+ | **v2.2** Erased Smudge (`tone=170`) + Dark Fill (`tone=45`) | **100.00%** | 98.4% | 0 | **~490 OMR/min** |
248
+ | **v2.2** 1-of-4 Occluded ArUco + 90° Rotation + Skew | **100.00%** | 99.1% | 0 | **~360 OMR/min** |
241
249
 
242
250
  *(Multi-process batch mode via `--workers N` scales linearly across CPU cores.)*
243
251
 
@@ -245,19 +253,19 @@ Run `omrkit benchmark --samples 5` on your own machine to reproduce:
245
253
 
246
254
  ## Web Studio & REST API
247
255
 
248
- OMRKit Studio ships pre-bundled inside the Python package and launches via `omrkit studio` or `docker compose up` (includes a **Try Demo** button in the header for instant 1-click exploration):
256
+ OMRKit Studio ships pre-bundled inside the Python package in **6 languages (`EN · TR · ZH · DE · RU · ES`)** and launches via `omrkit studio` or `docker run`:
249
257
 
250
- 1. **Scan & Review (HITL):** Drag-and-drop JPG/PNG/PDF batches with explicit template or **QR Auto-Detect**, inspect zoomable color-coded verification overlays, resolve flagged bubbles with 1-click overrides, and export CSV/Excel.
251
- 2. **Live Camera:** Real-time browser webcam / smartphone camera viewfinder (`getUserMedia`) with **Auto-Lock** corner capture, audio confirmation, and QR template recognition.
252
- 3. **Template Designer:** Upload any blank optical form image or PDF, click **Auto-Detect Grids** to find circular bubble blocks automatically, import legacy `OMRChecker` templates (**Migrate v1**), or draw blocks directly on the HTML5 canvas.
253
- 4. **Sheet Generator:** Customize title, question count (5–120), option labels, booklet selector, and ID grids; preview live and download a ready-to-print ZIP bundle (`PDF + template.json + answer_key.json`).
254
- 5. **Grading & Analytics:** Inline answer-key editor, scoring policy selector, score histogram, student scoreboard with per-student **PDF Scorecards**, and full CTT item psychometrics.
258
+ 1. **Scan & Review (HITL):** Drop JPG/PNG/PDF batches with explicit template or **QR Auto-Detect**, inspect zoomed color-coded verification overlays with live bounding-box reticles, view magnified bubble-strip crops inside each flagged card, and resolve flags rapidly with keyboard shortcuts (`A–E`, `Backspace`, `↑↓`).
259
+ 2. **Live Camera:** Browser webcam / smartphone viewfinder (`getUserMedia`) with **Auto-Lock** corner capture, live resolution readout, audio confirmation, and QR recognition.
260
+ 3. **Template Designer:** Upload any blank optical form image or PDF, run **Auto-Detect Grids** (auto-deskewing up to ±12°), migrate legacy `OMRChecker` v1 JSONs, click-drag blocks directly on canvas, micro-nudge with arrow keys (`1px` / `Shift 10px`), and undo/redo cleanly (`Ctrl+Z` / `Ctrl+Shift+Z`).
261
+ 4. **Sheet Generator:** Configure title, questions (5–120), option labels, booklet selector, and ID grids; inspect live print-spec telemetry, print directly (**Print PDF**), or download the ZIP bundle (`PDF + template.json + answer_key.json`).
262
+ 5. **Grading & Analytics:** Multi-booklet inline answer-key editor, scoring policy selector, hover-interactive score histogram, sortable student scoreboard with Unicode **PDF Scorecards**, and filterable CTT psychometrics with inline option-distribution micro-bars.
255
263
 
256
264
  ### REST API Endpoints
257
265
  - `GET /api/health` · `GET /api/presets`
258
266
  - `POST /api/generate` · `POST /api/generate/bundle`
259
267
  - `POST /api/templates/validate` · `POST /api/templates/auto-detect` · `POST /api/templates/migrate` · `POST /api/preview-image`
260
- - `POST /api/scan` *(supports `template_json="auto"`)* · `POST /api/demo/cohort` · `POST /api/grade`
268
+ - `POST /api/scan` *(supports `template_json="auto"`, returns `overlays`, `review_crops`, `sheet_dimensions`)* · `POST /api/demo/cohort` · `POST /api/grade`
261
269
  - `POST /api/export/csv` · `POST /api/export/xlsx` · `POST /api/export/scorecard`
262
270
 
263
271
  ---
omrkit-2.2.0/README.md ADDED
@@ -0,0 +1,233 @@
1
+ <div align="center">
2
+
3
+ # OMRKit v2.2
4
+
5
+ **Zero-calibration Optical Mark Recognition engine with 3-of-4 occluded ArUco recovery, erased-smudge resilience, photocopy drift micro-alignment, QR auto-template detection, blank-form auto-grid finder, live browser camera scanner, printable Unicode ArUco sheet generator, Classical Test Theory psychometrics, FastAPI REST API, and 6-language Web Studio.**
6
+
7
+ [![CI](https://github.com/duhanguler/omr/actions/workflows/ci.yml/badge.svg)](https://github.com/duhanguler/omr/actions/workflows/ci.yml)
8
+ [![PyPI](https://img.shields.io/pypi/v/omrkit?style=flat-square&color=0D7A52&logo=pypi&logoColor=white)](https://pypi.org/project/omrkit/)
9
+ [![Live Demo](https://img.shields.io/badge/Live_Demo-OMRKit_Studio-1849C6?style=flat-square&logo=render&logoColor=white)](https://omrkit-studio.onrender.com/)
10
+ [![Release](https://img.shields.io/github/v/release/duhanguler/omr?style=flat-square&color=111317)](https://github.com/duhanguler/omr/releases)
11
+ [![License: MIT](https://img.shields.io/badge/License-MIT-0D7A52.svg?style=flat-square)](LICENSE)
12
+ [![Python 3.10+](https://img.shields.io/badge/Python-3.10%2B-111317.svg?style=flat-square)](pyproject.toml)
13
+ [![Docker GHCR](https://img.shields.io/badge/Docker-ghcr.io%2Fduhanguler%2Fomr-2496ED.svg?style=flat-square)](https://github.com/duhanguler/omr/pkgs/container/omr)
14
+
15
+ [**Live Demo**](https://omrkit-studio.onrender.com/) · [**PyPI**](https://pypi.org/project/omrkit/) · [Deployment Guide](docs/DEPLOYMENT.md) · [Examples](examples/) · [Contributing](CONTRIBUTING.md)
16
+
17
+ **English** · [Türkçe](README.tr.md) · [简体中文](README.zh.md) · [Deutsch](README.de.md) · [Русский](README.ru.md) · [Español](README.es.md)
18
+
19
+ </div>
20
+
21
+ > **Live Web Studio:** Open **[omrkit-studio.onrender.com](https://omrkit-studio.onrender.com/)** directly in your browser (supports **EN · TR · ZH · DE · RU · ES**) — click **Sample Cohort** in the top bar to scan & grade 5 optical sheets, triage flagged bubbles with keyboard shortcuts (`A–E`, `Backspace`, `↑↓`), test **Live Camera**, or generate printable ArUco + QR sheets. *(Hosted on Render's free tier; cold start takes ~20–30s.)*
22
+
23
+ ---
24
+
25
+ ## Why OMRKit?
26
+
27
+ Traditional open-source OMR scripts require manual pixel-editing in brittle JSON files, break on rotated photos, fail when a thumb covers a corner fiducial or an eraser leaves a faint smudge, and output unverified CSV dumps. **OMRKit v2.2** handles the full optical grading pipeline in one MIT-licensed toolkit:
28
+
29
+ | Capability | Legacy OMR Scripts | **OMRKit v2.2** |
30
+ | :--- | :---: | :---: |
31
+ | **Printable PDF Generator + Exact Template** | Manual JSON pixels | **1-Click Unicode Vector PDF (ArUco + QR) + Exact `template.json`** |
32
+ | **Occluded Corner & Photocopy Drift** | Fails if 1 corner hidden or shifted | **3-of-4 ArUco 12-Point Recovery + ±6px Block Micro-Alignment** |
33
+ | **Erased Pencil Smudges vs. Double Marks** | False multi-mark flags | **Darkness-Dominance Filter (Rejects Smudges, Catches Double Marks)** |
34
+ | **Zero-Template QR Auto-Scanning** | Must pass template manually | **`omrkit scan sheet.jpg` auto-detects template from QR** |
35
+ | **Auto-Detect Grids on Blank Forms** | Measure pixels by hand | **Auto-Deskew (±12°) `omrkit detect-layout` + Interactive Canvas** |
36
+ | **Live Webcam / Mobile Browser Scanner** | Static files only | **Real-Time `getUserMedia` Viewfinder with Auto-Lock** |
37
+ | **Multi-Page PDF & EXIF Orientation** | Single images only | **Native `pypdfium2` + EXIF Auto-Orient** |
38
+ | **Checkmarks (✓), Crosses (✗) & Shadows** | Global intensity only | **Illumination Normalization + Hybrid Fill/Ring/Ink Classifier** |
39
+ | **Confidence & Keyboard HITL Review** | Silent errors in CSV | **Calibrated `0–1` Confidence + Zoomed Bubble Crops + `A–E` Triage** |
40
+ | **Exam Psychometrics & Scorecards** | Basic score sum | **CTT Difficulty ($p$), Discrimination ($D$), KR-20, Excel & Unicode PDF Cards** |
41
+ | **Legacy `OMRChecker` v1 Migration** | Manual rewrite | **`omrkit migrate-template old.json -o new.json`** |
42
+
43
+ ---
44
+
45
+ ## Real-World Detection & Generated Sheets
46
+
47
+ <table>
48
+ <tr>
49
+ <td width="54%" align="center">
50
+ <img src="https://raw.githubusercontent.com/duhanguler/omr/main/docs/assets/scan_overlay_demo.jpg" alt="OMRKit real-world phone scan verification overlay" />
51
+ <br />
52
+ <sub><b>Real mobile photo scan:</b> Emerald = confident (including ✓ & ✗ marks), Crimson = multi-marked, Amber = faint marks queued for zoomed HITL keyboard review.</sub>
53
+ </td>
54
+ <td width="46%" align="center">
55
+ <img src="https://raw.githubusercontent.com/duhanguler/omr/main/docs/assets/generated_sheet_preview.jpg" alt="OMRKit generated ArUco + QR optical answer sheet" />
56
+ <br />
57
+ <sub><b>Zero-calibration generated PDF:</b> Vector A4/Letter layout with native Unicode typography, ArUco corners [0,1,2,3], QR badge, and companion <code>template.json</code>.</sub>
58
+ </td>
59
+ </tr>
60
+ </table>
61
+
62
+ ---
63
+
64
+ ## Quickstart (60 Seconds)
65
+
66
+ ### 1. Install from PyPI, Run via Docker, or Try Online
67
+
68
+ ```bash
69
+ # Option A: Install from PyPI (recommended)
70
+ pip install omrkit # Core CV engine + PDF + ArUco/QR + Sheet Generator + CLI
71
+ pip install "omrkit[all]" # Full platform: adds 6-language Web Studio, FastAPI REST API & Excel
72
+
73
+ # Option B: Prebuilt official Docker image (zero build)
74
+ docker run -p 8000:8000 ghcr.io/duhanguler/omr:latest
75
+ ```
76
+
77
+ - **Live Public Demo:** [https://omrkit-studio.onrender.com/](https://omrkit-studio.onrender.com/) (OpenAPI docs at [`/docs`](https://omrkit-studio.onrender.com/docs))
78
+ - **Self-Host (1-Click Render Blueprint):** [![Deploy to Render](https://img.shields.io/badge/Deploy_to-Render-111317?style=flat-square&logo=render)](https://dashboard.render.com/blueprint/new?repo=https://github.com/duhanguler/omr) · See [docs/DEPLOYMENT.md](docs/DEPLOYMENT.md) for GHCR & cloud deployment details.
79
+
80
+ ### 2. Generate a Print-Ready ArUco + QR Sheet
81
+
82
+ ```bash
83
+ omrkit generate --preset standard_mcq_40 -o my_exam
84
+ # Writes: standard_mcq_40_sheet.pdf, template.json, answer_key.json
85
+ ```
86
+
87
+ Built-in presets (`omrkit generate --list`):
88
+ - `quick_quiz_20` — 20 questions (A–D), 6-digit Student ID
89
+ - `standard_mcq_40` — 40 questions (A–E), 8-digit Student ID, Booklet (A–D)
90
+ - `turkish_exam_50` — 50 questions (A–E), native Turkish Unicode headings, 6-digit Sınav Kodu, 11-digit **TC Kimlik No** (checksum validated), Booklet
91
+ - `turkish_yks_120` — 120-question YKS / TYT layout (4 columns × 30 rows)
92
+
93
+ ### 3. Scan Images or Multi-Page PDFs (Explicit or Zero-Template QR Auto-Scan)
94
+
95
+ ```bash
96
+ # Zero-template QR auto-detection on generated sheets:
97
+ omrkit scan examples/standard_mcq_40q/scans -o outputs/auto_demo
98
+
99
+ # Explicit template + YKS/TYT negative marking + Excel & PDF scorecards:
100
+ omrkit scan examples/standard_mcq_40q/scans \
101
+ -t examples/standard_mcq_40q/template.json \
102
+ -k examples/standard_mcq_40q/answer_key.json \
103
+ --policy yks_tyt \
104
+ --format csv,json,xlsx,scorecards \
105
+ -o outputs/demo
106
+
107
+ # Auto-detect bubble grids from ANY blank form (with automatic ±12° deskew):
108
+ omrkit detect-layout examples/turkish_exam_50q/blank_form.jpg -o auto_template.json
109
+
110
+ # Migrate a legacy OMRChecker v1 template.json in one command:
111
+ omrkit migrate-template old_template.json -o template_v2.json
112
+ ```
113
+
114
+ Try the real-world hand-marked Turkish 50-question mobile scans:
115
+
116
+ ```bash
117
+ omrkit scan examples/turkish_exam_50q/scans \
118
+ -t examples/turkish_exam_50q/template.json \
119
+ -o outputs/turkish_demo
120
+ ```
121
+
122
+ ### 4. Launch Visual Web Studio & REST API
123
+
124
+ ```bash
125
+ omrkit studio
126
+ # Web Studio: http://127.0.0.1:8000
127
+ # OpenAPI Docs: http://127.0.0.1:8000/docs
128
+ ```
129
+
130
+ ---
131
+
132
+ ## Python SDK
133
+
134
+ Integrate optical scanning, grading, and psychometrics in 10 lines of typed Python:
135
+
136
+ ```python
137
+ from omrkit import AnswerKey, ExamGrader, GradingPolicy, OMRScanner, Template
138
+
139
+ template = Template.from_file("examples/standard_mcq_40q/template.json")
140
+ scanner = OMRScanner(template)
141
+
142
+ batch = scanner.scan_batch("examples/standard_mcq_40q/scans", workers=4)
143
+
144
+ key = AnswerKey.from_file("examples/standard_mcq_40q/answer_key.json")
145
+ report = ExamGrader(key, GradingPolicy.preset("yks_tyt")).grade_batch(batch.sheets)
146
+
147
+ print(f"Graded {report.analytics.student_count} sheets | Mean: {report.analytics.mean_score}")
148
+ print(f"KR-20 Reliability: {report.analytics.kr20_reliability}")
149
+ ```
150
+
151
+ ---
152
+
153
+ ## Architecture
154
+
155
+ ```mermaid
156
+ flowchart LR
157
+ A["Images / Multi-Page PDF"] --> B["EXIF Auto-Orient + PDFium Loader"]
158
+ B --> C["5-Mode Registration: ArUco (4pt / 3pt Recovery) / Markers / Quad / ORB / Direct"]
159
+ C --> D["Shadow Normalization + Block Micro-Alignment (±6px)"]
160
+ D --> E["Hybrid Bubble Detector (Fill + Ring + Ink + Smudge Filter)"]
161
+ E --> F{"Confidence & Validator Check"}
162
+ F -- "High Confidence" --> G["ExamGrader + CTT Psychometrics"]
163
+ F -- "Low Conf / Multi-Mark / Bad Checksum" --> H["HITL Review Queue (Zoomed Crops + Keyboard Triage)"]
164
+ H --> G
165
+ G --> I["CSV / JSON / Multi-Sheet Excel / Unicode PDF Scorecards / Overlays"]
166
+ ```
167
+
168
+ ### Key Technical Features
169
+ - **Resilient 5-Mode Registration:** `aruco` with 0°/90°/180°/270° recovery **plus 3-of-4 occluded corner 12-point homography (`aruco_3pt`)**, `markers` (multi-scale concentric markers), `page_quad` (borderless contour with polar corner ordering), `homography` (ORB + RANSAC), and `none` (flatbed).
170
+ - **Photocopy Micro-Alignment & Smudge-Safe Detector:** Per-block Sobel rim correlation snaps misaligned photocopies (`±6px`) back onto exact bubble centers. Hybrid inner fill + 75th-percentile ring contrast + ink stroke scoring + darkness-dominance smudge rejection reads checkmarks (`✓`), crosses (`✗`), and light pencil marks cleanly while flagging true double marks.
171
+ - **Built-in Field Validators:** Algorithmic **Turkish TC Kimlik No** (11-digit mod-10/11), **Luhn**, `digits`, and `non_empty` validators flag misread IDs automatically.
172
+ - **Classical Test Theory (CTT) Psychometrics:** Mean, median, standard deviation, percentiles, item difficulty ($p$), upper/lower 27% discrimination index ($D$), distractor distribution, and **KR-20** reliability.
173
+ - **Grading Policies & Native Unicode PDFs:** Standard, **YKS/TYT & KPSS** (4 wrong = -1 correct), **LGS** (3 wrong = -1 correct), multi-booklet (`A/B/C/D`), bonus/cancelled items, weighted sections, and automatic TrueType Unicode font discovery (`LiberationSans` / `DejaVuSans`) for generated sheets and student scorecards.
174
+ - **Privacy Utility:** `omrkit strip-exif <dir> -o <clean_dir>` bakes EXIF orientation into pixels and strips GPS/device metadata.
175
+
176
+ ---
177
+
178
+ ## Reproducible Benchmarks
179
+
180
+ Run `omrkit benchmark --samples 5` on your own machine to reproduce:
181
+
182
+ | Scenario (`standard_mcq_40`, 245 fields/scenario) | Accuracy | Avg Confidence | False HITL Flags | Single-Thread Throughput |
183
+ | :--- | :---: | :---: | :---: | :---: |
184
+ | Clean Flatbed Scan (Solid Fill) | **100.00%** | 99.2% | 0 | **~530 OMR/min** |
185
+ | Mobile Perspective + Uneven Shadow | **100.00%** | 99.2% | 0 | **~310 OMR/min** |
186
+ | Rotated 90° / 180° / 270° + Perspective | **100.00%** | 99.2% | 0 | **~415 OMR/min** |
187
+ | Pen Checkmarks (`✓`) + Shadow | **100.00%** | 99.1% | 0 | **~440 OMR/min** |
188
+ | **v2.2** Erased Smudge (`tone=170`) + Dark Fill (`tone=45`) | **100.00%** | 98.4% | 0 | **~490 OMR/min** |
189
+ | **v2.2** 1-of-4 Occluded ArUco + 90° Rotation + Skew | **100.00%** | 99.1% | 0 | **~360 OMR/min** |
190
+
191
+ *(Multi-process batch mode via `--workers N` scales linearly across CPU cores.)*
192
+
193
+ ---
194
+
195
+ ## Web Studio & REST API
196
+
197
+ OMRKit Studio ships pre-bundled inside the Python package in **6 languages (`EN · TR · ZH · DE · RU · ES`)** and launches via `omrkit studio` or `docker run`:
198
+
199
+ 1. **Scan & Review (HITL):** Drop JPG/PNG/PDF batches with explicit template or **QR Auto-Detect**, inspect zoomed color-coded verification overlays with live bounding-box reticles, view magnified bubble-strip crops inside each flagged card, and resolve flags rapidly with keyboard shortcuts (`A–E`, `Backspace`, `↑↓`).
200
+ 2. **Live Camera:** Browser webcam / smartphone viewfinder (`getUserMedia`) with **Auto-Lock** corner capture, live resolution readout, audio confirmation, and QR recognition.
201
+ 3. **Template Designer:** Upload any blank optical form image or PDF, run **Auto-Detect Grids** (auto-deskewing up to ±12°), migrate legacy `OMRChecker` v1 JSONs, click-drag blocks directly on canvas, micro-nudge with arrow keys (`1px` / `Shift 10px`), and undo/redo cleanly (`Ctrl+Z` / `Ctrl+Shift+Z`).
202
+ 4. **Sheet Generator:** Configure title, questions (5–120), option labels, booklet selector, and ID grids; inspect live print-spec telemetry, print directly (**Print PDF**), or download the ZIP bundle (`PDF + template.json + answer_key.json`).
203
+ 5. **Grading & Analytics:** Multi-booklet inline answer-key editor, scoring policy selector, hover-interactive score histogram, sortable student scoreboard with Unicode **PDF Scorecards**, and filterable CTT psychometrics with inline option-distribution micro-bars.
204
+
205
+ ### REST API Endpoints
206
+ - `GET /api/health` · `GET /api/presets`
207
+ - `POST /api/generate` · `POST /api/generate/bundle`
208
+ - `POST /api/templates/validate` · `POST /api/templates/auto-detect` · `POST /api/templates/migrate` · `POST /api/preview-image`
209
+ - `POST /api/scan` *(supports `template_json="auto"`, returns `overlays`, `review_crops`, `sheet_dimensions`)* · `POST /api/demo/cohort` · `POST /api/grade`
210
+ - `POST /api/export/csv` · `POST /api/export/xlsx` · `POST /api/export/scorecard`
211
+
212
+ ---
213
+
214
+ ## Development
215
+
216
+ ```bash
217
+ uv venv .venv
218
+ uv pip install --python .venv/bin/python -e ".[all,dev]"
219
+
220
+ # Python QA
221
+ .venv/bin/ruff check src tests
222
+ .venv/bin/mypy src/omrkit
223
+ .venv/bin/pytest -v --cov=omrkit
224
+
225
+ # Frontend Studio development
226
+ cd studio && npm ci && npm run dev
227
+ ```
228
+
229
+ ---
230
+
231
+ ## License
232
+
233
+ Released under the [MIT License](LICENSE). Copyright © 2026 Duhan Güler & Contributors.
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "omrkit"
7
- version = "2.1.0"
7
+ version = "2.2.0"
8
8
  description = "Modern Optical Mark Recognition engine with PDF/ArUco alignment, confidence-scored hybrid bubble detection, printable sheet generation, exam psychometrics, REST API, and Visual Web Studio."
9
9
  readme = "README.md"
10
10
  license = { text = "MIT" }
@@ -76,6 +76,7 @@ dev = [
76
76
 
77
77
  [project.urls]
78
78
  Homepage = "https://github.com/duhanguler/omr"
79
+ "Live Demo" = "https://omrkit-studio.onrender.com/"
79
80
  Repository = "https://github.com/duhanguler/omr"
80
81
  Documentation = "https://github.com/duhanguler/omr#readme"
81
82
  Changelog = "https://github.com/duhanguler/omr/blob/main/CHANGELOG.md"
@@ -1,5 +1,6 @@
1
1
  """OMRKit — Modern Optical Mark Recognition SDK, Sheet Generator & Exam Psychometrics."""
2
2
 
3
+ from omrkit._version import __version__
3
4
  from omrkit.core.auto_scanner import (
4
5
  resolve_template_for_image,
5
6
  scan_file_auto,
@@ -32,8 +33,6 @@ from omrkit.models import (
32
33
  from omrkit.vision.grid_finder import detect_layout_from_blank
33
34
  from omrkit.vision.qr import detect_sheet_qr
34
35
 
35
- __version__ = "2.1.0"
36
-
37
36
  __all__ = [
38
37
  "AnswerKey",
39
38
  "BatchResult",
@@ -0,0 +1,3 @@
1
+ """Single source of truth for the OMRKit package version."""
2
+
3
+ __version__ = "2.2.0"
@@ -10,6 +10,7 @@ from fastapi.middleware.cors import CORSMiddleware
10
10
  from fastapi.responses import FileResponse, HTMLResponse
11
11
  from fastapi.staticfiles import StaticFiles
12
12
 
13
+ from omrkit._version import __version__
13
14
  from omrkit.api.routes import router
14
15
 
15
16
  STATIC_DIR = Path(__file__).parent / "static"
@@ -24,7 +25,7 @@ def create_app() -> FastAPI:
24
25
  "confidence-scored bubble detection, printable PDF sheet generation, "
25
26
  "and Classical Test Theory exam psychometrics."
26
27
  ),
27
- version="2.1.0",
28
+ version=__version__,
28
29
  docs_url="/docs",
29
30
  redoc_url="/redoc",
30
31
  )
@@ -66,7 +67,7 @@ def create_app() -> FastAPI:
66
67
  return FileResponse(index_html)
67
68
  return HTMLResponse(
68
69
  "<html><body style='font-family:sans-serif;padding:2rem;'>"
69
- "<h1>OMRKit v2.1 API is running</h1>"
70
+ f"<h1>OMRKit v{__version__} API is running</h1>"
70
71
  "<p>Interactive API docs: <a href='/docs'>/docs</a></p>"
71
72
  "<p>Build the Web Studio frontend via <code>cd studio && npm run build</code>.</p>"
72
73
  "</body></html>"