Dynamsoft vs ML Kit: Barcode Accuracy on 8,000 Images, 24 Symbologies

Need a license key to run the code in this tutorial?

Get a 30-day free trial license

One Android phone, 8,000 synthetic images, 11,372 annotated symbols across 24 symbologies, and the same bitmap handed to both engines one after the other. Dynamsoft Barcode Reader matched 9,220 of those symbols — 81.1% — and Google ML Kit matched 5,603, or 49.3%. Counting whole images instead of symbols, 6,374 images came back fully correct for Dynamsoft (79.7%) against 4,101 for ML Kit (51.3%).

The 32-point gap is not all recognition accuracy. Ten of the 24 symbologies have no ML Kit decoder at all — 4,789 symbols the SDK cannot return under any setting, 3,129 of which Dynamsoft reads. On the 14 formats both engines actually decode, the race tightens to 92.5% against 85.1% of 6,583 symbols, and on the 4,688 images whose symbols all sit inside that shared set, 91.2% against 87.5% of images decoded exactly.

What you’ll build: A reproducible Android benchmark app that runs Dynamsoft Barcode Reader and Google ML Kit on the same bitmap, scores both against a manifest of 11,372 annotated symbols, and reports per-symbology recall, precision and wall-clock time — locally, from a video, or through the built-in HTTP endpoint that drove the 8,000-image pass below.

Dynamsoft matched 9,220 of 11,372 annotated symbols, ML Kit 5,603, at 63 ms and 48 ms mean per image

Key Takeaways

  • Measured on this dataset: 8,000 images, 11,372 symbols, 24 symbologies, one pass on an OPPO PLG110 running Android 17. Dynamsoft 9,220 matched (81.1%), ML Kit 5,603 (49.3%). Precision 99.2% against 99.1%.
  • Coverage accounts for 87% of the difference. 4,789 symbols sit in ten symbologies ML Kit does not implement; Dynamsoft read 3,129 of them, ML Kit none. The remaining 488 symbols come from the 14 formats both support.
  • On equal ground it is close but not even. Shared-format recall 92.5% against 85.1%. Dynamsoft leads 13 of those 14 formats; ML Kit wins Codabar, 80.8% against 71.0%.
  • Multi-symbol frames still separate them. From 8 to 16 symbols per image Dynamsoft holds 85.9–93.3% recall while ML Kit falls to 33.9–47.9%. On single-symbol images it is 83.8% against 53.4%.
  • Neither engine invents barcodes. Both returned zero predictions on all 200 background-only control images.
  • Speed is a tie with a different shape. Median 35 ms against 45 ms in Dynamsoft’s favour, mean 63 ms against 48 ms in ML Kit’s, p95 187 ms against 95 ms.

Common Developer Questions

How accurate is Google ML Kit compared with Dynamsoft Barcode Reader on Android?

On 11,372 annotated symbols from a 24-symbology synthetic dataset, Dynamsoft matched 81.1% and ML Kit 49.3%. Restricted to the 14 symbologies both SDKs implement, the numbers are 92.5% and 85.1%. The gap therefore has two components: format coverage (ML Kit implements 13 symbologies, plus GS1-128 through its Code 128 decoder) and recognition on the formats it does implement.

Does ML Kit support every barcode symbology?

No. ML Kit’s barcode API covers Code 128, Code 39, Code 93, Codabar, EAN-8, EAN-13, ITF, UPC-A, UPC-E, QR Code, Data Matrix, PDF417 and Aztec. GS1-128 labels decode as Code 128, so they work. In this dataset that leaves 4,789 symbols — DotCode, MaxiCode, Micro QR, MSI, Pharmacode, KIX, POSTNET, Royal Mail, USPS Intelligent Mail and IATA 2 of 5 — with no decoder at all, spread over 3,312 of the 8,000 images.

Which SDK is faster, ML Kit or Dynamsoft?

In this app ML Kit has the lower mean (48 ms against 63 ms) and the tighter distribution (p95 95 ms against 187 ms), while Dynamsoft has the lower median (35 ms against 45 ms). Dynamsoft’s mean is pulled up by a small number of images where it keeps searching after the first symbol, which is also where its multi-symbol recall comes from. Treat the medians as the typical cost and the p95 as the worst case you have to budget for.

Can I re-run this benchmark on the same images?

Yes. The dataset, its manifest with per-symbol ground truth, the Android app and the HTTP runner that drove it are all published. The app exposes POST /api/benchmark, which decodes one uploaded image with both SDKs and returns each prediction with its own wall clock, so the whole pass is a script rather than a manual test.

Prerequisites

The Dataset Behind These Numbers

The measurement uses the synthetic barcode benchmark dataset: 8,000 JPEGs, 11,372 annotated symbols, 24 symbologies, 36 background scenes, and 200 background-only control images. Every image carries its seed, the effects applied to it, the SHA-256 of the file and a quadrilateral plus payload for each symbol. The generator composes BWIPP-rendered labels over packaging, paper, fabric and work-surface scenes, then applies perspective, rotation, defocus and motion blur, low resolution, low contrast, noise, JPEG compression, partial occlusion, uneven illumination and glare — one effect at a time and in combination.

Two properties matter for a benchmark that claims to rank engines by symbology. First, every symbology gets a comparable budget: between 463 and 505 symbols each, sampled from the same effect ladder, so 63.3% for DotCode and 97.9% for QR Code are measured on the same mix of clean, blurred and degraded frames. Second, the ground truth is written by the generator rather than read back from a decoder, and it records the final quad of each symbol in the JPEG, so a read cannot be scored against a symbol that the renderer already destroyed.

The 200 control images contain backgrounds, textures and edges but no barcode at all. They are the only way to see whether an engine reports something that is not there, and they are scored against every reader in the tables below.

What the Benchmark App Measures

One bitmap reaches both SDKs in the same process: cvRouter.capture(bitmap, "ReadBarcodes_Default") for Dynamsoft and BarcodeScanner.process(InputImage.fromBitmap(bitmap, 0)) for ML Kit. Neither engine sees a different frame, scale or pre-processed copy, so a difference in the counts is a difference between the engines.

Enable every barcode format before you measure anything

The built-in ReadBarcodes_Default preset ships BF_DEFAULT, a curated subset that leaves out postal symbologies, MaxiCode, DotCode, MSI, Pharmacode and Micro QR. Benchmarking that preset against a 24-symbology dataset measures the preset, not the SDK. The app keeps the preset and widens only the format list at runtime:

SimplifiedCaptureVisionSettings settings =
        cvRouter.getSimplifiedSettings(EnumPresetTemplate.PT_READ_BARCODES);
settings.barcodeSettings.barcodeFormatIds = EnumBarcodeFormat.BF_ALL;
cvRouter.updateSettings(EnumPresetTemplate.PT_READ_BARCODES, settings);

That is the same configuration the dataset’s desktop runner uses (ReadBarcodes_Default with BF_ALL), which is why the Android pass below lands within three points of the published Linux run: 81.1% against 83.9% recall on the same images.

ML Kit needs no equivalent call: BarcodeScannerOptions.Builder().setBarcodeFormats(Barcode.FORMAT_ALL_FORMATS) already means every format the SDK implements.

How the numbers in this article are counted

Term Rule applied to this dataset
Expected the 11,372 symbols listed in manifest.jsonl, across 8,000 images
Matched a returned value whose format and text equal an annotation, counted once per annotation
Symbol recall matched ÷ expected
Exact image every annotation matched, and no extra predictions
Wrong-read image at least one prediction that matches no annotation
No read annotations present, zero matches
Incomplete some annotations matched, no extra predictions
Time wall clock around the SDK call, measured inside the app per image

The matcher normalises equivalent representations before comparing — UPC-A against its zero-prefixed EAN-13 form, GS1-128 against the same payload reported as Code 128, Codabar and Code 39 guard characters, POSTNET and Royal Mail check digits — so a correct read is not scored as a miss because two SDKs spell the format differently. Unmatched predictions count against precision.

Versions. Dynamsoft Barcode Reader bundle 11.6.4000 with BF_ALL, Google ML Kit barcode-scanning:17.3.0, on an OPPO PLG110 running Android 17. The 8,000 images were uploaded one at a time to the app’s HTTP endpoint over USB, and the full pass took 23 minutes with no failed requests. ZXing-C++ 3.1.1 is compiled into the same app but switched off by default, so this pass ran Dynamsoft and ML Kit only — see Common Issues.

Results: 8,000 Images, 11,372 Symbols

Benchmark results screen showing Dynamsoft 6 and ML Kit 3 barcodes for one image

Metric Dynamsoft Barcode Reader 11.6.4000 Google ML Kit 17.3.0
Symbols matched 9,220 / 11,372 (81.1%) 5,603 / 11,372 (49.3%)
Exact images 6,374 / 8,000 (79.7%) 4,101 / 8,000 (51.3%)
Wrong-read images 71 53
No-read images 1,173 3,527
Incomplete images 382 319
Precision 99.2% (76 extras) 99.1% (53 extras)
Mean / median / p95 63 / 35 / 187 ms 48 / 45 / 95 ms

Coverage versus accuracy

Two numbers explain the whole table.

  Dynamsoft Barcode Reader Google ML Kit
Symbologies with a decoder 23 of 24 14 of 24 (13 plus GS1-128 as Code 128)
Symbols inside that coverage 10,898 6,583
Symbols outside it 474 (IATA 2 of 5) 4,789 (ten symbologies)
Recall inside coverage 84.6% 85.1%
Recall on the 14 shared formats 92.5% (6,091 / 6,583) 85.1% (5,603 / 6,583)
Images whose symbols are all shared 4,688 4,688
Exact images on that subset 4,276 (91.2%) 4,101 (87.5%)

Split the 3,617-symbol difference between the two engines: 3,129 symbols come from formats ML Kit has no decoder for, and 488 come from the shared formats. Coverage is the larger half of the story, and it is also the half no amount of tuning on the ML Kit side can change.

Accuracy by Symbology

Counts are matched ÷ annotated, so every percentage divides out on its own. “No decoder” means the SDK cannot return that format at all.

2D symbologies

Format Dynamsoft Google ML Kit
Aztec 92.8% (435/469) 80.6% (378/469)
Data Matrix 97.0% (454/468) 88.7% (415/468)
DotCode 63.3% (312/493) no decoder
MaxiCode 77.9% (366/470) no decoder
Micro QR 92.9% (445/479) no decoder
PDF417 91.1% (429/471) 78.3% (369/471)
QR Code 97.9% (463/473) 94.3% (446/473)

Linear symbologies

Format Dynamsoft Google ML Kit
Codabar 71.0% (336/473) 80.8% (382/473)
Code 128 92.6% (435/470) 84.9% (399/470)
Code 39 85.3% (396/464) 74.8% (347/464)
Code 93 90.7% (428/472) 71.8% (339/472)
EAN-13 97.9% (468/478) 93.1% (445/478)
EAN-8 97.4% (454/466) 94.0% (438/466)
GS1-128 94.0% (435/463) 75.4% (349/463)
IATA 2 of 5 no decoder no decoder
ITF 94.9% (447/471) 87.5% (412/471)
MSI 60.4% (305/505) no decoder
Pharmacode (one track) 66.3% (329/496) no decoder
UPC-A 97.3% (461/474) 93.9% (445/474)
UPC-E 95.5% (450/471) 93.2% (439/471)

Postal symbologies

Format Dynamsoft Google ML Kit
KIX 79.2% (369/466) no decoder
POSTNET 68.5% (320/467) no decoder
Royal Mail (RM4SCC) 82.6% (388/470) no decoder
USPS Intelligent Mail 62.9% (295/469) no decoder

What the per-format table says. On the 14 shared formats Dynamsoft leads by between 2.3 and 18.9 points, except Codabar, where ML Kit is 9.8 points ahead. The widest leads are Code 93 (18.9), GS1-128 (18.6), PDF417 (12.8) and Aztec (12.2): two dense linear codes where one misread module breaks the symbol, a stacked code that has to keep its rows aligned, and a symbology that packs data in concentric layers. The narrowest are UPC-E (2.3), UPC-A and EAN-8 (3.4) and QR Code (3.6) — the formats every phone camera meets daily.

Where Dynamsoft is weakest. Its own lowest rows are MSI (60.4%), USPS Intelligent Mail (62.9%), DotCode (63.3%), Pharmacode (66.3%), POSTNET (68.5%) and Codabar (71.0%). Postal and single-track codes are thin, low-contrast structures that a 1024×512 frame with motion blur reduces to a handful of pixels per bar, which is a resolution problem before it is a decoding problem. Everything below 70% here is a pixel-budget story, not a tuning story.

Where the Gap Comes From

Format coverage

3,312 of the 8,000 images contain at least one symbol in a format ML Kit cannot decode. On those images ML Kit’s best possible outcome is an incomplete read; two out of five images are decided before the first pixel is examined. This is the row to check against your own workload: if your scanner only ever meets retail EAN/UPC and QR codes, coverage costs you nothing, and the shared-format column is the one that applies.

Degradation

Scenario Images Dynamsoft recall ML Kit recall
Clean 410 89.3% 54.2%
Glare 199 91.3% 58.7%
Uneven lighting 199 91.7% 57.6%
Motion blur 202 78.5% 49.6%
Occlusion 619 71.0% 51.0%
Low resolution 616 82.0% 49.8%
Combined effects 651 66.9% 44.7%
High density 195 88.7% 39.3%

Dynamsoft leads in every scenario, but the margin moves with the failure mode: 32.6–35.1 points on clean, glare and uneven-lighting frames, 20 points under occlusion, and 49 points on dense multi-code sheets. The narrowest rows are the ones where both engines are guessing — combined effects, where blur, low contrast and perspective stack on one frame, still puts 22 points between them.

Symbols per image

Symbols in image Images Dynamsoft recall ML Kit recall
1 6,472 83.8% 53.4%
2 701 74.3% 52.7%
3 281 66.7% 45.7%
4 114 55.3% 28.1%
5–6 87 90.0% 52.7%
8–10 48 93.3% 47.9%
11–16 73 85.9% 33.9%

The dip at four symbols is a dataset-mix effect rather than a counting effect: those 114 images carry no high-density sheet at all and are spread across the hard single-effect batches — occlusion, perspective, blur, rotation — while half of the 5–6 group are flat high-density grids that decode more easily. From 8 symbols upward every image is a high-density sheet, and Dynamsoft reads 85.9–93.3% of them while ML Kit lands between 33.9% and 47.9% — a gap wide enough that no plausible per-image luck explains it.

False positives

Both engines returned nothing on all 200 control images, so neither invents a barcode on an empty scene. Across the 7,800 positive images Dynamsoft returned 76 predictions that matched no annotation and ML Kit 53, which is why precision sits above 99% for both. In this dataset a wrong read is far rarer than a miss — 28 times rarer for Dynamsoft, 109 times for ML Kit — so the failure mode to plan for is the code that never comes back, not the code that comes back wrong.

Step 1: Run Both SDKs on One Bitmap

The app has three input paths, and all three reach the same processImage code. The image screen is the shortest one.

Pick a file, and both engines run on the decoded bitmap in one pass, then the result screen lists every barcode each engine returned with its own timing. On the six-label mixed-symbology sample below, Dynamsoft returns all six (EAN-13, EAN-8, RM4SCC, KIX, MSI, ITF) and ML Kit returns the three it implements.

Barcode Benchmark home screen with image, video, camera and web server modes

Step 2: Scan Video Frames at a Fixed Interval

MediaMetadataRetriever samples a video at a fixed interval, both engines run on every extracted frame, and the result counts unique format-plus-payload pairs with the frame number where each first appeared — the on-device version of a conveyor-belt scan.

Step 3: Batch the Dataset Through the Built-in Web Server

Toggle Web Server on the home screen and the phone serves a small upload page on port 8080. It accepts images, folders of images and videos, runs the same processImage path, and shows an aggregate table with detection rate and precision when a ground-truth file is loaded. This is the mode the 8,000-image pass used: a Python client posted each JPEG to POST /api/benchmark and appended the JSON response to a results file that could resume after an interruption.

adb forward tcp:18081 tcp:8080          # the phone's 8080 becomes localhost:18081
python android/run_benchmark.py \
  --output .runs/android-2026-11/results.jsonl \
  --decoders dbr,mlkit
python android/score_android.py \
  --results .runs/android-2026-11/results.jsonl \
  --output review/android/summary.json

Reproducibility

What you need Where it is
The 8,000 images and their ground truth synthetic-benchmark — dataset-by-format/manifest.jsonl carries one line per image with the effects applied and every symbol’s format, payload and quadrilateral
The app that produced the counts android/mlkit-dbr-benchmark — both SDKs behind one Bitmap, in image, video and HTTP-server modes, in the same repository as the dataset
The HTTP runner and scorer android/run_benchmark.py and android/score_android.py; the scorer reuses the dataset’s own match() and normalized_key() rules
The versions and the device com.dynamsoft:barcodereaderbundle:11.6.4000 with BF_ALL, com.google.mlkit:barcode-scanning:17.3.0, OPPO PLG110 on Android 17
git clone https://github.com/Dynamsoft/datasets-from-dynamsoft.git
cd datasets-from-dynamsoft/synthetic-benchmark/android/mlkit-dbr-benchmark
./gradlew.bat installDebug

Common Issues & Edge Cases

  • The default preset does not read every symbology. ReadBarcodes_Default uses BF_DEFAULT, which omits postal codes, MaxiCode, DotCode, MSI, Pharmacode and Micro QR. Call getSimplifiedSettings() and set barcodeFormatIds = BF_ALL before benchmarking, or the SDK will look blind on formats it supports.
  • updateSettings() reports failure through an error code, not an exception. A rejected template or an unknown format id leaves the router on its previous settings, and every capture then looks like a detection failure. Check the return value.
  • ML Kit needs pixels per module, not just pixels. Frames below roughly 640×480, or symbols under about 30 px tall, fail silently with an empty list. Upscale small crops before InputImage.fromBitmap() if your source is a video frame.
  • Tasks.await() blocks the calling thread. Run the ML Kit call on a background executor; on the UI thread it stalls the app until the model returns and can trip an ANR on slower devices.
  • The ZXing-C++ Android wrapper can abort the process. In both 3.0.2 and 3.1.1 its JNI layer raises Invalid BarcodeFormat for a decoded symbol whose id it does not know, and the VM aborts with SIGABRT — a pending JNI exception that no Java try/catch can intercept. Narrowing the reader to the 15 scored formats did not clear it: a 1,300-image pass on 3.1.1 still aborted around image 1,076. BenchmarkConfig.ENABLE_ZXING therefore defaults to false — the reader is compiled in, its home-screen entry is dimmed with the reason on tap, its result column is left out, and the HTTP endpoint answers for Dynamsoft and ML Kit unless a caller asks for decoders=dbr,mlkit,zxing on a build that enables it.
  • initLicense must finish before the first capture. A capture() that runs before the handshake completes returns an empty result rather than an error.

How to Decide Which SDK Fits Your Project

Verdict: everything above this line is measurement; this paragraph is the recommendation that follows from it. If your scanner meets one retail or QR code at a time in decent light, ML Kit is free, fast and within 2.3 to 4.8 points of Dynamsoft on UPC-E, UPC-A and EAN-13 — the shared-format table is the one to read. As soon as the workload includes postal codes, DotCode, MaxiCode, Micro QR, MSI, Pharmacode, GS1-128 or several codes in one frame, the decision is made by coverage first and accuracy second: 4,789 symbols in this dataset have no ML Kit decoder, and on the rest Dynamsoft still leads 92.5% to 85.1%.

  Best fit Poor fit
ML Kit barcode-scanning 17.3.0 Single retail, QR or Data Matrix code in controlled conditions; prototypes; apps that must avoid a commercial licence Postal, DotCode, MaxiCode, Micro QR, MSI, Pharmacode or GS1-128 labels; dense multi-code sheets; low-resolution frames
Dynamsoft Barcode Reader 11.6.4000 23-symbology coverage, multi-barcode capture, warehouse and checkout lanes, worn or low-resolution labels, configurable templates A one-off utility where the bundled Google dependency is already enough

Tested with: Android BarcodeReaderBundle 11.6.4000 with BF_ALL and ML Kit barcode-scanning:17.3.0, driven through the app’s HTTP mode on an OPPO PLG110 running Android 17. Benchmark date: November 2026. One full pass over 8,000 images; the dataset, the app and the scoring rule are all public, so the counts can be re-derived rather than taken on trust.

Google ML Kit May Be Appropriate When:

  • Cost is the primary factor and no licence is acceptable
  • The workload is one barcode at a time, in the 13 formats ML Kit implements
  • Lighting, focus and distance are controlled
  • A missed scan is a retry rather than an operational cost

Dynamsoft Barcode Reader May Be Appropriate When:

  • The workload includes postal, DotCode, MaxiCode, Micro QR, MSI, Pharmacode or GS1-128 labels
  • A frame can hold several codes, and every one of them has to come back
  • Labels are worn, curved, glossy or small in frame
  • Detection thresholds, formats and effort need to be tuned per deployment

Source Code

Get the complete sample project source code on GitHub

Want to run this code in your own project?

Get a 30-day free trial license