mlkit icon indicating copy to clipboard operation
mlkit copied to clipboard

TextRecognizer can't recognize credit card font

Open venator85 opened this issue 3 years ago • 10 comments

Hi, Text Recognition can't recognize the font used in embossed credit cards for the card number:

creditcard_digits1

tw-visa-platinum-card-498x280

I've tried with both "stable" com.google.android.gms:play-services-mlkit-text-recognition:17.0.0 and the beta v2 com.google.mlkit:text-recognition:16.0.0-beta1, but instead of the card number I just get garbage...

Is there a chance you may introduce support for it? Thanks ;)

venator85 avatar Aug 12 '21 17:08 venator85

Embossed credit card numbers are notoriously difficult to recognize. We are working on a solution specifically for credit card scanning that takes the formatting of the credit card number (typically xxxx xxxx xxxx xxxx, but not always) as well as the check digit (a kind of checksum) into account to get to reliable detection. Note that we don't have a committed timeline to release this API yet, but will update this issue when we do.

chrisito avatar Aug 18 '21 00:08 chrisito

Note that we don't have a committed timeline to release this API yet, but will update this issue when we do.

Thanks. Any chance this has been updated yet?

mcasalinuovo avatar May 07 '22 00:05 mcasalinuovo

Any updates?

aric-brown avatar Oct 31 '22 23:10 aric-brown

Hi, has this been resolved by any chance?

lyon-zas avatar Aug 08 '23 06:08 lyon-zas

I also facing issues for recognize the embossed text of debit card. I used the following approach, but result contains wrong detection and sometime replace 1 with 7, replace 5 with 6 and sometime not detecting the 1 ,7.

   implementation("com.google.mlkit:text-recognition:16.0.0")

   implementation ("com.google.firebase:firebase-ml-vision:24.0.3")
   
   
   Kindly guide me what should I do now,
   I need a custom solution for scanning the debit card I got success result in case of flat surface. 

khuwajahassan15 avatar Sep 25 '23 10:09 khuwajahassan15

I also facing issues for recognize the embossed text of debit card. I used the following approach, but result contains wrong detection and sometime replace 1 with 7, replace 5 with 6 and sometime not detecting the 1 ,7.

   implementation("com.google.mlkit:text-recognition:16.0.0")

   implementation ("com.google.firebase:firebase-ml-vision:24.0.3")
   
   
   Kindly guide me what should I do now,
   I need a custom solution for scanning the debit card I got success result in case of flat surface. 
   
   
   
   I have attached the target image and result that I am getting.
   
   

f

   Result:     implementation("com.google.mlkit:text-recognition:16.0.0")
                                                                                                1234 5578 9875 5432
                                                                                                1234
                                                                                                VALID
                                                                                                THRU
                                                                                                Bank Name
                                                                                                CARDHOLDER
                                                                                                MONTH/YEAR
                                                                                                Le/49
                                                                                                
                                                                                                
                                                                                                Result for firebase ml kit 
                                                                                                
                                                                                                1234 5578 9875 5432
                                                                                                1234
                                                                                                VALID
                                                                                                THRU
                                                                                                Bank Name
                                                                                                CARDHOLDER
                                                                                                MONTH/YEAR
                                                                                                Le/49
                                                                                                1/99
   

muhammadhassanjeenyme avatar Sep 25 '23 11:09 muhammadhassanjeenyme

How do you create a TextRecognitionProcessor with TextRecognizerOptionsInterface.CREDIT_CARD parameter? i could not find any example.

Meldryt avatar Mar 18 '24 18:03 Meldryt

Hi, I'm also facing the same issue, credit cards with non embossed numbers work fine. Do you have any update on this issue ?

mdupierreux avatar Apr 23 '24 12:04 mdupierreux

Same here. Someone knows what the difficulty is? Works like a charm on iOS and there are old Android libraries (C/C++) that do this very well.

ivanpataki avatar Apr 27 '24 09:04 ivanpataki