MRZ_Passport_Reader_From_Image icon indicating copy to clipboard operation
MRZ_Passport_Reader_From_Image copied to clipboard

The of this study are to detect and recognize MRZ ID from one-shot passport images with Tesseract

MRZ_Passport_Reader_From_Image

The of this study are to detect and recognize MRZ ID from one-shot passport images. It includes our own model to segment mrz area. Then, we are using Tesseract OCR to recognize text.

Setup Tesseract

Now, You are ready


from mrz_reader import mrz_reader

mrz_reader=mrz_reader()
mrz_reader.load()

#If you want detect face 
mrz_reader.facedetect=True

#Before tesseract , check skewness
mrz_reader.skewness=False

#Before tesseract , delete shadows
mrz_reader.delete_shadows=True

#Before tesseract , clear background
mrz_reader.clear_background=True

mrz_dl,face=mrz_reader.predict("./example.jpg")

Example Result



After you give this image to the models , you will take this result P<GBRUNITED<KINGDOM<FIVE<<JODIE<PIPPA<<<<<<<1071857032GBR8501178F1601312<<<<<<<<<<<<<<02 as a string. This study is a basic solution . Your image which you give should be clear, and it should cover whole area.



Libraries - Refs