Skip to main content

Crop id card from an image using OpenCV

Project description

Detecting the National Identification Cards

You can use this project to extract information DOB (name, surname, date of birth, etc.) on the identity card. To do this, I'm broke down the problem into sub-problems as below:

  • [this project] Identify Regions of Interest (ROI) containing the required information with deep learning
  • [this project] Crop the regions identified above
  • OCR on the identified region of interest

This project can do object detection + object classification + multiple object detection all at the same time.

Use case diagram

UseCase

Sample id cards

Sample 1 Sample 2 Sample 3
Old new licence

How to Run

tested on python 3x

Requirements

  • tensorflow
  • numpy
  • opencv

to install requirements

 pip3 install -r requirements.txt

Runs the application with the default webcam.

python3 id_card_detection_camera.py

Runs the application with the image file. Default image file "test_images/image1.jpg"

python3 id_card_detection_image.py

Result

result

###For Developers

  • Version bump bumpversion --current-version 1.2.0 minor setup.py

  • Publishing to PyPi

    1.python setup.py sdist

    2.twine upload dist/* --verbose

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

id_card_extractor-1.1.3.tar.gz (48.6 MB view details)

Uploaded Source

File details

Details for the file id_card_extractor-1.1.3.tar.gz.

File metadata

  • Download URL: id_card_extractor-1.1.3.tar.gz
  • Upload date:
  • Size: 48.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.6.5

File hashes

Hashes for id_card_extractor-1.1.3.tar.gz
Algorithm Hash digest
SHA256 bd165402b373ae72bbc3c17c532ccbf6eeeb827b0849eacba1517c6a123e3b3e
MD5 5d8a068561c4800095c7bcf827c07db7
BLAKE2b-256 01bfe3d79426d7f6630b06fe1cbf378a06719effb9cccc9c3a8341b65fc7624c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page