Free OMR software, tested on 20 bubble sheets
97.1%
of answers OMRChecker got right from scans
OMRChecker needs its page crop on photos
| Reader | Scans | Phone photos |
|---|---|---|
| OMRChecker, corner marks only | 893 | 416 |
| OMRChecker, page crop first | not run | 846 |
| Our script (made for this sheet) | 920 | 920 |
With corner marks only, OMRChecker did not find all 4 marks on 10 of 20 photos, so it skipped them. Its phone setup crops the page first and read all 20.
Our own generator drew both the test marks and the 4 sheets that tuned our script. OMRChecker ran with its defaults. Read our 920 as a best case, not a win.
On blurrier, darker photos, OMRChecker with the page crop got 835 and our script 920.
Ticks and half fills get missed
| Mark | Read right |
|---|---|
| Filled, and the 6 ID digits | 686 of 686 |
| Erased, then changed | 47 of 47 |
| Two answers (both letters read) | 24 of 24 |
| Blank | 32 of 32 |
| Light | 49 of 51 |
| Half | 41 of 49 |
| X or tick | 14 of 31 |
Every miss on scans was a mark read as blank. On phone photos with the page crop, it read 16 of 32 blank questions as two or more marks.
Ask students to fill each bubble. A tick is not a fill.
A free bubble sheet reader in Python
It finds the 4 bullseye marks, flattens the page, and compares each bubble with the paper just around it, so a shadow darkens both alike.
pip install opencv-python-headless numpy
python omr.py layout.json sheet1.jpg sheet2.jpg > answers.csv
Print our blank sheet (A4, 40 questions, a 6-digit ID) with its layout.json. For your own sheet, add 4 bullseye corner marks and list each bubble centre.
Each CSV row is one sheet: the letter, an empty cell for no mark, or
two letters like AC for a double mark.
Show the code (100 lines)
"""Read bubble sheets with OpenCV. Free to use, no warranty. Brasspage, Nov 2026.
Usage: python omr.py layout.json sheet1.jpg [sheet2.jpg ...] > answers.csv
Needs: pip install opencv-python-headless numpy
The sheet needs 4 bullseye marks near its corners (rings around a dot).
layout.json gives the page size and the 4 mark centres (top-left, top-right, bottom-left, bottom-right) in
pixels of your blank sheet, the bubble radius, and the centre of every bubble:
{"page": [2480, 3508], "markers": [[160, 160], [2320, 160], [160, 3348], [2320, 3348]], "radius": 28,
"fields": {"q1": {"A": [380, 1440], "B": [470, 1440], "C": [560, 1440], "D": [650, 1440]}, ...}}
Each answer cell is the marked value, "" for no mark, or several values (like "AC") for a double mark.
"""
import csv
import json
import sys
import cv2
import numpy as np
# A bubble counts if it is this dark, or if it is the darkest in its field by this much.
MARK, GAP = 0.30, 0.09
def find_marks(gray):
"""Centres of the 4 bullseyes: shapes with 4 or more nested outlines (ring, ring, dot)."""
b = cv2.adaptiveThreshold(
cv2.GaussianBlur(gray, (5, 5), 0),
255,
cv2.ADAPTIVE_THRESH_MEAN_C,
cv2.THRESH_BINARY_INV,
51,
10,
)
cs, hier = cv2.findContours(b, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)
found = []
for i, c in enumerate(cs):
depth, k = 0, hier[0][i][2]
while k != -1:
depth, k = depth + 1, hier[0][k][2]
x, y, w, h = cv2.boundingRect(c)
if depth >= 4 and 0.6 < w / h < 1.6 and w < gray.shape[1] / 8: # not the page
found.append((x + w / 2, y + h / 2, w * h))
if len(found) < 4:
raise ValueError(f"found {len(found)} corner marks, need 4")
big = max(a for _, _, a in found)
p = np.array([(x, y) for x, y, a in found if a > 0.3 * big], np.float32)
s, d = p.sum(1), p[:, 1] - p[:, 0]
return np.float32(
[p[s.argmin()], p[d.argmin()], p[d.argmax()], p[s.argmax()]]
) # TL, TR, BL, BR
def fills(path, lay):
"""How dark each bubble is next to the paper just around it: 0 = clean paper, 1 = black."""
gray = cv2.imread(path, cv2.IMREAD_GRAYSCALE)
if gray is None:
raise ValueError("not an image I can read")
M = cv2.getPerspectiveTransform(find_marks(gray), np.float32(lay["markers"]))
page = cv2.warpPerspective(gray, M, tuple(lay["page"]), borderValue=255).astype(
np.float32
)
r = lay["radius"]
yy, xx = np.mgrid[-2 * r : 2 * r + 1, -2 * r : 2 * r + 1]
dist = np.hypot(xx, yy)
inner, ring = dist < 0.75 * r, (dist > r + 6) & (dist < r + 16)
out = {}
for field, opts in lay["fields"].items():
out[field] = {}
for value, (cx, cy) in opts.items():
cell = page[cy - 2 * r : cy + 2 * r + 1, cx - 2 * r : cx + 2 * r + 1]
paper = np.percentile(cell[ring], 75)
out[field][value] = float(max(0.0, 1 - cell[inner].mean() / max(paper, 1)))
return out
def answer(f, mark=MARK, gap=GAP):
vals = sorted(f, key=f.get, reverse=True)
rest = np.median(list(f.values()))
picked = [v for v in vals if f[v] >= mark]
if not picked and f[vals[0]] - rest >= gap:
picked = [vals[0]]
return "".join(sorted(picked))
def main():
with open(sys.argv[1]) as f:
lay = json.load(f)
w = csv.writer(sys.stdout)
w.writerow(["file"] + list(lay["fields"]))
for path in sys.argv[2:]:
try:
f = fills(path, lay)
w.writerow([path] + [answer(f[k]) for k in lay["fields"]])
except ValueError as e:
print(f"{path}: {e}", file=sys.stderr)
if __name__ == "__main__":
main()
OCR reads names, not bubbles
We ran our pdf-ocr Actor's code on the 20 scans. It read the typed name and class code right on 20 of 20 sheets.
Name: Riley Chen Class code: BIO-719
...
| 1 @@O® | On BORO |
The bubble rows came out as signs such as O, @ and ®, not answers. Use OMR for the marks and OCR for the printed words.
Other OMR tools, not tested
| Tool | What we found |
|---|---|
| FormScanner | Free (GPLv3) Java desktop app, last release 1.1.4 in 2017. Its SourceForge page now points to a new web version (AGPL-3.0). |
| Auto Multiple Choice | Free (GPLv2+), built for Linux. It makes its own sheets with LaTeX. |
| SDAPS | Free (GPLv3+), Linux packages. It expects forms it made itself. |
| ZipGrade | Phone app. Free for 100 papers a month, or $6.99 a year. |
| Remark Office OMR | Windows. $1,295 for one license. |
Sources
How we tested
- 20 made-up quiz sheets we drew with Pillow, A4 at 300 dpi: 40 questions with 4 choices and a 6-digit student ID. 920 answers in all. A typed name and class code on top.
- Marks by kind: 566 filled, 51 light, 49 half, 31 X or tick, 47 erased and changed, 24 double, 32 blank, plus 120 ID digits.
- Each sheet as a scan (turned up to 0.8 degrees, noise) and as a simulated phone photo (on a desk, tilted, uneven light, blur), 3024 by 4032. Not real photos. The hard set has the page smaller in the frame, more blur and deeper shadow.
- An answer is right when it matches exactly: the letter, blank for no mark, both letters for a double mark. A skipped sheet counts all 46 answers wrong.
- OMRChecker at commit 5cf44a5a (Sep 4, 2026), Python 3.12, with its default thresholds and its sample bullseye as corner marks. Our settings: processing size 666 by 942 (A4 shape) and marker ratio 17, as in its sample 1. Phone setup: CropPage, then CropOnMarkers, as in its sample 1.
- Our script: thresholds picked on 4 separate sheets, never on the 20 test sheets. Mac with Apple M5 Max, macOS 26.6.
- Our Actor's code at commit c18bf2b9 (Nov 17), run on this Mac with its default settings, on the 20 scans.
Printed forms and scans, no install
Run it yourself. Our Apify Actor turns scanned PDFs and images into Markdown. $0.006 a scanned page. It reads printed words, not bubbles.
Or send us the scan. Tack, our AI, does the job for $29, up to 50 pages. First page free.
Questions people ask
Is there free OMR software?
Yes. OMRChecker is free (MIT license) and runs in Python. You write a template with your bubble positions. It got 893 of 920 answers right from our 20 scans.
Can I grade bubble sheets from phone photos?
Yes. With its page crop step on, OMRChecker got 846 of 920 answers right from our simulated phone photos. Without it, it skipped 10 of 20 photos.
Why did the OMR software miss an answer?
On our scans, OMRChecker missed mostly ticks, X marks and half fills. It counted 14 of 31 ticks and X marks. Ask students to fill each bubble.
Can OCR read a bubble sheet?
Not ours. Our OCR Actor read the typed name on 20 of 20 sheets, but the bubbles came out as signs such as @ and ®. Use OMR software for the marks.
Does an erased answer count as a mark?
Not in our test. On scans, OMRChecker and our script read all 47 changed answers right and ignored the faint erased mark.