This repository provides an optimized computer vision pipeline for detecting and classifying key elements in official documents, specifically Citizenship IDs and Demat accounts. By leveraging YOLO (Ultralytics), this system automates document verification with high-precision feature extraction.
- Framework: Ultralytics YOLOv8
- Engine: PyTorch 2.10.0+cu128
- Language: Python 3.12
- Environment: Ubuntu / Linux (ThinkPad E15 Gen-2)
The model underwent iterative training, moving from a baseline setup to a highly optimized version with refined datasets.
| Version | mAP@50 | Precision (P) | Recall (R) | Focus |
|---|---|---|---|---|
| Initial | 0.817 | 0.647 | 0.782 | Baseline w/ "NotDemat" noise. |
| Improved | 0.851 | 0.754 | 0.833 | Refined w/ "Unknown" class. |
| Final | 0.995 | 0.986 | 0.978 | Optimized (Dataset expansion). |
- Precision (P): The accuracy of positive predictions (how many detected IDs were actually correct).
- Recall (R): The model's ability to find all actual instances in the document.
- mAP@50: The Mean Average Precision at an Intersection over Union (IoU) threshold of 0.50.
The final iteration achieves near-perfect detection accuracy:
We are continuously expanding the system's capabilities. Support for the following documents is in development:
- 🪪 National ID Cards
- 🛂 Passports
- 🗳️ Voter Cards
