Skip to content

About

A computer vision system using YOLOv8, OpenCV, and OCR (Tesseract/PaddleOCR) to detect helmet violations and recognize vehicle number plates from video streams. Includes a Streamlit dashboard for live analytics, violation stats, and Excel-based logging.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

Repository files navigation

Helmet & Number Plate Detection Project

Overview

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.

Features

  • 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.

Requirements

Python 3.10.11
Required libraries:
opencv-python (cv2)
ultralytics (for YOLOv8)
paddleocr
xlwings
torch
numpy
streamlit

Install dependencies using:

pip install opencv-python ultralytics cvzone paddleocr os-sys datetime xlwings torch numpy streamlit pandas

Setup

Clone the Repository:
    git clone <(https://github.com/shrihareepanchal/Helmet_Number_Plate_Detector)>
    cd Helmate_Number_plate_Detection

Prepare the Environment:

Create a virtual environment :
    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate

Install the required libraries as listed above.

Prepare Model and Video:

  • 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.

Run the Application:

Start the detection script:
    python main.py

Launch the Streamlit dashboard:

    streamlit run streamlit_app.py

File Structure

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.

About

A computer vision system using YOLOv8, OpenCV, and OCR (Tesseract/PaddleOCR) to detect helmet violations and recognize vehicle number plates from video streams. Includes a Streamlit dashboard for live analytics, violation stats, and Excel-based logging.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages