afrozchakure / Aadhar-OCR

This is a repository for Aadhar OCR 💳
GNU General Public License v3.0
6 stars 2 forks source link

Describe model in terms of steps and execution #5

Open afrozchakure opened 4 years ago

afrozchakure commented 4 years ago

Structure and Usage

Directories:

src-
    which contains code files       
testimages -
    which contains testing images
result - 
    it contains JSON object file which contains extracted information

Usage:

python id_card_detail_extract.py 
Output will be JSON object name

Steps:

  1. First, our Faster RCNN model tries to Identity Regions of Interest (ROI) containing the required information with deep learning.
  2. If a card is detected it creates a bounding box around it and crops that part of the image.
  3. That cropped image is then fed into our OpenCV and pytesseract model where we perform text extraction.
  4. Our model extracts information such as Name, Gender, Mobile No, UID and Aadhar no. from the image.
  5. The Extracted information is then printed and fed into a JSON file, where it is saved.

Model Accuracy and Performace:

  1. The accuracy of our model mostly depends on the quality of the image as well as the orientation. (The model presently fails to extract information from tilted or inverted image)
  2. The Faster RCNN model is able to achieve accuracy of more than 90% for detecting a card in the image but also makes the process a bit slower.
  3. But, For extracting Text from the Image the model needs to be customized as per the nature of different cards like Aadhar Card, Driving License, Pan Card, etc.

(The above steps were implemented for extracting Information from Aadhar Card and the model works well for it)