This project implements Automatic Number Plate Recognition (ANPR) using the YOLOv8 model for vehicle detection and tracking and PaddleOCR for optical character recognition (OCR) of license plates. The application detects vehicles, recognizes license plates, and logs them to a CSV file.
run.py
: Main script that loads the YOLOv8 and PaddleOCR models, processes the video frame-by-frame, and annotates detected license plates.requirements.txt
: List of required packages to set up the environment.demoVideo.mp4
: Sample video file used for vehicle and license plate detection.Car-List.csv
: Output file that logs detected car IDs and corresponding license plate numbers.
- Vehicle Detection and Tracking: YOLOv8 detects vehicles in the video frames.
- License Plate OCR: PaddleOCR recognizes and extracts license plate numbers from detected vehicles.
- CSV Logging: Each unique vehicle’s license plate number is saved to
Car-List.csv
. - Annotated Video: A video (
demoVideo_out.mp4
) is generated with annotated bounding boxes and recognized license plate numbers.
- Python 3.x
Install the dependencies:
pip install -r requirements.txt
python run.py
Below are some example visualizations generated by running run.py:
-
Average processing time for each frame:
- Average processing time per frame ~0.2392 seconds which includes:
- Reading the frame from the video.
- Running YOLOv8 for object detection and tracking.
- Cropping the regions of interest and running PaddleOCR.
- Annotating the frame with bounding boxes and text.
- Average processing time per frame ~0.2392 seconds which includes:
- Reducing the processing time for each frame.
- Improve OCR accuracy for license plates in challenging environments.
- Extend the tracking to handle multiple vehicles with overlapping paths.
- Integrate real-time camera feeds instead of processing static video files.
- YOLOv8 - A state-of-the-art object detection model used for vehicle detection in this project.
- PaddleOCR - A powerful OCR tool utilized for recognizing license plates.
- Original video (demoVideo.mp4) from YouTube: YouTube Video Link.