TwinStack ANPR
Automatic number plate recognition for Pakistani vehicles. Upload a CCTV clip or a photo and every vehicle is detected and tracked while a plate detector and an OCR model we trained ourselves read its number plate. Readings feed a live dashboard with a searchable vehicle log, entry/exit parking sessions with fees and watchlist alerts.
- Vehicle detection and tracking with YOLO11 and ByteTrack: cars, bikes, buses and trucks keep one ID through the clip
- Plate detector trained on 1,578 photos of Pakistani plates (Punjab, Sindh, Islamabad, KP): precision 1.00, recall 0.97 on held-out photos
- OCR model fine-tuned on 1,471 hand-checked plate crops: on vehicles it never saw in training it reads 88% of plates fully correct, up from 79%
- Pakistani plate rules: two-line plates with the registration year (LEA-20-4060), suffix letters (LE-16-5471A) and look-alike characters fixed by position
- Each plate is read many times as the vehicle passes and the readings are voted on, so one blurry frame does not decide the result
- The annotated video streams to the browser while the clip is being analysed
- Vehicle log with plate crops and search, parking sessions from entry and exit gate clips, blacklist and VIP alerts
- Runs on existing CCTV cameras or uploaded footage, on a local GPU machine or in the cloud
Built with
- Computer vision
- PyTorch, YOLO11, ByteTrack, OpenCV
- OCR
- Custom plate OCR, Keras, ONNX Runtime
- Backend
- Python, FastAPI, PostgreSQL
- Frontend
- JavaScript, PWA, Web Push