Skip to content

YOLO-based computer vision project for real-time detection of helmets and vests (PPE) in video footage using OpenCV and cvzone

Notifications You must be signed in to change notification settings

chanupadeshan/PPE-DETECTION

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PPE Detection with YOLO

This project detects Personal Protective Equipment (PPE) in videos using a YOLO model and OpenCV.

Dataset

Download the dataset from the above link and prepare your training data as needed.

Requirements

Install dependencies with:

pip install ultralytics opencv-python cvzone numpy

Usage

  1. Download and extract the dataset from the Kaggle link above.
  2. Place your video file in the video/ directory (e.g., video/ppe-3-1.mp4).
  3. Make sure your trained YOLO model weights are in the correct path (e.g., runs/detect/train2/weights/best.pt).
  4. Edit PPE.py if you want to change the video or model path.
  5. Run the detection script:
python PPE.py
  • The script will display the video with bounding boxes and labels for detected PPE items.
  • Press q to quit the video window.

Notes

  • If you see errors about missing modules, please make sure you have activated the correct Python environment and installed all requirements.
  • If you see errors about missing files, check that the video and model paths in PPE.py are correct.

Project Structure

PPE detection/
├── PPE.py
├── video/
│   └── ppe-3-1.mp4
├── runs/
│   └── detect/
│       └── train2/
│           └── weights/
│               └── best.pt
├── README.md

About

YOLO-based computer vision project for real-time detection of helmets and vests (PPE) in video footage using OpenCV and cvzone

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages