This project implements an automated system for detecting helmets and number plates in video streams using computer vision techniques. It utilizes the YOLOv8 model for object detection and tracking, PaddleOCR for optical character recognition (OCR) of number plates, and Streamlit for creating an interactive dashboard to visualize the results.
- Detects "no-helmet" and "number plate" objects in real-time video.
- Tracks detected objects across frames using YOLOv8.
- Performs OCR on cropped number plate images to extract text.
- Logs detected number plates with timestamps in an Excel file.
- Provides a Streamlit dashboard to view logged data and captured images.
Python 3.10.11
Required libraries:
opencv-python (cv2)
ultralytics (for YOLOv8)
paddleocr
xlwings
torch
numpy
streamlit
pip install opencv-python ultralytics cvzone paddleocr os-sys datetime xlwings torch numpy streamlit pandas
Clone the Repository:
git clone <(https://github.com/shrihareepanchal/Helmet_Number_Plate_Detector)>
cd Helmate_Number_plate_Detection
Create a virtual environment :
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
Install the required libraries as listed above.
- Place the YOLOv8 model weights file (best.pt) in the project directory.
- Ensure a sample video file (sample.mp4) is available in the project directory.
Start the detection script:
python main.py
streamlit run streamlit_app.py
main.py: Core script for video processing, object detection, and OCR.
streamlit_app.py: Streamlit application for the dashboard.
best.pt: Pre-trained YOLOv8 model weights.
sample.mp4: Sample video file for testing.