Flutter mlkit Arabic Text Detector

后端 未结 2 826
轻奢々
轻奢々 2021-01-23 09:33

Hi im using flutter mlkit with firebase to pick up text from image, everything is ok if the language is English , my problem when the text in image is Arabic , the Text Detector

相关标签:
2条回答
  • 2021-01-23 10:17

    According to the documentation the on-device models of ML Kit

    can recognize text in any Latin-based character set.

    So if you're using the on-device models they won't work with Arabic text as in your screenshots.

    One alternative to recognize other character sets is to use Firebase's cloud-based machine learning model for text recognition.

    0 讨论(0)
  • 2021-01-23 10:26

    With Firbase Vision add this

        FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(bitmap);
        FirebaseVisionCloudTextRecognizerOptions options = new FirebaseVisionCloudTextRecognizerOptions.Builder()
                .setLanguageHints(Arrays.asList("en", "ar", "hi"))
                .build();
    

    you need to define any language for example arabic "ar" and so on the most important thing is to go with cloud recognition and have your key on firebase cloud consol then use it in your app

    arabic language work only with cloud no offline (on device)

    regards

    0 讨论(0)
提交回复
热议问题