Abdul-Hafeez Shuaib

← All work

Side project

Document verification prototype

Checks an ID card against a selfie and decides: accept, reject or retake.

  • Python
  • FastAPI
  • OpenCV
  • TensorFlow
  • Tesseract
  • EasyOCR
  • dlib

Overview

A prototype service that takes a photo of an ID card and a selfie, and returns a decision with a reason. It was built and tested on synthetic data, supports only a sample card and has no liveness check, so it is not ready for real documents.

Inside the project

Classification

A transfer-learning model identifies the document type and asks for a retake when unsure.

Card reading

Finds and straightens the card, then reads the name, number and date of birth.

Checking the reading

A field is accepted only when its format is valid and two OCR engines agree.

Face matching

Compares the card photo with the selfie, using a threshold chosen from a public face dataset.

API

One verification endpoint with models loaded at start-up and limits on bad or large uploads.

Testing

Stress tests with glare, blur, noise and dim light. Under bad images it mostly asks for a retake rather than guessing.