This project delivers a comprehensive solution for license plate detection using the state-of-the-art YOLOv8 object detection model. From dataset preparation and model training to developing a robust Flask API, this repository is your one-stop guide to implementing real-time license plate detection.
- Oriented Bounding Boxes (OBB): Handles rotated license plates with precision.
- Flask API Integration: Provides an easy-to-use web interface for detection.
- GPU-Accelerated Training: Powered by Kaggle for efficient model training.
- Visualization-Ready: Clear and insightful results showcased in a Jupyter Notebook.
- Dataset sourced from Roboflow with high-quality annotations.
- Preprocessing steps include scaling, augmentations, and proper formatting for YOLOv8.
- Trained on a Kaggle GPU environment for optimal performance.
- Model trained for 10 epochs (for better prediction we can train for more epochs).
- The best model weights (
best.pt
) are ready for deployment.
- User-Friendly Interface: Upload images via the web interface for detection.
- AI-Powered Backend: Returns:
- Images with annotated bounding boxes.
- JSON files with bounding box coordinates and class labels.
- Intuitive visualization of results through bounding boxes and JSON outputs.
- Detection results include bounding box coordinates, angles, and class labels.
See the YOLOv8 model in action below:
Example 1:
Detected rotated license plate with oriented bounding boxes.
Example 2:
License plate detected with high accuracy.
Example 3:
Detection of multiple plates within a single image.
Example 4:
Another example of a detected license plate with accurate bounding box positioning.
-
Dataset Preparation
- Downloaded and preprocessed the dataset from Roboflow.
-
Model Training
- Trained the YOLOv8 model in a Kaggle GPU environment.
- Saved the trained model weights as
best.pt
.
-
Inference
- Performed inference using the trained model on test images.
- Saved results as annotated images and bounding box coordinates and rotated angle details.
-
Flask API
- Built APIs to handle image uploads and run the YOLOv8 model for real-time inference.
git clone https://github.com/Ankitjha2202/object_detection_services.git
cd object_detection_services