A deep learning-based ANPR system built and trained from scratch on a custom Indian road dataset for robust number plate detection using YOLOv8.
- 📸 Custom Dataset: 700+ images captured on Indian roads with varying lighting, occlusion, and angles.
- 🏧 Annotation: Annotated using LabelImg in YOLO format.
- 🧠 Model: YOLOv8 trained from scratch.
- 📊 High Performance: Strong evaluation metrics on the test set.
ANPR/
├── dataset/
│ ├── images/
│ ├── labels/
│ └── ...
├── runs/
│ └── detect/
├── results.csv # Evaluation metrics
├── yolov8_train.py # Training script
├── inference.py # Inference pipeline
├── requirements.txt
└── README.md
- Total Images: 700+
- Annotations: YOLO format via LabelImg
- Conditions: Includes diverse road scenarios from Indian streets
- Model: YOLOv8n / YOLOv8s
- Epochs: 100
- Image Size: 640x640
- Framework: Ultralytics YOLOv8
yolo task=detect mode=train model=yolov8n.yaml data=data.yaml epochs=100 imgsz=640
Evaluation metrics from results.csv
:
Metric | Value |
---|---|
mAP@0.5 | 0.957 |
mAP@0.5:0.95 | 0.780 |
Precision | 0.963 |
Recall | 0.947 |
F1 Score | 0.955 |
Evaluated on a separate test set.
Run inference on an image:
yolo task=detect mode=predict model=best.pt source='path/to/image.jpg'
pip install -r requirements.txt
- Python 3.8+
- OpenCV
- Ultralytics
- PyTorch
- Add OCR for license plate text recognition
- Streamlit Web UI
- Real-time video tracking support
Licensed under the MIT License.