Smart KYC server which takes Aadhaar Card images as the input and processes the data for the individual.
It uses some open source project to work properly :
- Tesseract - Tesseract Open Source OCR Engine
- Text-Detection-CTPN - Text detection mainly based on ctpn model in tensorflow
Note : This Project is tested and developed on Linux (Linux Mint) and Python 3.6
- For Ubuntu and Ubuntu based Distros
sudo apt-get install tesseract-ocrFor other other OS users refer this link : Installing Tesseract for OCR
- Create a virtual environment with
Conda
conda env create --file environment.ymlNote : The name of environment in the environment.yml file is ml-old.
- Python Libraries required (Python 3.6)
easydict==1.9
tensorflow==1.10.0
numpy==1.16.4
Flask==1.1.2
Werkzeug==1.0.1
six==1.15.0
Keras==2.0.8
matplotlib==3.2.2
scipy==1.2.1
waitress==1.4.3
Cython==0.29.21
pytesseract==0.3.5
ipython==7.17.0
Pillow==7.2.0
PyYAML==5.3.1
scikit_learn==0.23.2
Details About Files In This Directory
main.py : File for starting the server
└───routes
│ └───/image/upload : processing the card image (ocr + face embeddings)
│ │
│ └───/live : Detect and Recognise face live (to be removed, video feed in separate window)
│ |
│ └───/browse : video stream from webcam
│ |
│ └───/details : renders the form page
│ |
│ └───/feed : renders the page with video stream
│ |
│ └───/ : home path, renders index page
utils.py : utils for MTCNN based face detection on Card
processing.py : utils for Aadhaar OCR
model.py : tensorflow configuration and model initiation
camera.py : code for in-browser video feed
requirements.txt : python Dependencies for this Project
environment.yml : yml file for the conda environment
Data and model files required to run this Project
data/ctpn.pb : ctpn.pb file
model/20170512-110547/ : Model folder
Download above two files and put them in the file struture as given below :
AuthX
└───data
│ └───ctpn.pb : ctpn.pb file
|
└───model
| └───20170512-110547
| | └───20170512-110547.pb
| | └───model-20170512-110547.ckpt-250000.data-00000-of-00001
| | └───model-20170512-110547.ckpt-250000.index
| | └───model-20170512-110547.meta
For Running the project, go to the project Directory and run the command below :
python main.pythis should start a server at port 5000
- Live video feed extraction
- Improve CSS/HTML
- Refactor Code
- In browser video feed