Search code examples
fluttermachine-learningfirebase-mlkit

Replace 0 by O in the recognition with firebase_ml_vision


I use on my flutter project the package "firebase_ml_vision", the recognition retrieves well the results but when I debug the recognition to see what it retrieves, all my data with a 0 are replaced by an O and I don't understand why?

example: "FR0010785709" is replaced by "FROO10785709".

Can someone please explain to me what's going on?


Solution

  • It's quite common for text recognition software to be confused between 0 and O, as between 1 and i/I, 8 and B and some other characters. There is nothing you can configure about the pre-built text recognition model from ML Kit to improve this.

    If you know how the text is supposed to be structured, you can sometimes fix such things in post-processing. I've done that in the past when scanning receipts, as ML Kit kept miscategorizing currency symbols. Since I knew they were currency symbols, I had a much smaller set of sensible values, so could usually figure it out from that.

    Alternatively: you could train your own model on a dataset that you have classified correctly. But honestly, that's going to be a lot of work before you start seeing improvements.