Solo project: model integration, API, frontend, deployment
When
2026
Status
Live, with the API on Render and the web client on Vercel.
aadhaar-mask-detector.vercel.app
Context
The problem
Aadhaar cards are routinely shared as ID proof with the full 12-digit number exposed. Masking it by hand is slow and easy to get wrong.
Solution
What I built
A FastAPI service that runs a YOLOv8 model trained to find the number, masks it with OpenCV and returns the result to a drag-and-drop web client. The API is containerised with Docker and runs on Render; the frontend is on Vercel.
Architecture
How it fits together
Browser
Upload
drag and drop · JPEG / PNG
FastAPI
POST /mask
validation · CORS
Detect & read
YOLOv8
imgsz 320 · conf 0.3
Tesseract OCR
date of birth · gender
Mask & return
OpenCV
first 8 digits masked
JSON response
base64 image + fields
The masking pipeline, from upload to response.
Engineering
Key engineering work
Detection with YOLOv8 (Ultralytics on CPU PyTorch) at 320 px input and a 0.3 confidence threshold, sized for a CPU-only host.
Masking with OpenCV: the first eight digits are covered with the card's sampled background colour and replaced with XXXX XXXX, leaving the last four readable.
Tesseract OCR plus regex parsing to extract date of birth and gender from the card text.
FastAPI upload endpoint with CORS, invalid-image handling and a JSON response carrying the masked image as base64.
Deployment: Dockerfile and a Render blueprint (render.yaml) for the API; static frontend on Vercel.
Technology
Stack
Python
FastAPI
YOLOv8
PyTorch
OpenCV
Tesseract OCR
Docker
Render
Vercel
JavaScript
Status
Where it stands
Live, with the API on Render and the web client on Vercel.