2

The Text Recognition API in Firebase Ml kit is not recognizing the digital numbers or a seven segment display numbers that i am trying to scan out from a weight scale , is there anyway to work it out ?

I tried the Dart package for firebase ml vision for flutter apps , and i used the firebaseVisionImage class and Text Recognizer class and visionText class as shown .

 // get image file
final File imageFile = File(widget.imagePath);

// create vision image from that file
final FirebaseVisionImage visionImage =
    FirebaseVisionImage.fromFile(imageFile);

// create detector index
final TextRecognizer textRecognizer =
    FirebaseVision.instance.textRecognizer();

// find text in image
final VisionText visionText =
    await textRecognizer.processImage(visionImage);

I expected to have the numbers as an output but , it's not recognized at all ,

Peter aziz
  • 131
  • 1
  • 1
  • 8

2 Answers2

2

If the ML Kit model doesn't automatically recognize the text in your image, there isn't a lot you can do to tweak it.

Instead you'll want to:

  • Check if the Cloud Vision model is better able to extract the text from your image.
  • Look into training a custom model for extracting your specific type of text.
  • Look at other dedicated text extraction packages.
Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
0

You need to process the image in this type

 final inputImage = InputImage.fromFilePath(imageFile.path);
 final RecognizedText recognizedText = await textRecognizer.processImage(inputImage);

i hope it works :)

Hasan koç
  • 51
  • 3