- Upload Aadhar card image and get aadhar details in the response.
- Using YOLO model and Tesseract ocr
- Install packages in
venvusingrequirements.txt - Create folder
uploadsin same folder level asapp.py. - Add model file
photo.ptin same folder level asapp.py - Flask run command
python app.py.
curl --location 'http://127.0.0.1:5000/hello/'
{
"message": "Hello"
}
curl --location 'http://127.0.0.1:5000/aadhar/' \
--form 'file=@"1.jpeg"'
detectPhotosignifies if YOLO model was able to detect photo or not.- The flow works first by detecting a face - which is from the photo. Without its value as
True, the aadhar number detection flow will not work.
200 OK
{
"aadharNumber": "4909XXXXXXXX",
"detectPhoto": True,
"dob": "26/12/19XX",
"gender": "male",
"message": "Success",
"name": "Johnny Bravo"
}
- Other status codes: 400, 500