7

My android app have a need to read the text in a image and I am using the Firebase ML Kit for that purpose, it works well for the text which is in standard Roman script but it completely fails to read the digits in the below font family.

enter image description here

Especially for the digits 0, 1 & 6 Firebase result gives O, i, l, L & b, since it gives alternate letters for the same digit in different test I cannot apply regex to replace those letters with digits.

I have also tried the Firebase ML Kit cloud text recognition (Google Cloud Vision) for getting those digits as it is and it do have the same problem.

So my only option left is Firebase ML Kit Custom Model and I want to know on the possibility of reading text using ML Kit Custom Model which is based on TensorFlowLite model, I am asking this because all the android ML Kit Custom Model examples I saw is only used for detecting objects and didn't see any sample for reading text using MLKit custom model anywhere.

Basically what I want is the same behaviour like Firebase offline/cloud text recognition but with a custom tensorflow lite model, is that possible? Please describe

AbuMaaiz
  • 492
  • 4
  • 19
  • 2
    Why there is down vote for this question? I don't know whats wrong in the question, I have tried to write the question in the best possible way. Is it because of grammar or lack of research effort? – AbuMaaiz Mar 14 '19 at 14:08
  • 1
    I think the downvote is for the lack of research effort. Digital Ocean made a [tutorial](https://www.digitalocean.com/community/tutorials/how-to-build-a-neural-network-to-recognize-handwritten-digits-with-tensorflow) for what you're asking. And there are [more](https://www.tensorflow.org/js/tutorials/training/handwritten_digit_cnn) and [more](https://www.tensorflow.org/tutorials) and [even more](https://kogence.com/app/docs/Digit_Recognition_Using_Tensorflow) resources available on the first result of a Google search – Arthur Attout Mar 14 '19 at 14:38
  • 5
    @ArthurAttout The OP clearly states that he tried "ML Kit cloud text recognition" and got bad results for certain digits. He is asking is there a more reliable solution. Legitimate question IMHO. – Arseny Levin Mar 14 '19 at 16:13
  • @ArthurAttout, the links you gave is useful but my question is based on FirebaseML custom model and its possibility on detecting digits using tflite model, I said that in my question too. I have modified the question for better understanding – AbuMaaiz Mar 15 '19 at 10:57
  • @m.ka, have you found any solutions? we are having the same problem. were you able to add custom font family? – Parth Bhuva Dec 23 '19 at 11:22
  • 1
    @ParthBhuva, currently there is no way to add custom font even though they are planning to implement it soon. What I am currently doing is replacing the letters with digits using regex and it works almost 70% – AbuMaaiz Dec 30 '19 at 05:57
  • @m.ka, thanks for the reply. can you please point me to the doc where you found about future implementation. – Parth Bhuva Dec 30 '19 at 07:15
  • 1
    I think I got that info when I contacted firebase support team through mail, they said its in their future plan but didn't provide any ETA – AbuMaaiz Dec 30 '19 at 09:32
  • Thanks for the info @m.ka, I really appreciate it. – Parth Bhuva Dec 30 '19 at 10:00

1 Answers1

1

Currently, it is not possible to recognize text with custom models via ML Kit. But there is a way how to do it with tensorflow.

TensorFlow examples