-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MLKit Vision is reading code128 and 39 barcodes poorly #32
Comments
Here is a sample barcode. |
I'd like to also make note of the poor choppy performance of the camera while reading barcodes. I'm using the same camera code with Apple's vision with no issues. |
Please re-try with the latest barcode detection model (FirebaseMLVisionBarcodeModel 0.19.0) in MLKit |
@ulukaya. I updated and I'm I'm still seeing character errors. |
Hey Chris, We upgraded the Firebase MLKit API to the standalone Google MLKit API early this year: https://developers.google.com/ml-kit I tried the the latest vision app with the given barcodes, looks like it works well with S, Q, H, could you give it a try and let us know if that would help your case as well? Thanks a lot! |
@miworking3 I will test this. |
@miworking3 Impressively done. Thanks! Closing this issue. |
@miworking3 I am reopening. I was able to have reproduce similar issue, where this barcode produced N51%%3 after several tries. |
@miworking3 I'm not sure. I'd have to study the sample more carefully. This issue is very rare. You can see in the following screen shot it plugs in the wrong value. I'm not sure why. Position of camera. Some sort of flaw in our barcode. The 2D barcodes are fine. I'm going to step through the sample, then my code. I may spend the day with it. |
Fascinating... I was using
|
Thanks for checking that! https://developers.google.com/ml-kit/vision/barcode-scanning/ios |
Seemed to really fix the errors. Not closing just yet, cause I have more testing..but it's going great so far. |
Thank you @chrisvanbuskirk for verifying this. We appreciate the data point from your side. https://developers.google.com/ml-kit/vision/barcode-scanning/ios |
Hi, have issue with 128 code barcode, when ml kit returns wrong values. I use com.google.mlkit:barcode-scanning:16.0.2 with default camera resolution settings (tried different). Also analyze in this way: |
@ruslan-poduret Thanks for reporting this, could you provide more information about the iPhone device that you found this problem? When you mentioned about "This issue happens on many Android and IPhone devices", is it reproducible with the MLKit iOS quickstart app? BTW: About the android API, I've already forwarded your message to our Android team, he might have further questions about it later. |
@miworking I'm afraid I still am seeing bad reads every 40-50 scans. Just seems for the 128's. It's very random and odd, and I can't quite pinpoint why. If it's distance. The barcode quality. Digital v. non digital, etc... There are less errors with some refactoring I have done. |
@chrisvanbuskirk Do you know the expected value of the barcode being read? If so, you can save the samplebuffer to an image right at the time when it fails, and with that information, a further investigation can be continued. Thanks! |
@miworking3 I will look into it. |
It's been a while, with previous major concerns clarified, closing this thread. Pls feel free to reopen it if new updates. Thanks! |
I have the version 16.0.2 and the same problem happens |
16.0.2 for Android SDK? |
I have the version com.google.mlkit:barcode-scanning:16.0.2 and the same problem happens |
Hi, as I mentioned, the images were from barcode-scanninig:17.0.0: |
After we exchanged Zxing for MLkit, we are having a lot of problems, analyzing the Zxing code, it seems that it had a better validation of the processed barcode |
I cannot repro your issue for https://user-images.githubusercontent.com/16478800/141014762-323d5709-937c-4a51-ab2b-cca159b29291.jpg For https://user-images.githubusercontent.com/16478800/141014875-66fc3c66-9626-4e16-a7ea-285df1d193ff.jpg, it is reproducible, but this image is cropped so that it doesn't contain the full barcode(left side is missing). Did you mean ZXing also work for cropped images to detect the full barcode? Could you share an example? It seems working properly for https://user-images.githubusercontent.com/16478800/141017954-1bdc85fe-d3a0-426d-b94a-37d5d6335196.jpg as well. We probably can improve our model to consider more for the full barcode and ignore the partial barcode in future releases. |
yes, Zxing did not processed barcodes not read completely |
By code I verified that the processing of MLKIT barcodes is 1 second |
that is, I think the processing is unsafe |
we are having a lot of problems having changed the ZXing for ML |
As a multinational company and we need the guarantee of the read codes |
Could you share an example for the same cropped image between ML Kit and ZXing? |
Our benchmark tests showed that for 1600x1200 input image, the inference time is around 100 ms. |
We're working a project which will not request camera permission for barcode scanning, if you think this sounds safer to you. |
Could clarify all the problems except this one? We're happy to hear and will try our best to resolve your problems. |
|
Zxing does not process uncompleted scanned barcodes |
I found that we have no way to access the image processing source code |
Would it be possible to have access to this image processing code? |
It's causing us a lot of production problems with the ZXing switch |
I can't reproduce the same problem with ZXing, it seems the image processing is better |
We'll work on this to see if we can improve to fix this issue. |
the problem still exists on latest version (android 17.0.2, iOS 2.2.0) |
This thread has diverted multiple times, and the latest update is not related to the original title. |
I'm reading a buffer like such:
I'm seeing errors of random characters being exchanged in code128/39 barcodes. No errors are raised. As you can see I'm checking enterprise labels. The 2D data matrix codes scan fine. However, their 1d counterparts randomly fail.
The text was updated successfully, but these errors were encountered: