Spaces:
Running
Running
|
Download README.md from devmandan/qr-scan-difficulty: direct link, hf CLI and curl.
- Browser
- Download file 15.5 kB
-
https://huggingface.co/spaces/devmandan/qr-scan-difficulty/resolve/main/README.md
- Command line
-
hf download hf://spaces/devmandan/qr-scan-difficulty/README.md
-
curl -L -o README.md https://huggingface.co/spaces/devmandan/qr-scan-difficulty/resolve/main/README.md
15.5 kB
| title: QR Scan Difficulty | |
| emoji: 📷 | |
| colorFrom: green | |
| colorTo: red | |
| sdk: static | |
| pinned: false | |
| license: other | |
| short_description: Not every phone reads the same QR codes, measured | |
| # Not every phone reads the same QR codes | |
| A one-page answer to "will this QR code scan?", for people who know why QR codes matter but don't | |
| have time for a dashboard. Every number comes from measured decodes. | |
| Every iPhone, about 1 in 4 smartphones in use, has the same scanner: Apple's, which read 69% of our | |
| 6,499 test codes. On the other 3 in 4, more than 3 billion phones, the scanner depends on the maker | |
| and the app, and the scanners Android phones come with read from 42% to 68%: | |
| - **Samsung's own**, in its Camera app ([Samsung's guide](https://www.samsung.com/us/support/answer/ANS10001925/)), | |
| on more than a billion phones: about 59%, measured on a real Galaxy A57 from a sample of the codes. It | |
| misses about 15 of every 100 codes an iPhone reads. | |
| - **Google's ML Kit**, which Android's own QR button (lock screen and Quick Settings) opens, as on Pixel phones | |
| ([Android's source](https://android.googlesource.com/platform/frameworks/base/+/refs/heads/main/core/java/com/android/internal/config/sysui/SystemUiDeviceConfigFlags.java): | |
| "On the eligible devices this activity is provided by GMS core"): 61%. | |
| - **Huawei's Scan Kit**, built into Huawei phones | |
| ([HarmonyOS](https://developer.huawei.com/consumer/en/doc/harmonyos-guides/scan-introduction), | |
| [HMS Core](https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides/service-introduction-0000001050041994)): 68%. | |
| - **ZXing**, which [Android's Settings app](https://cs.android.com/android/_/android/platform/frameworks/base/+/2ecfdb1d2dd832c637aacfa15c257822b94f10b1:packages/SettingsLib/src/com/android/settingslib/qrcode/QrCamera.java;bpv=1;bpt=0) | |
| uses for Wi-Fi codes only: 42%. | |
| - **Apps** bring their own; the four open-source scanners apps are built on read 27% to 67%. | |
| The built-in scanners of more than 1 in 3 phones, from Xiaomi, OPPO, vivo, Transsion and Honor, | |
| could not be measured. | |
| Phones in use: [Counterpoint Research](https://counterpointresearch.com/en/insights/Active-Installed-Base-8-Smartphone-OEMs-Top-200-mn-Nearly-1-in-4-is-an-iPhone), | |
| active smartphones in 2025: "nearly one in four active smartphones is an iPhone, while nearly one in five | |
| is a Samsung"; only Apple and Samsung pass a billion, and eight makers have more than 200 million each. | |
| People: at the end of 2025, 4.6 billion, 56% of the world, went online with a smartphone of their own | |
| ([GSMA, State of Mobile Internet Connectivity 2026](https://www.gsma.com/somic/wp-content/uploads/2026/09/The-State-of-Mobile-Internet-Connectivity-2026.pdf), p. 32). | |
| Web counters such as StatCounter show iPhones higher, about 31% of mobile page views, because they | |
| count page views, not phones. | |
| 1. **Not every phone reads the same QR codes.** Each scanner's share of all the codes, and what the | |
| gap means for one code. | |
| 2. **The QR code was invented for messy factories.** Why the gap matters: Denso made the QR code in 1994 | |
| for oily, damaged factory labels, with error correction built in, in the words of its developer, | |
| Masahiro Hara. When one scanner reads a picture and another misses it, the difference is the software. | |
| 3. **More than a billion phones read fewer codes than an iPhone.** Which phones use which scanner, | |
| how many phones that is, how many codes each reads, and how many of every 100 codes an iPhone | |
| reads it misses (and reads that the iPhone misses). | |
| 4. **The gap opens on harder codes.** One strip per set of codes (clean, everyday, tough, hardest | |
| cases) at a chosen image resolution: 1920, 1280 or 640 pixels on the long side. Samsung's estimate | |
| appears at 1280, the one resolution it was read at. | |
| 5. **Even everyday prints fail on some scanners.** Every tested code on one scale from easy to | |
| hard, shaded by how many of the eight scanners read it. Drag along it to see a code from that | |
| spot, and the mix of shades there; a link under the code opens its exact picture, to try with your | |
| own phone. | |
| 6. **What makes a code hard to read.** Six before-and-after pairs (small squares, too much data for | |
| the size, blur, faded ink, tight curves, a covered corner square), each with the scanners that still | |
| read it. The data pair shows the same version 21 codes squeezed into a small space and printed | |
| bigger: more data needs a bigger print, because its squares shrink in the same space. | |
| 7. **What helps a code scan on every phone.** Five plain rules, each backed by the measurements. | |
| Everything else waits behind a "+", for readers who want to master it: each scanner's full profile; | |
| how a scanner reads a QR code (telling dark from light, finding the corner squares, fitting the grid, reading | |
| the squares, error correction) and, for each of the 17 factors, the step it breaks; and how the | |
| measurements were made. | |
| ## Decoders | |
| | On the page | Decoder | What it is | Version | | |
| |---|---|---|---| | |
| | Apple's scanner | [Apple Vision](https://developer.apple.com/documentation/vision/vndetectbarcodesrequest) | Apple's barcode detector, built into iOS; our stand-in for the iPhone, measured on a Mac | macOS 14.3, `VNDetectBarcodesRequest` revision 4 | | |
| | Google's scanner | [ML Kit](https://developers.google.com/ml-kit) ([barcode scanning](https://developers.google.com/ml-kit/vision/barcode-scanning)) | Google's barcode scanner as Google Play services delivers it; on Google's Android 14 image, Android's QR button is set to Play services' ML Kit barcode scanner | play-services-mlkit-barcode-scanning 18.3.1 with Google Play services 26.41.31 (barcode module 264131001), QR only, on Google's Android 14 emulator image (API 34, arm64) | | |
| | Samsung's scanner | [Samsung Camera's QR scanner](https://www.samsung.com/us/support/answer/ANS10001925/), with a decoder by [Quram (Quramsoft)](https://www.quramsoft.com/) | the scanner in Samsung's Camera app, which the "Scan QR code" button in Quick Settings opens on Samsung phones; read on a real phone borrowed through Samsung's Remote Test Lab, on a random sample of the codes | Camera 16.5.00.85 on a Galaxy A57 (SM-A576S), One UI 8.5, Android 16; each picture opened from the gallery, at 1280 px only | | |
| | Huawei's scanner | [Huawei Scan Kit](https://developer.huawei.com/consumer/en/hms/huawei-scankit/) | Huawei's scanning engine, built into HarmonyOS and shipped in HMS Core on Huawei phones; the kit's three models are byte-identical to those in HMS Core 6.16.2.300 | `com.huawei.hms:scanplus` 2.15.0.301 from Huawei's developer repository, photo mode (`decodeWithBitmap`), QR only, on Google's Android 14 emulator image (API 34, arm64) | | |
| | Android Settings' scanner | [ZXing (Java)](https://github.com/zxing/zxing/releases/tag/zxing-3.5.2) | the scanner Android's Settings app uses for Wi-Fi codes; also inside apps built on zxing-android-embedded | 3.5.2, called as AOSP's `QrCamera` calls it, inverted retry included | | |
| | WeChat's scanner | [WeChat](https://docs.opencv.org/4.12.0/d5/d04/classcv_1_1wechat__qrcode_1_1WeChatQRCode.html) | WeChat's neural-network scanner, open-sourced in OpenCV (the app's own build may differ) | OpenCV contrib 4.12 with its detector and super-resolution models | | |
| | zxing-cpp | [zxing-cpp](https://github.com/zxing-cpp/zxing-cpp/releases/tag/v3.1.1) | grew out of ZXing; used by open-source Android scanners such as Binary Eye | 3.1.1, library defaults | | |
| | OpenCV, newer | [OpenCV ArUco](https://docs.opencv.org/4.12.0/d3/db0/classcv_1_1QRCodeDetectorAruco.html) | OpenCV's ArUco-based QR detector | 4.12 `QRCodeDetectorAruco`, single-code `detectAndDecode` | | |
| | OpenCV, original | [OpenCV](https://docs.opencv.org/4.12.0/de/dc3/classcv_1_1QRCodeDetector.html) | OpenCV's first QR detector | 4.12 `QRCodeDetector`, single-code `detectAndDecode` | | |
| An iPhone has one built-in scanner that the Camera and any app can use. Android ships none for | |
| everyday codes: its QR button opens one that Google or the phone maker supplies, camera apps use the | |
| maker's own (Samsung's in its Camera app; Huawei's is Scan Kit), and every other app picks its own, so the same code can | |
| scan in one app and fail in another. | |
| Google's scanner is measured as Google Play services delivers ML Kit, on Google's Android 14 emulator | |
| image, where the QR button's default is `com.google.android.gms/.mlkit.barcode.ui.PlatformBarcodeScanningActivityProxy`. | |
| The model lives in Play services' barcode module, which updates with Play services. The image's Play Store | |
| updated Play services to 26.41.31 (October 2026) by itself; that version was then held for the whole | |
| measurement, and every result records the versions of Play services and its barcode module. On Google's | |
| images for each Android version, every up-to-date one from Android 9 to 17 read every code exactly the same; | |
| older Play services read a little less (57% of codes with 2023's version). | |
| Huawei's scanner is measured through Huawei's own developer kit, on the same emulator image, reading | |
| each picture in the kit's photo mode. The kit's camera mode, meant for live video frames, read a | |
| little less of these still pictures. | |
| Samsung doesn't name the decoder in its scanner, but the phone shows whose it is: the Camera app decodes | |
| with a library that carries the name of [Quram](https://www.quramsoft.com/), a Korean imaging-software company, | |
| and the decoding engine names itself in the phone's log. Quram sells a QR and barcode scanner of its own and | |
| names Samsung among its customers. | |
| Samsung's scanner runs only on Samsung phones, so it was read on a real Galaxy A57 borrowed through | |
| [Samsung's Remote Test Lab](https://developer.samsung.com/remote-test-lab), on a random sample of each set at | |
| 1280 px. Each picture was opened from the phone's gallery in the scanner, inside a white border, because the | |
| crop box the gallery shows first keeps only the middle of a picture. A read is the text on its result card, equal | |
| to the code's content. Some content it never shows as text: it hands contacts, Wi-Fi, calendar, SMS, location, | |
| email and phone codes and Facebook links straight to an app (its log names each action), and shows binary content and | |
| JSON text as an empty card. Codes with such content are left out of its comparison, for every scanner. Its | |
| figures are estimates: its gap to the other scanners on the codes it read, added to their results on all of a | |
| set's codes. On all codes that comes to about 59% (57% to 61%, 95% confidence). | |
| Not yet measured: the scanners other phone makers build into their phones, such as Xiaomi's, OPPO's, | |
| vivo's, Transsion's and Honor's. Each runs only on its maker's phones, so it can be measured only on real devices | |
| borrowed from a test lab, far more slowly than the other scanners. Samsung's came first, for its more than a billion | |
| phones, and even it on a sample of the codes; the others are left for future work. | |
| ## Codes | |
| - **Made here** (synthetic captures, payloads made up): pristine, everyday and tough tiers, plus | |
| one-factor ladders: a code all eight scanners read, changed one step at a time, 80 codes per step, | |
| each code the same at every step but for the factor. One ladder, "More data, printed bigger", takes | |
| the amount-of-data ladder's own codes and keeps every square at 6 camera pixels, up to version 21. | |
| Published as | |
| [QR Scan Difficulty: synthetic codes](https://huggingface.co/datasets/devmandan/qr-scan-difficulty), | |
| with each code's content, every setting used to make it, and which scanners read it. | |
| - **Research datasets**, each used under its own terms. Most of their codes are the page's "hardest cases": codes | |
| researchers collected or built to copy the toughest conditions real codes meet. The other 1,525 are easy, QR-DN1.0's | |
| clean originals, alone or tiled four to a picture. | |
| - [BoofCV QR singles](https://huggingface.co/datasets/devmandan/boofcv-qr-singles): Peter Abeles' | |
| BoofCV QR Code Performance Benchmark photos, published openly without an explicit licence grant. | |
| - [QR-DN1.0](https://huggingface.co/datasets/devmandan/qr-dn1.0): clean QR codes, the same codes | |
| tiled four to a picture, and distorted, noisy versions of them; CC BY 4.0 (Mendeley Data, | |
| doi:10.17632/t2bdr663ms.2). | |
| - [syn10k](https://huggingface.co/datasets/devmandan/syn10k-huawei-barcodes): Bodnár, Grósz and | |
| Tóth's barcode images; the page uses 1,000 of its computer-made warped ones. CC BY 4.0. | |
| - [Broken QR 104](https://huggingface.co/datasets/devmandan/broken-qr-codes-104): real codes that | |
| fail to decode, collected from public web sources; annotations CC BY 4.0. | |
| A code in an image can be read by any phone, so showing an image shows its payload. Images are | |
| cropped and resized from their datasets; to have one removed, open a discussion on its dataset | |
| page. The page itself never prints payload text. | |
| ## How it was measured | |
| Every image is read at seven image resolutions, 1920 down to 224 pixels on the long side: larger | |
| images are shrunk to each size, smaller ones are read as they are, never enlarged. Most | |
| research-dataset images are 512 × 512, so only the sizes below 640 shrink them. Every decoder reads | |
| every image at every size, and a two-parameter item-response model turns the pattern of reads and | |
| misses into one difficulty per code. The ladders are read at 1280 px. | |
| A read counts only when a scanner returns the code's exact content, byte for byte; finding a code | |
| without reading it is a miss. The content comes with each code: made here, or published by its | |
| dataset. BoofCV's photos and QR-DN (whose distorted images take the content of their clean | |
| originals) come without it; there the content is what other decoders read identically, and a code | |
| is kept only when at least two decoders other than the scanner being scored agree, which leaves out | |
| 4 photos. On 100 images with no code, made to fool scanners (look-alike corner squares, | |
| checkerboards, clutter, other barcode types), none of the eight returned anything. Samsung's scanner | |
| read them on its phone with no false readings; among the other barcode types it read the 4 Data Matrix | |
| codes, each correctly, as it reads Data Matrix as well as QR codes (the eight, as we ran them, read QR | |
| codes only). | |
| One rule throughout: a code's shade counts the scanners that read it at 1280 px (all eight, most = | |
| 5 to 7, some = 1 to 4, none). A group of codes, such as a ladder step or a set, counts a scanner when | |
| it reads at least 9 in 10 of them. The page's "How we measured" section has the details. | |
| ## Why we made this | |
| To show how unevenly the world's phones read QR codes, and to help everyone who builds a scanner see where | |
| theirs falls short and improve it. A measurement this broad has become practical only recently, thanks to AI | |
| models that help write the software behind it. | |
| ## Disclosures | |
| Independent work, not affiliated with or endorsed by any company or organization named here: Apple, Google, | |
| Samsung, Quram (Quramsoft), Huawei, Honor, Xiaomi, OPPO, vivo, Transsion, Tencent, Meta, Denso, DENSO WAVE, | |
| Toyota, GS1, Counterpoint Research, GSMA, ITU, IDC or StatCounter; nor by the open-source projects and dataset | |
| authors credited above. QR Code is a registered trademark of DENSO WAVE INCORPORATED. Apple and iPhone are | |
| trademarks of Apple Inc.; Android, Google Play, ML Kit and Pixel of Google LLC; Samsung and Galaxy of Samsung | |
| Electronics Co., Ltd.; Huawei and HarmonyOS of Huawei Technologies Co., Ltd.; WeChat of Tencent; WhatsApp and | |
| Instagram of Meta Platforms, Inc. Other names are trademarks of their owners. | |