2

I have implemented MlKit Vision Barcode Scanning API in a sample app and it works correctly. I would like to put it into my prod app but for that I need an option of adding supported types for recognition. Specifically GS1 Databar types are not supported by MLKit but really common in production.

Q: How can I retrain the existing model for barcode scanning or build on top of it?

Rainmaker
  • 10,294
  • 9
  • 54
  • 89

2 Answers2

0

ML Kit Barcode scanner appears to be a proprietary model. The feature is listed as BETA so subject to the whims of Google.

This is a beta release of ML Kit for Firebase. This API might be changed in backward-incompatible ways and is not subject to any SLA or deprecation policy.

If you are looking at ZXing, see: GS1 structure data parsing using the ZXing barcode library

Morrison Chang
  • 11,691
  • 3
  • 41
  • 77
  • Thanks for the reply, I am not looking into ZXing because i would like to have the ability to reiterate the model at any point and add formats. So I would prefer to have an MLKit solution. I am aware of it being beta thanks – Rainmaker May 20 '19 at 14:58
  • 1
    Either the machine learning image processing just identifies the barcode-like image and then processes it with their own ZXIng-ish decoder: https://vbn.aau.dk/ws/portalfiles/portal/261392843/yolo_barcode.pdf or true CNN decode like: https://pdfs.semanticscholar.org/380a/e14aa6f260ee85cc062da6631e84d6ee68cd.pdf However the CNN technique would require a large labelled dataset (especially given the GS1 stacked format), – Morrison Chang May 20 '19 at 15:27
0

After reaching to Google/Firebase support here is what I found out:

Unfortunately, it wouldn't be possible for you to re-train that model to work with GS1 barcodes, since the general specifications differ from one to another.

They promised to pass it as a feature request to the development team though.

So I guess the only solution would be to create a custom model for barcode scanning to reiterate when ever needed after that.

@Morrison Chang provided some useful links for pure ML solution of this problem in the comments to his answer.

Zxing is an option but you cannot retrain the model and it is only in maintenance mode now with no support for IOS (I guess there is a thrid-part Objective-C bridge).

Rainmaker
  • 10,294
  • 9
  • 54
  • 89