/extract-information-from-identity-card

From identity card image, this repo detect 4 corners, align by OpenCV, then detect word in image and recognize word by Transformer OCR.

Primary LanguagePython

Extract-information-from-identity-card

Tutorial: Recognize Identity Card Tutorial

1. Install dependencies

cd complete
pip install -r requirement.txt

2. Corner Detection and Alignment

Run the above command

cd corner_detection
python inference.py --image_path=image_path

Results:

3. Text Detection

Run the above command

cd text_detection
python inference.py --image_path=image_path

Results:

3. End to end model (corner detection, text detection, ocr)

Run above command to run server

cd complete
python server.py

Final Result

{
  "id": "38138424",
  "name": "LÊ KIỀU DIỄM",
  "birth": "1989",
  "add": "Tân Hưng Tây Phú Tân Cà Mau",
  "home": "Khóm 8 Phường 8 TP Cà Mau Cà Mau"
}