Barcode Benchmark

Retail barcode benchmark

How reliably do barcode scanners read real product photos once they are rotated, blurred, downscaled, badly lit or crowded together? Explore the public photos and saved reads. Format-test images and individual results stay private.

—Open Food Facts photos
—test images
12challenges
11configurations compared

Overview

Share of images where the scanner returned the expected barcode value (recall), with median scan time. The best recall per challenge is marked. Collages count recovered values out of 48. Perspective, blur and low resolution use different photo subsets, so compare scanners within a row, not difficulty across rows. “orig.” is this method’s recall on the same source photos at full resolution and horizontal alignment, before the change. Each original is counted once. Format tests already use original images.

Measurement setup

Results by challenge

Each photo gets one lighting effect and one of perspective, blur or downsampling. Assignment follows a fixed order and never depends on scanner results. Click a scanner name to inspect its saved reads, or a count to see the affected images.

Method

Reader versions, options and adapter source

These scores compare specific integrations and settings, not every possible configuration of each decoder. Retail tests request EAN-13, EAN-8, UPC-A and UPC-E together. Other-format tests enable each adapter’s supported set rather than selecting the known format of the image.

  • ZXing WASM 3.1.5: ZXing-C++ commit 2ecec3f5be0ee803f6e14a5a2c7028c0cfe525b4. Calls readBarcodes(ImageData, {formats}). Try harder, rotation, inversion and downscaling are enabled; denoising is disabled. LocalAverage binarizer, downscale factor 3, threshold 500, minimum 2 lines, up to 255 symbols. Only valid results are retained. Full effective options and the WASM SHA-256 are in the settings file.
  • Tapirscan 1.5.0: exact npm package, matching JavaScript host and mode-specific WASM; Low, Medium, Very High and experimental Turbo8. Turbo8 uses eanAddOnPolicy: "ignore".
  • ZBar WASM 0.11.0: scanRGBABuffer, symbol cache disabled, only the selected scope’s supported symbologies enabled. Scanner construction is outside the timer.
  • Chrome BarcodeDetector: browser API with no fallback. The browser does not expose the underlying decoder version.
  • Quagga2 1.12.1: 800-pixel long side, locate: true, halfSample: false, medium locator patches, multiple symbols enabled, no additional workers. Grayscale conversion, resizing and locator-patch cropping are timed. The source lists both guarded changes needed for raw image input in a worker.
  • ZXing-JS 0.23.0: TRY_HARDER: true, full-resolution input, HybridBinarizer with GlobalHistogramBinarizer fallback on NotFound. This adapter returns at most one symbol per call, including on collage tests. Canvas preparation is timed.
  • Barleader 0.1.1 Fast and Aggressive (Java)†: BarcodeReader.sequential().read with the ReadOptions.fast() or ReadOptions.aggressive() preset, findAll(true), EAN add-ons ignored, and the selected scope’s formats. Barleader has no JavaScript build, so it runs in a JVM on the same machine: Chrome generates and checks the identical pixels and the results are scored identically, but only the Java read call is timed. † These times are not strictly comparable with the browser readers.

Photos and labels

This benchmark is maintained by Tapirscan’s developer. The official benchmark images were kept separate from the images used to develop and tune Tapirscan. They were not used to optimize its algorithms or select its thresholds. Benchmark images, their aliases and derived variants are reserved for evaluation only.

Product photos from Open Food Facts. Every scanner is asked for all four retail formats (EAN-13, EAN-8, UPC-A, UPC-E).

Labels were checked individually where scanners disagreed and by visual review otherwise; barcode-free photos were confirmed on the full image. Labels name the expected values; they do not outline every physical barcode in a photo.

Controlled variations

Every transformation starts from the original photo, turned upright; natural camera tilt remains. Collages keep barcodes at native resolution, and the enlarged inputs test processing cost and size limits rather than added detail.

Reproducible inputs

Only the original photos are hosted. Every test image is rendered from them on the fly by a deterministic generator that produces byte-identical pixels in every browser and in Node, and each render is checked against a SHA-256 fingerprint before scanning. Anyone can rebuild the full set with the download script.

Readable is not guaranteed

Blur and resolution strengths are fixed settings, not proven decoding limits, fixed before this release evaluation. Transformed images inherit the labels of their source photo, so some may no longer be readable at all.

Scoring

Images derived from the same photo are correlated, so there is no combined winner score. Errors stay visible and count as misses; failed calls do not contribute to timing. Ten barcode-free photos are too few to estimate a general false-positive rate.

Wrong predictions and duplicates

Wrong predictions are values absent from the reviewed labels. Duplicates are reads beyond the annotated count of the same normalized value within one scan (three reads with two labeled copies = one duplicate); equivalent UPC-E expansions count as the same value. Without instance boundaries this is a count-based allowance, not verified spatial matching. A repeated wrong value counts in both columns.

Counts use the first measured scan per image. In the detailed tables, click a scanner name to inspect all its saved reads and locations, or a count to see the affected images.