Skip to content

The objective of this project is to develop and automated license plate detection system that can accurately identify and extract license plate information from images or video feeds. This system will utilize computer vision techniques.

Notifications You must be signed in to change notification settings

FahithKRM/License-Plate-Detection-System

Repository files navigation

License Plate Detection with YOLOv8 and SORT

This project implements a license plate detection system using YOLOv8 for object detection, SORT for object tracking, and EasyOCR for optical character recognition (OCR). It detects vehicles, extracts license plates, and recognizes their text from video footage.


Features

  • Detects vehicles (cars, trucks, buses) in video frames using YOLOv8.
  • Tracks detected vehicles across frames with SORT.
  • Identifies license plates within vehicle bounding boxes.
  • Extracts text from license plates using EasyOCR.
  • Logs results, including bounding boxes, license plate text, and confidence scores, in a CSV file.

Technologies Used

  • YOLOv8: For vehicle and license plate detection.
  • SORT: For real-time object tracking.
  • EasyOCR: For extracting license plate text.
  • OpenCV: For video frame processing.
  • NumPy: For numerical computations.
  • Pandas: For structured result logging in CSV format.

Installation

Setup

  1. Clone this repository:

    https://github.com/FahithKRM/License-Plate-Detection-System.git
    cd License-Plate-Detection-System
  2. Install the required dependencies:

    pip install -r requirements.txt
  3. Download the SORT files:

  • Clone the SORT repository or download the required files from SORT GitHub.
  • Place the SORT implementation files in the sort/ directory of your project.
  1. YOLOv8 models are already included in the repository:
  • For vehicle detection: YOLOv8 COCO models.
  • For license plate detection: Custom-trained YOLOv8 weights located in the models/ folder.

Ensure Python 3.8 or above is installed. GPU is recommended for faster processing.


Directory Structure

license-plate-detection/

image

image


Run the Code

Input video Name is sample.mp4, Then can change the right name of the input files

  • Run main.py with a sample video file to generate the test.csv file:

    python main.py
  • Run the add_missing_data.py to interpolate missing values and smooth out the output for unmatched frames:

    python add_missing_data.py
  • Finally run the visualize.py with the interpolated CSV file to generate a smooth and enhanced output for license plate detection:

    python visualize.py

Results

  • Output CSV: Includes bounding boxes, license plate text, and confidence scores.
  • Annotated Frames: Video frames saved with vehicle and license plate annotations.

About

The objective of this project is to develop and automated license plate detection system that can accurately identify and extract license plate information from images or video feeds. This system will utilize computer vision techniques.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages