Code Monkey home page Code Monkey logo

Comments (53)

chrisvanbuskirk avatar chrisvanbuskirk commented on May 18, 2024

MMS485Z5 Laser - ALS.pdf

Here is a sample barcode.

from mlkit.

chrisvanbuskirk avatar chrisvanbuskirk commented on May 18, 2024

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.

from mlkit.

ulukaya avatar ulukaya commented on May 18, 2024

Please re-try with the latest barcode detection model (FirebaseMLVisionBarcodeModel 0.19.0) in MLKit

from mlkit.

chrisvanbuskirk avatar chrisvanbuskirk commented on May 18, 2024

@ulukaya. I updated and I'm I'm still seeing character errors.

from mlkit.

miworking3 avatar miworking3 commented on May 18, 2024

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?
H
S
Q

Thanks a lot!
Julie from MLKit team

from mlkit.

chrisvanbuskirk avatar chrisvanbuskirk commented on May 18, 2024

@miworking3 I will test this.

from mlkit.

chrisvanbuskirk avatar chrisvanbuskirk commented on May 18, 2024

@miworking3 Impressively done. Thanks! Closing this issue.

from mlkit.

chrisvanbuskirk avatar chrisvanbuskirk commented on May 18, 2024

@miworking3 I am reopening. I was able to have reproduce similar issue, where this barcode produced N51%%3 after several tries.

Screen Shot 2020-08-05 at 1 27 42 PM

from mlkit.

miworking3 avatar miworking3 commented on May 18, 2024

Could you help me to reproduce it with the MLKit quickstart app?

I tried to move the camera off and on several times, the result looks consistent to me.
barcode

from mlkit.

chrisvanbuskirk avatar chrisvanbuskirk commented on May 18, 2024

@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.

Screenshot 2020-08-05 at 10 14 18 AM

from mlkit.

chrisvanbuskirk avatar chrisvanbuskirk commented on May 18, 2024

@miworking3

Fascinating...

I was using

barcodeDetector.process(visionImage) { (barcodes, error) in
...and changed to method in the sample and am not seeing the problem.

barcodes = try barcodeScanner.results(in: visionImage)
I'm going to do even more testing. The handler seems to have problems.

from mlkit.

miworking3 avatar miworking3 commented on May 18, 2024

Thanks for checking that!
Yes, for the realtime video frames, we would recommend to use the synchronous API results(in:), and there are also other tips for the videos that might be helpful:
For processing video frames, use the results(in:) synchronous API of the detector. Call this method from the AVCaptureVideoDataOutputSampleBufferDelegate's captureOutput(_, didOutput:from:) function to synchronously get results from the given video frame. Keep AVCaptureVideoDataOutput's alwaysDiscardsLateVideoFrames as true to throttle calls to the detector. If a new video frame becomes available while the detector is running, it will be dropped.

https://developers.google.com/ml-kit/vision/barcode-scanning/ios

from mlkit.

chrisvanbuskirk avatar chrisvanbuskirk commented on May 18, 2024

@miworking3

self.session.sessionPreset = .hd1280x720

Seemed to really fix the errors. Not closing just yet, cause I have more testing..but it's going great so far.

from mlkit.

miworking3 avatar miworking3 commented on May 18, 2024

Thank you @chrisvanbuskirk for verifying this. We appreciate the data point from your side.
Yes, the preset can affect the results, and 1280x720 is a recommended setting by our doc as well:
The named capture session presets—AVCaptureSessionPresetDefault, AVCaptureSessionPresetLow, AVCaptureSessionPresetMedium, and so on)—are not recommended, however, as they can map to unsuitable resolutions on some devices. Instead, use the specific presets such as AVCaptureSessionPreset1280x720.

https://developers.google.com/ml-kit/vision/barcode-scanning/ios

from mlkit.

ruslan-podurets avatar ruslan-podurets commented on May 18, 2024

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:
val mediaImage = imageProxy.image
val image = InputImage.fromMediaImage(mediaImage, imageProxy.imageInfo.rotationDegrees)
scanner.process(image)
This issue happens on many Android and IPhone devices. F.e HTC U11.
Ussually kit returns wrong short text of numbers like "15771449", but sometimes valid long text: "1076839827TanCarol Windell A4030052420".
img url: https://ibb.co/yh3DJFT

from mlkit.

miworking3 avatar miworking3 commented on May 18, 2024

@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.

from mlkit.

chrisvanbuskirk avatar chrisvanbuskirk commented on May 18, 2024

@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.

from mlkit.

miworking3 avatar miworking3 commented on May 18, 2024

@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!

from mlkit.

chrisvanbuskirk avatar chrisvanbuskirk commented on May 18, 2024

@miworking3 I will look into it.

from mlkit.

miworking3 avatar miworking3 commented on May 18, 2024

It's been a while, with previous major concerns clarified, closing this thread. Pls feel free to reopen it if new updates. Thanks!

from mlkit.

felipetce avatar felipetce commented on May 18, 2024

I have the version 16.0.2 and the same problem happens

from mlkit.

miworking3 avatar miworking3 commented on May 18, 2024

16.0.2 for Android SDK?

from mlkit.

felipetce avatar felipetce commented on May 18, 2024

I have the version com.google.mlkit:barcode-scanning:16.0.2 and the same problem happens

from mlkit.

miworking3 avatar miworking3 commented on May 18, 2024

I have the version com.google.mlkit:barcode-scanning:16.0.2 and the same problem happens

Could you provide more info about the problem? If there is a sample image that was poorly read, we can take a further look into it.

from mlkit.

felipetce avatar felipetce commented on May 18, 2024

I have the version com.google.mlkit:barcode-scanning:16.0.2 and the same problem happens

Could you provide more info about the problem? If there is a sample image that was poorly read, we can take a further look into it.

https://github.com/googlesamples/mlkit/tree/master/android/vision-quickstart
barcode_com google mlkit vision demo

https://github.com/googlesamples/mlkit/tree/master/android/material-showcase
barcode_com google mlkit md

from mlkit.

miworking3 avatar miworking3 commented on May 18, 2024

Looks like the left part of the barcode is not detected, wonder if it happens because of the angle, do you mind uploading the original photo that was being tested?

from mlkit.

felipetce avatar felipetce commented on May 18, 2024

Looks like the left part of the barcode is not detected, wonder if it happens because of the angle, do you mind uploading the original photo that was being tested?

I send the photo, when we used ZXing, the barcode was processed when it fully validated, but now it is processing only a part of the barcode regardless of the angle:

seals

I reproduced a case now that I was reading code 74882746 and code 09844010 was processed
image

from mlkit.

miworking3 avatar miworking3 commented on May 18, 2024

Does it work if you upgrade the barcode to 16.2.1?
image

from mlkit.

felipetce avatar felipetce commented on May 18, 2024

Does it work if you upgrade the barcode to 16.2.1?

I performed the tests with the projects:

https://github.com/googlesamples/mlkit/tree/master/android/vision-quickstart
https://github.com/googlesamples/mlkit/tree/master/android/material-showcase

who have the version:
image

from mlkit.

felipetce avatar felipetce commented on May 18, 2024

Don't have a way to ensure that the barcode is valid, and is reading completely? We had no problems with ZXing

from mlkit.

SilverDestiny avatar SilverDestiny commented on May 18, 2024

Hi,

I tried com.google.mlkit:barcode-scanninig:17.0.0 and com.google.mlkit:barcode-scanninig:16.2.0 using https://github.com/googlesamples/mlkit/tree/master/android/vision-quickstart and it seems working well to detect the full barcode in the image.

com.google.mlkit:barcode-scanninig:16.0.1 may have the issue as it is an older version/barcode model. Could you verify the new versions work well for the image?

from mlkit.

felipetce avatar felipetce commented on May 18, 2024

Hi,

I tried com.google.mlkit:barcode-scanninig:17.0.0 and com.google.mlkit:barcode-scanninig:16.2.0 using https://github.com/googlesamples/mlkit/tree/master/android/vision-quickstart and it seems working well to detect the full barcode in the image.

com.google.mlkit:barcode-scanninig:16.0.1 may have the issue as it is an older version/barcode model. Could you verify the new versions work well for the image?

Hi, as I mentioned, the images were from barcode-scanninig:17.0.0:

image

barcode_com google mlkit vision demo

barcode_com google mlkit md

from mlkit.

felipetce avatar felipetce commented on May 18, 2024

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

from mlkit.

felipetce avatar felipetce commented on May 18, 2024

ZXing
zxing
ng

from mlkit.

SilverDestiny avatar SilverDestiny commented on May 18, 2024

I cannot repro your issue for https://user-images.githubusercontent.com/16478800/141014762-323d5709-937c-4a51-ab2b-cca159b29291.jpg
It seems consistently working for me.

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.

from mlkit.

felipetce avatar felipetce commented on May 18, 2024

I cannot repro your issue for https://user-images.githubusercontent.com/16478800/141014762-323d5709-937c-4a51-ab2b-cca159b29291.jpg It seems consistently working for me.

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

from mlkit.

felipetce avatar felipetce commented on May 18, 2024

I cannot repro your issue for https://user-images.githubusercontent.com/16478800/141014762-323d5709-937c-4a51-ab2b-cca159b29291.jpg It seems consistently working for me.
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

from mlkit.

felipetce avatar felipetce commented on May 18, 2024

I cannot repro your issue for https://user-images.githubusercontent.com/16478800/141014762-323d5709-937c-4a51-ab2b-cca159b29291.jpg It seems consistently working for me.
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

from mlkit.

felipetce avatar felipetce commented on May 18, 2024

I cannot repro your issue for https://user-images.githubusercontent.com/16478800/141014762-323d5709-937c-4a51-ab2b-cca159b29291.jpg It seems consistently working for me.
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

from mlkit.

felipetce avatar felipetce commented on May 18, 2024

I cannot repro your issue for https://user-images.githubusercontent.com/16478800/141014762-323d5709-937c-4a51-ab2b-cca159b29291.jpg It seems consistently working for me.
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

from mlkit.

SilverDestiny avatar SilverDestiny commented on May 18, 2024

I cannot repro your issue for https://user-images.githubusercontent.com/16478800/141014762-323d5709-937c-4a51-ab2b-cca159b29291.jpg It seems consistently working for me.
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

Could you share an example for the same cropped image between ML Kit and ZXing?

from mlkit.

SilverDestiny avatar SilverDestiny commented on May 18, 2024

I cannot repro your issue for https://user-images.githubusercontent.com/16478800/141014762-323d5709-937c-4a51-ab2b-cca159b29291.jpg It seems consistently working for me.
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

Our benchmark tests showed that for 1600x1200 input image, the inference time is around 100 ms.
The inference time depends on the input image size.

from mlkit.

SilverDestiny avatar SilverDestiny commented on May 18, 2024

I cannot repro your issue for https://user-images.githubusercontent.com/16478800/141014762-323d5709-937c-4a51-ab2b-cca159b29291.jpg It seems consistently working for me.
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're working a project which will not request camera permission for barcode scanning, if you think this sounds safer to you.
It will be released soon next year.

from mlkit.

SilverDestiny avatar SilverDestiny commented on May 18, 2024

I cannot repro your issue for https://user-images.githubusercontent.com/16478800/141014762-323d5709-937c-4a51-ab2b-cca159b29291.jpg It seems consistently working for me.
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

Could clarify all the problems except this one? We're happy to hear and will try our best to resolve your problems.

from mlkit.

felipetce avatar felipetce commented on May 18, 2024

I cannot repro your issue for https://user-images.githubusercontent.com/16478800/141014762-323d5709-937c-4a51-ab2b-cca159b29291.jpg It seems consistently working for me.
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

Could you share an example for the same cropped image between ML Kit and ZXing?

from mlkit.

felipetce avatar felipetce commented on May 18, 2024

Zxing does not process uncompleted scanned barcodes

from mlkit.

felipetce avatar felipetce commented on May 18, 2024

I found that we have no way to access the image processing source code

from mlkit.

felipetce avatar felipetce commented on May 18, 2024

Would it be possible to have access to this image processing code?

from mlkit.

felipetce avatar felipetce commented on May 18, 2024

It's causing us a lot of production problems with the ZXing switch

from mlkit.

felipetce avatar felipetce commented on May 18, 2024

I can't reproduce the same problem with ZXing, it seems the image processing is better

from mlkit.

SilverDestiny avatar SilverDestiny commented on May 18, 2024

Zxing does not process uncompleted scanned barcodes

We'll work on this to see if we can improve to fix this issue.

from mlkit.

wsliaw avatar wsliaw commented on May 18, 2024

the problem still exists on latest version (android 17.0.2, iOS 2.2.0)
should we reopen it, until not process uncompleted scanned barcodes is implement?
thanks 🙏

from mlkit.

miworking3 avatar miworking3 commented on May 18, 2024

This thread has diverted multiple times, and the latest update is not related to the original title.
Please open a new request here with your request clarified, and we will look further into them ,thanks.

from mlkit.

Related Issues (20)

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.