Skip to content

This repository contains a Python script that uses the YOLO (You Only Look Once) object detection algorithm to detect various classes of objects related to personal protective equipment (PPE) in a video or webcam feed.

Notifications You must be signed in to change notification settings

its-kind-of/PPE-Detection-YOLO

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YOLO Object Detection with PPE (Personal Protective Equipment) Detection

This is a Python script that uses the YOLO (You Only Look Once) object detection algorithm to detect various classes of objects in a video or webcam feed. Specifically, it focuses on detecting Personal Protective Equipment (PPE) such as hardhats, masks, safety vests, safety cones, machinery, and vehicles.

Construction Site Safety: YOLO Object Detection with PPE (Personal Protective Equipment) Detection

This is a Python script that uses the YOLO (You Only Look Once) object detection algorithm to detect various classes of objects related to construction site safety in a video or webcam feed. Specifically, it focuses on detecting Personal Protective Equipment (PPE) such as hardhats, masks, safety vests, safety cones, machinery, and vehicles.

Requirements

  • Python 3.x
  • ultralytics library
  • cv2 (OpenCV) library
  • cvzone library
  • Pre-trained YOLO model file (ppe-50.pt)
  • Video file or webcam for input

Installation

  1. Clone the repository or download the code files.
  2. Install the required Python libraries using pip:

pip install ultralytics pip install opencv-python pip install cvzone

markdown Copy code

  1. Download the pre-trained YOLO model file (ppe-50.pt) and place it in the same directory as the script.

Usage

  1. Open the script in a Python IDE or text editor.
  2. Modify the path of the video file or uncomment the webcam-related lines if you want to use the webcam instead.
  3. Run the script.

Training

The YOLO model used in this project has been trained with fifty epochs using a dataset specifically curated for construction site safety. The training process involved feeding the model with annotated images of construction sites, ensuring the model learns to accurately detect and classify various safety-related objects.

Output

The script will open a window showing the input video or webcam feed. It will draw bounding boxes around the detected objects and display the confidence and class name for each detected object using the cvzone library.

License

MIT License

Feel free to use and modify this code for your own projects.

Author

Nikhil Shendge

Acknowledgments

Object Detection with PPE

About

This repository contains a Python script that uses the YOLO (You Only Look Once) object detection algorithm to detect various classes of objects related to personal protective equipment (PPE) in a video or webcam feed.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages