A YOLOv8-medium model fine-tuned to detect Personal Protective Equipment (PPE) in images and video.
Model source
Source description
A YOLOv8-medium model fine-tuned to detect Personal Protective Equipment (PPE) in images and video.
Sources
1 sourceVerified Sep 16
Model artifacts
2 artifactsSource excerpts
2 excerpts| ID | Class | ID | Class |
|---|
| 0 | Fall-Detected | 7 | NO-Goggles |
| 1 | Gloves | 8 | NO-Hardhat |
| 2 | Goggles | 9 | NO-Mask |
| 3 | Hardhat | 10 | NO-Safety Vest |
| 4 | Ladder | 11 | Person |
| 5 | Mask | 12 | Safety Cone |
| 6 | NO-Gloves | 13 | Safety Vest |
from ultralytics import YOLO
# Load from Hugging Face
model = YOLO("hf://Hexmon/vyra-yolo-ppe-detection/best.pt")
# Run inference
results = model.predict("image.jpg", conf=0.5)
results[0].show()
Webcam:
model.predict(source=0, show=True, conf=0.5)
Video:
model.predict("video.mp4", conf=0.5, save=True)
Access detections:
results = model.predict("image.jpg", conf=0.5)
for box in results[0].boxes:
print(model.names[int(box.cls)], float(box.conf))
--- library_name: ultralytics tags: - yolov8 - object-detection - ppe-detection - helmet-detection - safety - ultralytics datasets: - roboflow/personal-protective-equipment-combined-model language: - en license: cc-by-4.0 pipeline_tag: object-detection --- # YOLOv8m PPE / Helmet Detection A YOLOv8-medium model fine-tuned to detect **Personal Protective Equipment (PPE)** in images and video. ## Classes (14) | ID | Class | ID | Class | |----|-------|----|-------| | 0 | Fall-Detected | 7 | NO-Goggles | | 1 | Gloves | 8 | NO-Hardhat | | 2 | Goggles | 9 | NO-Mask | | 3 | Hardhat | 10 | NO-Safety Vest | | 4 | Ladder | 11 | Person | | 5 | Mask | 12 | Safety Cone | | 6 | NO-Gloves | 13 | Safety Vest | ## Quick Start ```python from ultralytics import YOLO # Load from Hugging Face model = YOLO("hf://Hexmon/vyra-yolo-ppe-detection/best.pt") # Run inference results = model.predict("image.jpg", conf=0.5) results[0].show() ``` ## Training Details - **Base model:** YOLOv8m (pretrained on COCO) - **Image size:** 640 - **Epochs:** 100 - **Batch size:** 32 - **Dataset:** [PPE Combined Model v4](https://universe.roboflow.com/roboflow-universe-projects/personal-protective-equipment-combined-model/dataset/4) (CC BY 4.0) ## Usage Examples **Webcam:** ```python model.predict(source=0, show=True, conf=0.5) ``` **Video:** ```python model.predict("video.mp4", conf=0.5, save=True) ``` **Access detections:** ```python results = model.predict("image.jpg", conf=0.5) for box in results[0].boxes: print(model.names[int(box.cls)], float(box.conf)) ```
Source context: 7 downloads · 0 likes · Pipeline object-detection · Library ultralytics · Repo gauravp22/vyra-yolo-ppe-detection