--- license: agpl-3.0 library_name: ultralytics pipeline_tag: object-detection base_model: ultralytics/yolov8 language: - en tags: - object-detection - construction - construction-safety - construction-site-safety - site-safety - safety - safety-monitoring - hazard-detection - ppe - ppe-detection - personal-protective-equipment - hard-hat - hard-hat-detection - safety-helmet - helmet-detection - high-visibility - safety-vest - hi-vis - missing-ppe - worker-detection - person-detection - excavator - heavy-equipment - heavy-machinery - wheel-loader - dump-truck - job-site - computer-vision - yolov8 - yolo - ultralytics - onnx - onnxruntime - browser - edge-ai datasets: - roboflow-universe-projects/construction-site-safety - roboflow-100/construction-safety-gsnvb metrics: - map50 - map model-index: - name: construction-site-safety-hazards results: - task: type: object-detection dataset: type: construction-safety-merged-test name: Construction safety test set (573 images, 4 sources) split: test metrics: - type: map50 value: 0.6337 name: mAP@50 - type: map value: 0.3729 name: mAP@50-95 --- # Construction Site Safety Hazards **Ranked #1 of 10 public construction-safety detectors on Hugging Face** in a head-to-head benchmark (October 2026): core PPE mAP@50 **0.642** on a held-out dataset none of the models trained on, against 0.543 for the next best, and the strongest missing-PPE detection of any model tested. [See the comparison ↓](#comparison-with-other-hugging-face-models) > **Constructelligence is developing frontier construction-AI models.** This detector is the *lite*, open > tier — released for research and evaluation; the company's flagship production models are a separate, > larger tier (see [constructelligence.co](https://constructelligence.co)). **PPE and heavy-equipment detection for construction-site imagery.** A YOLOv8s detector that finds workers, worn and missing PPE — hard hats, hi-vis vests, gloves, goggles, safety boots — and heavy plant (excavators, wheel loaders, dump trucks) in a single pass. At 44.8 MB it runs entirely on-device, including in a web browser. ![Predictions on four held-out test images](example.jpg) Predictions on held-out test images at confidence ≥ 0.4. Green: PPE worn · Red: PPE missing · Amber: heavy plant · Outline: worker. ![How it works](figures/hazards-pipeline.png) | Rank vs public HF safety models | Test mAP@50 | Classes | Input | Runs on | |:---:|:---:|:---:|:---:|:---:| | **#1 of 10** | **0.634** (v0.1: 0.442) | 14 | 640 × 640 | PyTorch · ONNX Runtime · Web | > **Intended use.** Decision support for site teams: the model surfaces images and frames worth a closer look. It is > not safety-rated, does not replace inspection by a competent person, and must not be used as a compliance record. ## Model details | | | |---|---| | **Version** | v0.3 | | **Architecture** | YOLOv8s (Ultralytics), fine-tuned from COCO | | **Input** | RGB `1×3×640×640`, `float32` in `[0, 1]`, letterboxed with grey (114) padding | | **Output** | `1×18×anchors`: `cx, cy, w, h` in input pixels, then one score per class (apply NMS) | | **Classes** | `person`, `hardhat`, `no-hardhat`, `safety vest`, `no-safety vest`, `no-mask`, `gloves`, `safety shoes`, `excavator`, `wheel loader`, `dump truck`, `goggles`, `no-goggles`, `no-gloves` | | **Files** | `buildvision-hazards-v0.3.onnx` · `buildvision-hazards-v0.3.pt` · `predict_onnx.py` · `config.json` · `metrics.json` | | **Licence** | AGPL-3.0 (weights) · CC BY 4.0 (training data) | ## Performance Evaluated on **573 held-out images** from the test splits of 4 public construction-safety datasets, with near-duplicates of training and validation images removed. | mAP@50 | mAP@50-95 | Precision | Recall | |:---:|:---:|:---:|:---:| | **0.634** | 0.373 | 0.754 | 0.604 | ![Measured results](figures/hazards-results.png) ### By class | Class | Boxes | Precision | Recall | mAP@50 | mAP@50-95 | v0.1 mAP@50 | |---|---:|---:|---:|---:|---:|---:| | `person` | 713 | 0.874 | 0.892 | **0.908** | 0.555 | 0.807 | | `hardhat` | 547 | 0.873 | 0.861 | **0.899** | 0.468 | 0.795 | | `no-hardhat` | 126 | 0.452 | 0.381 | **0.379** | 0.143 | 0.047 | | `safety vest` | 382 | 0.827 | 0.809 | **0.860** | 0.508 | 0.708 | | `no-safety vest` | 222 | 0.635 | 0.581 | **0.522** | 0.241 | 0.368 | | `no-mask` — not detected | 2 | 1.000 | 0.000 | **0.000** | 0.000 | 0.000 | | `gloves` | 248 | 0.917 | 0.685 | **0.776** | 0.341 | 0.000 | | `safety shoes` | 268 | 0.840 | 0.616 | **0.709** | 0.399 | 0.000 | | `excavator` | 133 | 0.864 | 0.895 | **0.928** | 0.699 | 0.698 | | `wheel loader` | 46 | 1.000 | 0.909 | **0.968** | 0.785 | 0.777 | | `dump truck` | 78 | 0.849 | 0.821 | **0.888** | 0.712 | 0.666 | | `goggles` (new) | 78 | 0.821 | 0.692 | **0.751** | 0.304 | — | | `no-goggles` (new) | 67 | 0.384 | 0.254 | **0.208** | 0.045 | — | | `no-gloves` (new) | 104 | 0.214 | 0.058 | **0.074** | 0.020 | — | ### By source | Source | Images | mAP@50 | mAP@50-95 | v0.1 mAP@50 | |---|---:|---:|---:|---:| | Construction Site Safety | 34 | **0.531** | 0.337 | 0.503 | | PPE detection 1 | 101 | **0.846** | 0.505 | 0.641 | | PPE_Dectection v4 | 254 | **0.588** | 0.278 | 0.375 | | excavators-czvg9 (RF100) | 184 | **0.911** | 0.695 | 0.677 | *Evaluation notes.* Two sources label people incompletely; in their test images, people found by a stock COCO YOLOv8s (confidence ≥ 0.5) were added as `person` boxes so that correct detections are not counted as false positives. Scores reported by other PPE models use their own test sets and are not directly comparable; the head-to-head below re-runs them on the same images. ## Comparison with other Hugging Face models Nine public construction-safety / PPE detectors from the Hub, run with one protocol: same images, 640 px, confidence 0.001, NMS IoU 0.7, AP@0.5 (COCO 101-point) per class. Each model's labels were mapped onto shared classes (`Hard_hat`, `Capacete`, `helmet` → hard hat, …) and a model is scored only on classes it has. - **Held-out** — [Ultralytics Construction-PPE](https://docs.ultralytics.com/datasets/detect/construction-ppe/) validation + test splits, 284 images. Neither this model nor, as far as their cards say, any of the others trained on it. Core = mean AP of person, hard hat, no hard hat, vest (the set has no missing-vest label). - **Our test set** — the 573 images above. Core adds no-vest; *Violations* = mean AP of no-hardhat and no-vest. This set follows our labelling, so it favours this model; several others trained on Construction Site Safety, one of its sources. | Model | Params (M) | Held-out core | Held-out no-hardhat (IoU 0.5 / 0.3) | Our test core | Our test violations | CPU ms | |---|---:|---:|---:|---:|---:|---:| | **This model (v0.3)** | 11.1 | **0.642** | 0.134 / 0.352 | **0.712** | **0.450** | 138 | | [killuminati1/construction-ppe-yolov8](https://huggingface.co/killuminati1/construction-ppe-yolov8) | 11.1 | 0.543 | 0.051 / 0.130 | 0.503 | 0.179 | 142 | | [wesleymqsss/yolov8m-construction-site-safety](https://huggingface.co/wesleymqsss/yolov8m-construction-site-safety) | 25.9 | 0.515 | 0.068 / 0.120 | 0.503 | 0.158 | 287 | | [Hansung-Cho/yolov8-ppe-detection](https://huggingface.co/Hansung-Cho/yolov8-ppe-detection) | 3.0 | 0.503 | 0.058 / 0.148 | 0.482 | 0.162 | 72 | | [melihuzunoglu/ppe-detection](https://huggingface.co/melihuzunoglu/ppe-detection) | 2.6 | 0.435 | 0.071 / 0.217 | — | — | 58 | | [jashwanthpeddisetty0712/ppe-detection-yolov8m](https://huggingface.co/jashwanthpeddisetty0712/ppe-detection-yolov8m) | 25.9 | 0.345 | 0.043 / 0.313 | 0.382 | 0.233 | 303 | | [Hexmon/vyra-yolo-ppe-detection](https://huggingface.co/Hexmon/vyra-yolo-ppe-detection) | 25.9 | 0.286 | 0.049 / 0.349 | 0.361 | 0.261 | 284 | | [baskarmother/yolov8-ppe-construction](https://huggingface.co/baskarmother/yolov8-ppe-construction) | 3.0 | 0.180 | 0.120 / 0.411 | 0.120 | 0.042 | 58 | | [keremberke/yolov8m-hard-hat-detection](https://huggingface.co/keremberke/yolov8m-hard-hat-detection) | 25.9 | — | 0.088 / 0.449 | — | — | 292 | | [keremberke/yolov8m-protective-equipment-detection](https://huggingface.co/keremberke/yolov8m-protective-equipment-detection) | 25.9 | — | 0.010 / 0.010 | — | — | 355 | — = the model has no such class. CPU ms: one Apple-silicon Mac, PyTorch, 4 threads, 640 px, batch 1, median of five passes with all models timed in rotation. Hub search, October 2026; Ultralytics-format detectors with downloadable weights and construction PPE classes. - **Lead on held-out data:** +0.10 core mAP@50 over the next best (bootstrap 95% CI +0.07 to +0.13), at the same size and speed. - **Missing PPE:** 0.45 violation mAP@50 on our test set; no other model passes 0.27. - **Where it does not lead:** Construction-PPE draws `no_helmet` boxes across the eyes rather than around the head, so every model scores low there at IoU 0.5. At IoU 0.3 (head found, box style ignored) two hard-hat specialists score higher on that class: keremberke hard-hat 0.449, baskarmother 0.411, this model 0.352. ## Usage **Ultralytics** ```python from ultralytics import YOLO model = YOLO("buildvision-hazards-v0.3.pt") for box in model("site.jpg", imgsz=640, conf=0.35)[0].boxes: print(model.names[int(box.cls)], float(box.conf), box.xyxy.tolist()) ``` **ONNX Runtime** — no PyTorch required: ```bash pip install onnxruntime numpy pillow python predict_onnx.py site.jpg --out boxes.jpg ``` **Browser** — load the same ONNX file with `onnxruntime-web` (WASM). No server is involved; images never leave the device. ## Training - **Data:** Construction Site Safety, construction-safety-gsnvb (RF100), PPE detection 1, PPE_Dectection v4, excavators-czvg9 (RF100) — 7,450 training and 567 validation images, all CC BY 4.0. - **Recipe:** YOLOv8s from COCO weights at 640 px. Mosaic and mixup augmentation with a cosine learning-rate schedule. - **Label clean-up:** classes with only a handful of boxes across the corpus (barricade, dumpster, mask, mini-van, truck, safety net) were removed before training. ## Limitations - **Missing PPE is harder than worn PPE.** `no-hardhat` (0.379), `no-goggles` (0.208), `no-gloves` (0.074) trail their worn counterparts; expect missed violations and some false alarms, especially on unfamiliar sites and cameras. - **Unsupported output channels.** `no-mask` — too few training examples to learn; ignore these outputs. - **No fall protection.** Harnesses, lanyards and edge protection are not labelled in any training source. - **No zones.** Exclusion zones around plant and vehicles are not predicted; derive them downstream from the detected boxes. - **Model size.** YOLOv8s is chosen to run on-device; larger models trained on the same data did not score higher. ## FAQ **Which PPE does it detect?** Hard hats, hi-vis vests, gloves, goggles and safety boots — and, for hard hats, vests, gloves and goggles, their absence. **Which equipment?** Excavators, wheel loaders and dump trucks, plus workers (`person`). **Does it run offline?** Yes. The ONNX export runs in ONNX Runtime on CPU or in the browser with no network access. **Can it be used for compliance decisions?** No. It is a screening aid for people, not a safety system. ## Licence - **Weights — AGPL-3.0.** Trained with Ultralytics YOLOv8, whose models and derivatives are AGPL-3.0 unless covered by an Ultralytics Enterprise licence. Offering the model in a network service requires publishing that service's source. - **Data — CC BY 4.0.** Sources below. ## Attribution - **Construction Site Safety** — Roboflow Universe Projects, CC BY 4.0 — - **construction-safety-gsnvb (RF100)** — Roboflow 100, CC BY 4.0 — - **PPE detection 1** — vincentspace, CC BY 4.0 — - **PPE_Dectection v4** — himanshu-bharati, CC BY 4.0 — - **excavators-czvg9 (RF100)** — Roboflow 100, CC BY 4.0 — Person pseudo-labels in the test set come from Ultralytics YOLOv8s (COCO). Comparison benchmark only (not used for training): **Construction-PPE** — Ultralytics, AGPL-3.0 — . ## Citation ```bibtex @misc{construction-site-safety-hazards, title = {Construction Site Safety Hazards: PPE and Heavy-Equipment Detection}, author = {Constructelligence}, year = {2026}, url = {https://huggingface.co/constructelligence/construction-site-safety-hazards} } ```