Skip to content

Barcode Reading Performance Test/Benchmark Tool for Various SDKs and Libraries.

Notifications You must be signed in to change notification settings

xulihang/Barcode-Reading-Performance-Test

Repository files navigation

Barcode Reading Performance Test Tool

This is a benchmark tool to test the performance of different barcode reading SDKs. It is designed to test a dataset of barcode images with ground truth. It uses a B/S architecture with Python Flask as its backend.

SDKs included:

  1. Dynamsoft Barcode Reader
  2. Scandit
  3. Zxing-cpp
  4. Zbar
  5. EAN-13 Reader
  6. OpenCV 1D Reader
  7. ZXing
  8. OpenCV Wechat QR Detector
  9. Boofcv
  10. Accusoft BarcodeXpress
  11. Aspose.Barcode
  12. Google ML Kit
  13. Apple Vision Framework

There is also a JavaScript version which runs purely in the browser: https://github.com/tony-xlh/barcode-reading-benchmark

Installation

pip install -r requirements.txt

Optional:

  • Integration using ZeroMQ

    Some barcode reading SDKs don't provide a Python library. For such cases, we can create a command line tool using the provided SDKs and communicate with the server with ZeroMQ.

    This is how Scandit, Accusoft and ZXing are integrated. You can see the example here: https://github.com/xulihang/BarcodeReader_CommandLine/

    You have to put the commandline executive files under the commandline folder.

  • Integration using HTTP

    For mobile SDKs, we can run an HTTP server on the phone and make HTTP requests for decoding. The app's source code: https://github.com/xulihang/Mobile-Barcode-SDK-Aggregator.

    The app can run on a simulator/emulator for a better performance.

How to Use

  1. Start the server.

    flask run
    

    or:

    python app.py
    
  2. Visit http://127.0.0.1:5000/. Specify the path of the dataset's folder and create a session.

    The folder should have the images and the txt files which contain the ground truth in JSON format.

    An example of the ground truth file:

    [{"attrib": {"Type": "EAN13"}, "text": "9785699128013", "value_attrib": {}}]

    Every session has a unique ID. We can check them out later with its ID. Previous sessions will be listed on the homepage.

    You can also assign a name to a session.

  3. You will be directed to a session page where you can start decoding with a specified SDK and see the results.

    There are several metrics: accuracy, precision, elapsed time, average time, etc.

    You can also click the image's link to check out the image. Detected barcodes will be marked out in green polygons.

    PS: If the ground truth file does not exist and the SDK detected barcodes, the detected one will be considered as correct. If the ground truth is provided, the program will examine whether the ground truth exists in the barcode decoding results.

  4. You can compare the results in the comparison page.

    You can list images detected/undetected by some SDK and filter the results. It can also draw a comparison chart.

Barcode Datasets

There are some existing public datasets available. Scripts to generate ground truth files are provided in the utils folder of this repo.

Related

Blogs

About

Barcode Reading Performance Test/Benchmark Tool for Various SDKs and Libraries.

Resources

Stars

Watchers

Forks

Packages

No packages published