YOLOv8 License Plate Detection

This project uses the YOLOv8 object detection model to detect license plates. The dataset used is Keremberke's License Plate Object Detection , and the model is trained using the Ultralytics YOLOv8 framework .

Installation

Ensure you have the required dependencies installed:

pip install datasets ultralytics opencv-python numpy pandas matplotlib

Dataset

The dataset is loaded from Hugging Face's datasets library:

from datasets import load_dataset
ds = load_dataset("keremberke/license-plate-object-detection", "full")

The dataset is split into:

  • Training Set

  • Validation Set

  • Test Set

Data Preprocessing

  • Images are extracted from the dataset and saved locally.

  • Bounding box annotations are converted into YOLO format (normalized coordinates).

  • The dataset is structured into:

dataset/
β”œβ”€β”€ images/
β”‚   β”œβ”€β”€ train/
β”‚   β”œβ”€β”€ val/
β”œβ”€β”€ labels/
β”‚   β”œβ”€β”€ train/
β”‚   β”œβ”€β”€ val/

Model Training

A pre-trained YOLOv8 model (yolov8n.pt) is fine-tuned on the dataset:

from ultralytics import YOLO

model = YOLO('yolov8n.pt')  # Load a small YOLOv8 model
results = model.train(data="dataset.yaml", epochs=75, imgsz=640, batch=16)

Training Configuration

  • Epochs : 75

  • Image Size : 640x640

  • Batch Size : 16


Downloads last month
21
Inference Providers NEW
This model is not currently available via any of the supported third-party Inference Providers, and the HF Inference API does not support ultralytics models with pipeline type object-detection

Model tree for yasirfaizahmed/license-plate-object-detection

Base model

Ultralytics/YOLOv8
Finetuned
(46)
this model

Dataset used to train yasirfaizahmed/license-plate-object-detection