Code Monkey home page Code Monkey logo

barcode-reading-benchmark's Introduction

Barcode Reading Benchmark

A barcode reading benchmark tool based on Quasar + Vue. It can create barcode reading benchmark projects which save the test results and images in indexedDB. The benchmark can run purely in the browser.

The following SDKs are included for testing:

Extra SDKs are supported via HTTP using Barcode-Reader-Aggregator.

Online demo

Features

  • Run batch barcode decoding on an image dataset
  • Calculate metrics like reading rate, precision and average time
  • Compare the performance of different barcode reading libraries
  • Compare the performance in categories
  • Export and import of benchmark projects

How the Metrics are Calculated

  • Reading rate: correctly detected barcodes / total barcodes
  • Precision: incorrectly detected barcodes / all detected barcodes
  • Average time: total time elapsed / total files

How to Infer that a Barcode is Correctly Detected

  1. Check if there is a ground truth barcode which overlaps with the detected barcode using overlapped percent. (the area of the intersection / the area of the ground truth or the detected result which has a smaller area).
  2. Check if the barcode text is correct. If the barcode content is in raw bytes, compare the binaries. Since 2D barcodes use Reed–Solomon error correction, it is okay if some of the binaries do not match with the ground truth's (based on edit distance).

Dive into Formats

  • Barcode Detection Result

    export interface DetectionResult {
      elapsedTime:number;
      results:BarcodeResult[];
    }
    
    export interface BarcodeResult {
      barcodeFormat: string;
      barcodeText: string;
      barcodeBytes: string;
      confidence?: number;
      x1:number;
      x2:number;
      x3:number;
      x4:number;
      y1:number;
      y2:number;
      y3:number;
      y4:number;
    }

    Barcode detection result is saved in the above format in JSON with the .json extension.

  • Ground Truth

    export interface GroundTruth {
      text:string;
      x1:number;
      x2:number;
      x3:number;
      x4:number;
      y1:number;
      y2:number;
      y3:number;
      y4:number;
      attrib:Attrib;
      value_attrib:ValueAttrib;
    }
    
    export interface Attrib {
      Type:string;
    }
    
    export interface ValueAttrib {
      Mode?:string;
    }

    Ground truth is saved in the above format in JSON with the .txt extension.

  • Remote Projects

    Put the files like the following example to the dataset folder as remote projects. Users can download them to check them out locally. The files can be retrieved using the export feature.

    │  projects.json
    │
    │─ Project
            detection_result_filenames.json
            project_manifest.json
            results.zip
            [P]ISBN_18_0010.jpg
            [P]ISBN_18_0077.jpg
    

How to run the app

Install the dependencies

yarn
# or
npm install

Start the app in development mode (hot-code reloading, error reporting, etc.)

quasar dev

Build the app for production

quasar build

Customize the configuration

See Configuring quasar.config.js.

barcode-reading-benchmark's People

Contributors

tony-xlh avatar xulihang avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

library-develop

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.