Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scan Identity Cards using Google Vision API

It's possible to read Identity Cards information like name, address birthDate using Google Vision API? In the documentation, I fount something but I don't know how to use it.

https://developers.google.com/android/reference/com/google/android/gms/vision/barcode/Barcode.DriverLicense

I checked also the google samples (https://github.com/googlesamples/android-vision), but I didn't find anything related to Identity Cards scanning.

like image 895
CjStone10 Avatar asked Feb 14 '26 03:02

CjStone10


1 Answers

Yes by using the Google Vision API (TEXT_DETECTION parameter) you can scan an image, get the JSON response and loop through the textAnnotations. I built an ID Checker last month using this service to extract Name, Address, City, State, Zip Code, Expiration and Date of Birth. With lots of regex you can accomplish this with a small drawback that some Dates mistake the / with a 1, so the date would show EXP 04/2212019 or 04122/2019 instead of 04/22/2019, making it tough to get the date but otherwise works 99% of time.

like image 160
EXECUTOR brandon Avatar answered Feb 15 '26 17:02

EXECUTOR brandon



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!