Skip to content

repo-collection/extract-information-from-identity-card

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

Download weight from https://drive.google.com/file/d/1pXftFiTGzcXNqsy6jKxQF2WyiOoBmDKU/view?usp=sharing, then put into config_text_recognition folder.

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"
}

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 88.0%
  • Jupyter Notebook 11.8%
  • Other 0.2%