Skip to content

End-to-end pipeline for vehicle and license plate detection, tracking, and OCR using YOLOv8, SORT, and EasyOCR. Exports results to CSV and video.

Notifications You must be signed in to change notification settings

AdamNgazzou/Automated-License-Plate-Recognition-YOLOv8

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License Plate Detector & Recognizer 🚗🔍

A robust end-to-end pipeline for automatic vehicle and license plate detection, tracking, and recognition in videos. Built with YOLOv8, custom-trained models, SORT tracking, and OCR, this project enables accurate extraction and export of license plate data from traffic footage.

Python PyTorch License OpenCV Ultralytics YOLO EasyOCR


Features

  • Vehicle Detection: Uses YOLOv8 COCO model for robust vehicle localization.
  • License Plate Detection: Employs a custom YOLOv8 model for precise license plate detection.
  • Vehicle Tracking: Integrates SORT for multi-object tracking across frames.
  • OCR Recognition: Utilizes EasyOCR for reading license plate text from detected plates.
  • CSV Export: Outputs bounding boxes, recognized text, and scores to CSV for further analysis.

Tech Stack


Dataset & Resources


Project Structure

main.py                # Main pipeline: detection, tracking, OCR, export
utils.py               # Utility functions (OCR, formatting, helpers)
visualise.py           # Visualization and video output
models/
  license_plate_detector.pt  # Custom-trained YOLOv8 license plate model
  yolov8n.pt                # YOLOv8 COCO model
outputs/
  main.csv             # Output CSV with results
  test.csv             # Additional output
sort/                  # SORT tracking module (clone from repo)
requirements.txt       # Python dependencies
sample.mp4             # Sample input video
out.mp4                # Output visualization video

Installation

  1. Clone this repository:

    git clone github.com/AdamNgazzou/Automated-License-Plate-Recognition-YOLOv8
    cd licence_plate_detection
  2. Install Python dependencies:

    pip install -r requirements.txt
  3. Clone the SORT tracking module:

    git clone https://github.com/abewley/sort.git

Usage

Run inference on the sample video:

python main.py
  • Output CSV: Results are saved in outputs/main.csv
  • Output Video: Visualization saved as out.mp4

You can adjust input/output paths in main.py and visualise.py as needed.


Results

  • CSV Output:
    All detected vehicles, license plates, bounding boxes, and recognized text are exported to outputs/main.csv.

  • Visualization:
    Annotated video with bounding boxes and recognized plates is saved as out.mp4.

  • Sample Output:
    Sample Output


Future Improvements

  • Support for multi-language license plates
  • Real-time inference and streaming support

Contributing

Contributions, bug reports, and feature requests are welcome! Please open an issue or submit a pull request.


About

End-to-end pipeline for vehicle and license plate detection, tracking, and OCR using YOLOv8, SORT, and EasyOCR. Exports results to CSV and video.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages