Instructions to use harsh-77/ppe-detection with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ultralytics
How to use harsh-77/ppe-detection with ultralytics:
from ultralytics import YOLOvv11 model = YOLOvv11.from_pretrained("harsh-77/ppe-detection") source = 'http://images.cocodataset.org/val2017/000000039769.jpg' model.predict(source=source, save=True) - Notebooks
- Google Colab
- Kaggle
| license: agpl-3.0 | |
| library_name: ultralytics | |
| pipeline_tag: object-detection | |
| tags: | |
| - yolo | |
| - ultralytics | |
| - yolov11 | |
| - object-detection | |
| - ppe-detection | |
| - computer-vision | |
| - safety | |
| datasets: | |
| - custom | |
|  | |
| # PPE Detection with YOLOv11 | |
| This model is a specialized version of YOLOv11, fine-tuned to detect Personal Protective Equipment (PPE) in industrial and construction environments. It is designed to enhance occupational safety by monitoring the use of helmets and safety vests in real-time. | |
| ## 🚀 Quick Start (Usage) | |
| You don't need to download the weights manually. You can load and run the model directly using the Python code below: | |
| ```python | |
| from ultralytics import YOLO | |
| from huggingface_hub import hf_hub_download | |
| # Downloading and loading the model | |
| model_path = hf_hub_download(repo_id="melihuzunoglu/ppe-detection", filename="best.pt") | |
| model = YOLO(model_path) | |
| # Run inference | |
| results = model.predict(source="construction_site.jpg", conf=0.25, save=True) | |
| ``` | |
| ## ✅ Supported Classes (Labels) | |
| The model follows a hierarchical detection strategy for higher accuracy: | |
| ```python | |
| Human: Detects the person/worker as the primary anchor. | |
| Helmet: Detects safety helmets worn on the head. | |
| No-Helmet: Specifically identifies heads without safety helmets. | |
| Vest: Detects high-visibility safety vests. | |
| ``` | |
| Note: For "No-Vest" detection, the logic is based on the absence of a vest label within a detected human bounding box. | |
| ## 📊 Model Information | |
| ```python | |
| Architecture: YOLOv11 (Ultralytics) | |
| Task: Object Detection (PPE Compliance) | |
| Input Resolution: 640x640 pixels | |
| Training Strategy: Hierarchical labeling (Human as anchor) to reduce false negatives in complex backgrounds. | |
| ``` | |
| ## 🎯 Target Applications | |
| ```python | |
| Construction Sites: Real-time monitoring of helmet and vest compliance. | |
| Industrial Plants: Automated safety audits for manufacturing floors. | |
| Mining & Logistics: Ensuring worker visibility and protection in hazardous zones. | |
| Safety Training: Providing visual feedback during safety drills. | |
| ``` | |
| ## 🛠 Training Details | |
| The model was trained using the Ultralytics framework. The dataset was meticulously curated and pre-processed via Roboflow, utilizing a hierarchical approach where equipment is detected in relation to the human figure. This ensures that the model focuses on the equipment's visual features while maintaining spatial awareness of the worker. | |
| ## 👤 Developer | |
| Author: Melih Uzunoğlu [Linkedin](https://www.linkedin.com/in/melih-uzunoglu/) | |
| Framework: Ultralytics YOLOv11 | |
| Dataset Source: Roboflow | |
| ### Disclaimer | |
| This model is developed for educational and research purposes. While it provides high-accuracy detections, it should be used as a supplementary tool alongside professional safety inspections in critical workplace environments. | |