googlesamples / mlkit

A collection of sample apps to demonstrate how to use Google's ML Kit APIs on Android and iOS
Apache License 2.0
3.49k stars 2.91k forks source link

[Bug report] Poor result quality when running text recognition in Quickstarts/Vision #692

Closed hieunguyen2211 closed 7 months ago

hieunguyen2211 commented 1 year ago

Describe the bug When running text recognition in Quickstarts/Vision, the result's quality is really poor. With the same image, the result's quality when running on Android is far better.

To Reproduce Example Steps to reproduce the behavior in sample app:

  1. Run Quickstarts/Vision project
  2. Select Text Recognition and select an image from the gallery
  3. Click Detect button
  4. See the result

Test data

10

Result

Screen Shot 2023-07-04 at 10 24 59

Recognized text: RECHNUNG G-STAR RAW Bess hn os200 Desctt tesme Eeche nE CRRORene

Expected behavior The result's quality could be acceptable, at least the same with Android.

SDK Info: pod 'GoogleMLKit/BarcodeScanning', '3.2.0' pod 'GoogleMLKit/FaceDetection', '3.2.0' pod 'GoogleMLKit/ImageLabeling', '3.2.0' pod 'GoogleMLKit/ImageLabelingCustom', '3.2.0' pod 'GoogleMLKit/ObjectDetection', '3.2.0' pod 'GoogleMLKit/ObjectDetectionCustom', '3.2.0' pod 'GoogleMLKit/PoseDetection', '3.2.0' pod 'GoogleMLKit/PoseDetectionAccurate', '3.2.0' pod 'GoogleMLKit/SegmentationSelfie', '3.2.0' pod 'GoogleMLKit/TextRecognition', '3.2.0' pod 'GoogleMLKit/TextRecognitionChinese', '3.2.0' pod 'GoogleMLKit/TextRecognitionDevanagari', '3.2.0' pod 'GoogleMLKit/TextRecognitionJapanese', '3.2.0' pod 'GoogleMLKit/TextRecognitionKorean', '3.2.0'

Note: This also happens with pods version '4.0.0'

Smartphone:

Development Environment:

hieunguyen2211 commented 1 year ago

I also measure elapsed time for the function detectTextOnDevice in ViewController and it only takes 0.000166167 seconds. Is it really fast like that to recognize text or is there any issue here that is related to the poor result? Because that elapsed time is unrealistic.

miworking3 commented 7 months ago

Currently, ML Kit is not frequently updating the model for iOS SDKs as Android SDKs, so a discrepancy between iOS and Android implementations can be expected.