Datasets:
File size: 6,547 Bytes
a3671c1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 | ---
license: other
license_name: mixed-annotations-cc-by-4.0
license_link: LICENSE
pretty_name: Broken QR Codes (104) — a hard real-world QR benchmark
task_categories:
- image-to-text
- object-detection
tags:
- qr-code
- barcode
- benchmark
- document-understanding
- computer-vision
- robustness
size_categories:
- n<1K
configs:
- config_name: default
data_files:
- split: test
path: data/**
---
# Broken QR Codes (104)
**104 real QR code images that ordinary decoders fail on**, with byte-level ground
truth where it could be established, geometric annotations, and per-image results
for eight reference decoders.
This is a **test set, not a training set**. It exists to make QR decoder claims
falsifiable: every image here was collected *because* something failed on it, so
the distribution is deliberately adversarial rather than representative.
## Why this is hard
**59 of the 104 images are read by none of the eight reference decoders** —
not Apple Vision, not Apple CIDetector, not WeChat's CNN or classical detector,
not any of the three ML Kit configurations, not `marian_mark_decoder`. The best
single decoder in the set reads 38.
The failure modes are the interesting part: artistic QR codes where the module
grid is deliberately obscured by generated imagery, physical damage, extreme
perspective, low contrast, motion blur, partial occlusion, screen glare, and
resolutions from 0.05 to 16 megapixels.
## What's in each row
| field | notes |
|---|---|
| `image` | the picture itself |
| `file_name`, `image_id`, `width`, `height` | |
| `has_payload`, `payload`, `payload_bytes_hex` | **56 of 104** have an established payload |
| `payload_source` | how the payload was established, where recorded |
| `qr_version` | QR version 1–9, on **30** images |
| `quad` | the symbol's four corners in pixels, on **33** images |
| `finder_centers` | the three finder-pattern centres, on **30** images |
| `u_px_per_module` | pixels per module, on **30** images |
| `quad_source` | which decoder or process established the geometry |
| `precision_note` | stated tolerance where the geometry is approximate |
| `solved_by_*` | eight booleans, one per reference decoder |
| `n_decoders_solving` | 0–8 |
### The 56 / 104 split matters for scoring
Only **56 images have an established payload, so 56 is the real ceiling** — a
decoder cannot be credited for reading an image nobody can check. Reporting
"X/104" without saying that 48 images are uncheckable overstates every score,
including ours. Score against 56, or state the denominator you used.
`payload` and `payload_bytes_hex` are not equally populated: 56 rows carry a
payload string and 32 carry the raw bytes. Where both exist they agree; where
only the string exists, binary payloads may not round-trip through UTF-8, so
**compare bytes when you have them**.
## Reference decoder results
Measured on one machine (Apple M2, MacBook Air 13" 2022, 8 GB, macOS 14.3.1),
decode call only, image already resident in memory.
| decoder | solves / 104 | false | p50 µs |
|---|---:|---:|---:|
| `marian_mark_decoder` (default, 1T) | **38** | 0 | 8,982 |
| Apple Vision | 21 | 0 | 11,195 |
| Apple CIDetector | 18 | 0 | 7,168 |
| WeChat (CNN) | 14 | 0 | — |
| WeChat (classical) | 13 | 0 | — |
| ML Kit iOS | 6 | 0 | — |
| ML Kit Android (bundled) | 4 | 0 | — |
| ML Kit Android (GMS) | 2 | 0 | — |
**Taller is not a superset.** Apple Vision alone reads 4 images that the
38-solve decoder misses, and 17 of that decoder's 38 are unique to it. Everything
in the table together reads 45 of the 56 checkable images. Rank by the column you
actually care about, and check the intersection before concluding one decoder
dominates another.
**Scoring is not uniform across these rows, and the difference matters.**
`marian_mark_decoder` returns bytes and is compared byte-for-byte. Apple returns
a string plus a raw codeword stream and is scored on both surfaces separately.
WeChat is string-only. ML Kit coverage was imported from physical-device runs and
its payloads were never recorded, so those three rows **cannot be byte-checked at
all** and are coverage claims only.
## Usage
```python
from datasets import load_dataset
ds = load_dataset("devmandan/broken-qr-codes-104", split="test")
# the checkable subset — the only fair denominator
checkable = ds.filter(lambda r: r["has_payload"]) # 56
# the images every reference decoder failed
unsolved = ds.filter(lambda r: r["n_decoders_solving"] == 0) # 59
# geometry-supervised subset
geo = ds.filter(lambda r: r["quad"] is not None) # 33
```
## Provenance, licensing, and takedown
**Please read this before redistributing.**
The **annotations** in this dataset — payloads, quads, finder centres, versions,
module scales, decoder results — are original work and are offered under
**CC BY 4.0**.
The **images** are a different matter and are not uniformly owned by the
publisher of this dataset. They were collected from public web sources as
examples of QR codes that fail to decode, including artistic/generated QR codes
whose individual authorship is not documented. They are published here for
**research and benchmarking**, which is the purpose for which they were
gathered. No claim of ownership is made over them.
If you own an image in this set and want it removed, open a discussion on this
repository and it will be taken down.
**Payload contents are real.** Several decoded payloads are live third-party URLs
that were encoded in the original codes, some carrying opaque identifiers. They
are reproduced verbatim because a QR benchmark whose payloads have been rewritten
cannot be used to check a decoder. Do not treat any URL here as endorsed, safe, or
maintained, and be careful about resolving them automatically.
## What is deliberately not here
A separate 19-image validation set exists and is **withheld on purpose**. It has
never been trained on, tuned against, or scored more than once, and publishing it
would destroy the only clean holdout this line of work has. A benchmark you can
iterate against stops measuring generalization; that set exists so there is one
number that was not fit.
## Citation
```bibtex
@misc{broken_qr_codes_104,
title = {Broken QR Codes (104): a hard real-world QR decoding benchmark},
author = {Legut, Daniel},
year = {2026},
url = {https://huggingface.co/datasets/devmandan/broken-qr-codes-104}
}
```
The decoder this benchmark was built alongside, `marian_mark_decoder`, is named
for David Marian Legut.
|