MLKit giving less accurate results than Google Vision

Viewed 74

Been testing MLKit and have noticed less accurate results when compared with Google Vision. One thing I do have enabled is languageHints for Google Vision e.g.

                    image: {
                        content: base64String
                    },

                    features: [
                        {
                            type: "TEXT_DETECTION"
                        }
                    ],
                    imageContext:
                    {
                        languageHints: ['en']
                    }

I'm thinking maybe I need to enable language hints for MLKit but no sure how. I am testing on both Android and IOS.

For MLKit the version I'm using is the latest v2 beta:

  pod 'GoogleMLKit/TextRecognition', '3.1.0'

And for Android I'm using:

    implementation 'com.google.mlkit:text-recognition:16.0.0-beta4'
2 Answers
  • 3.1.0 is a beta version for Text Recognition, where we support 4 additional languages other than Latin, so if you create instances of these 4 languages, it will return results of specified languages. Otherwise, it will just return results for Latin text.

  • If you are comparing results of en only, then there is no other input parameters that can improve the result for ML Kit.

  • Do you have a code snippet of the usage for ML Kit?

  • It will be great if there are data points that shows the difference between ML Kit and Google vision results, we can investigate more from there. Thank you!

I've noticed this too, the MLKit text extraction tool requires the picture of the text to be aligned properly, as in exactly 90 degrees upright. Whereas with Google Vision API it can even extract the text when it is inverted.

Attached picture is of a tire's serial number that can be detected by Google Vision even when inverted, it doesn't work with MLKit.

In real world application, it is not always possible to have pictures taken in the perfect alignment that MLKit requires.

enter image description here

Related