Salamtak سلامتك — PPE & site-hazard detector (YOLO26)
Fine-tuned Ultralytics YOLO26 detectors for construction-site photos. They are the trained detector inside Salamtak سلامتك ("your safety"), built at the Qai × Hugging Face Hackathon (Doha, 5–7 Nov 2026). A plain-Python rules engine (no LLM) turns detections into hazards, a 0–100 safety score and multilingual worker alerts.
- Demo Space: plitip/team-qh-091-safesite-app
- v2 (11 classes):
v2/best.pt(YOLO26s) ·v2/results.csv·v2/metrics.json· v2n (YOLO26n, faster; deployed in the Space):v2n/best.pt·v2n/results.csv·v2n/metrics.json - v1 (7 classes):
best.ptat the repo root ·results.csv·metrics.json— unchanged
Which weights the Space uses
The Space runs v2n (v2n/best.pt, YOLO26n, pinned to commit b3fac75b643c0508f54ecccb045a385ce8798221). This is a deliberate captain override of Gate 3.
The team's rule (Gate 3) lets v2 replace v1 only if helmet and no_helmet on the original v1 val images stay within 0.02 of v1 and person, vest and no_vest improve on fully labelled images (plus two app-level checks: hazard catch rate on our Qatar test photos and CPU time per photo). For the deployed v2n:
- person / vest / no_vest on fully labelled images: pass, by a wide margin (v1 0.50 / 0.56 / 0.22 → v2n 0.76 / 0.83 / 0.59).
- helmet on the v1 val images: pass (0.932 vs. v1 0.937, floor 0.917).
- no_helmet on the v1 val images: fail, 0.897 vs. the 0.908 floor (v1 0.928); the larger v2 (YOLO26s) also fails, at 0.905.
The captain overrode the failed no_helmet check: v2n trades a small drop on no_helmet (−0.031 vs. v1) for much better whole-person, vest, machinery and vehicle detection, the new harness, scaffold and utility-pole classes, and faster CPU inference. Class ids 0–6 are the same as v1, so the rules engine is unchanged. v1 (best.pt at the repo root) and v2 (v2/best.pt) stay published for comparison and rollback.
v2 — 11 classes (YOLO26s, trained 7 Nov 2026)
Classes
| id | class | meaning |
|---|---|---|
| 0 | person | a worker / person (whole body) |
| 1 | helmet | head wearing a hard hat |
| 2 | no_helmet | head without a hard hat |
| 3 | vest | person wearing a hi-vis vest |
| 4 | no_vest | person without a hi-vis vest |
| 5 | machinery | excavators, loaders, cranes and other heavy plant |
| 6 | vehicle | trucks, vans, cars on site |
| 7 | harness | fall-arrest harness worn by a worker |
| 8 | scaffold | scaffolding structure |
| 9 | crane_hook | reserved, never predicted — no usable training data was found (see below); the app finds crane hooks with open-vocabulary YOLOE instead |
| 10 | utility_pole | utility / power pole |
Ids 0–6 are identical to v1, so code written for v1 keeps working.
Results
Validation = 6,380 images, ground-truth labels only (no pseudo labels in val). Each source labels only some classes, so a class is scored only on images from sources that label it; scoring every class on every image would count correct detections of unlabelled objects as false positives. v1 was re-validated on exactly the same images.
| view | class | v1 mAP50 | v2 mAP50 |
|---|---|---|---|
| v1 val images (hh, cs, fr; 4,109 imgs) | helmet | 0.937 | 0.937 |
| no_helmet | 0.928 | 0.905 | |
| fully labelled sources (cs, fr, chd, ppe; 1,016 imgs) | person | 0.497 | 0.799 |
| vest | 0.564 | 0.844 | |
| no_vest | 0.218 | 0.620 | |
| machinery | 0.308 | 0.778 | |
| vehicle | 0.008 | 0.503 | |
| helmet | 0.613 | 0.818 | |
| no_helmet | 0.125 | 0.669 | |
| per source | harness (hrn, 152 imgs) | — | 0.879 |
| scaffold (scf, 1,250 imgs) | — | 0.990 | |
| crane_hook | — | no data | |
| utility_pole (chd, 669 imgs) | — | 0.565 |
Overall v2 mAP50 0.524, mAP50-95 0.372 on the 11-class val set (precision 0.519, recall 0.718). This is a different, harder val set than v1's, so do not compare it with v1's 0.549.
What changed: v1 learned to ignore whole people and vests because its largest source (hard-hat-detection) labels only heads. v2 adds fully labelled sources and pseudo labels, which lifts person, vest and no_vest on fully labelled images from 0.50 / 0.56 / 0.22 to 0.80 / 0.84 / 0.62, and adds harness, scaffold and utility pole. Helmet is unchanged on the original v1 val images; no_helmet drops by 0.023.
Training: YOLO26s from COCO-pretrained yolo26s.pt (not from v1), imgsz 640, automatic batch size, images cached in RAM, early stopping with patience 20: 61 epochs, best at epoch 41, on 1× NVIDIA A100 80 GB via Hugging Face Jobs — 92.6 min, ≈ $3.86. Script: scripts/train.py in the project repo.
v2n — YOLO26n (smaller and faster; the deployed model)
Same data and settings with YOLO26n on 1× NVIDIA L4: 83 epochs in the 3.5 h time budget (still improving slowly; best at epoch 82), 215 min, ≈ $2.87. Overall mAP50 0.506, mAP50-95 0.353.
| view | class | v1 (s) | v2 (s) | v2n (n) |
|---|---|---|---|---|
| v1 val images | helmet / no_helmet | 0.937 / 0.928 | 0.937 / 0.905 | 0.932 / 0.897 |
| fully labelled | person / vest / no_vest | 0.497 / 0.564 / 0.218 | 0.799 / 0.844 / 0.620 | 0.761 / 0.827 / 0.587 |
| fully labelled | machinery / vehicle | 0.308 / 0.008 | 0.778 / 0.503 | 0.748 / 0.425 |
| per source | harness / scaffold / utility_pole | — | 0.879 / 0.990 / 0.565 | 0.863 / 0.989 / 0.469 |
Training data (v2)
One merged YOLO dataset (private: plitip/team-qh-091-safesite-data-v2): 22,922 train / 6,380 val images. File names start with the source alias. Near-duplicates were removed with a perceptual hash (Hamming ≤ 4): 2,753 train images that matched a val image and 4,000 near-duplicate train images were dropped.
| alias | source | license | ground-truth classes | pseudo-labelled classes (train only) | train | val |
|---|---|---|---|---|---|---|
| hh | keremberke/hard-hat-detection | CC BY 4.0 | helmet, no_helmet | person, vest, no_vest, machinery, vehicle, utility_pole | 11,186 | 3,962 |
| cs | keremberke/construction-safety-object-detection | CC BY 4.0 | person, helmet, no_helmet, vest, no_vest, machinery, vehicle | utility_pole | 312 | 57 |
| fr | Francesco/construction-safety-gsnvb | CC (Roboflow 100) | person, helmet, no_helmet, vest, no_vest | machinery, vehicle, utility_pole | 897 | 90 |
| chd | construction-hazard-detection (Roboflow, v97) | CC BY 4.0 | person, helmet, no_helmet, vest, no_vest, machinery, vehicle, utility_pole | — | 5,820 | 669 |
| ppe | Ultralytics Construction-PPE | CC BY 4.0 | person, helmet, no_helmet, vest, no_vest, vehicle | machinery | 800 | 200 |
| hrn | helmet-harness-detection (Roboflow) | CC BY 4.0 | helmet, no_helmet, harness | person, vest, no_vest, machinery, vehicle, utility_pole | 566 | 152 |
| scf | hybrid-dataset-for-scaffold-detection (Roboflow) | CC BY 4.0 | scaffold | person, helmet, no_helmet, vest, no_vest, machinery, vehicle, utility_pole | 3,341 | 1,250 |
Box counts — train ground truth / train pseudo / val ground truth: person 13,392 / 41,950 / 1,724 · helmet 36,038 / 1,789 / 10,347 · no_helmet 12,152 / 58 / 2,901 · vest 6,866 / 6,688 / 963 · no_vest 5,077 / 23,713 / 650 · machinery 10,945 / 2,365 / 1,214 · vehicle 4,093 / 549 / 468 · harness 590 / 0 / 138 · scaffold 3,341 / 0 / 1,250 · crane_hook 0 / 0 / 0 · utility_pole 1,459 / 1,074 / 186.
Teacher model (pseudo labels): yihong1120/Construction-Hazard-Detection, file models/yolo26/pt/yolo26x.pt (AGPL-3.0). It was used only to label training images for classes a source does not label (confidence ≥ 0.5; a teacher helmet/no_helmet or vest/no_vest box overlapping a ground-truth box of the opposite class with IoU ≥ 0.3 was skipped). Ground-truth boxes were never changed, validation labels are ground truth only, and the teacher is not part of the product.
crane_hook: the planned source (MOCS) was not available in a usable form: the Roboflow copy is a ~200-image sample whose exports either omit the "hanging head" class or contain almost none. The class id is kept so ids stay stable, but it has no training data.
Caveats (v2)
- Small val sets: cs has 57 images, fr 90, hrn 152; their per-class numbers are noisy. On the v1 val images, v2's
personandvestscores look low (0.02 / 0.07) because hh images show whole people whose bodies are unlabelled, so v2's correct detections count as false positives. Use the fully labelled view for those classes. - Scaffold (0.99) and harness (0.88) come from one source each, so val images look like the training images; expect lower accuracy on new sites.
- Pseudo labels (train only) carry the teacher's mistakes; no_vest in particular is 82% pseudo-labelled in training.
- The photos are mostly not from Qatar or the Gulf. Our separate hand-labelled Qatar test photos measure that gap.
v1 — 7 classes (YOLO26s, trained 6 Nov 2026)
Weights at the repo root (best.pt, results.csv, metrics.json); unchanged by v2.
Classes
| id | class | meaning |
|---|---|---|
| 0 | person | a worker / person |
| 1 | helmet | head wearing a hard hat |
| 2 | no_helmet | head without a hard hat |
| 3 | vest | person wearing a hi-vis vest |
| 4 | no_vest | person without a hi-vis vest |
| 5 | machinery | excavators, wheel loaders |
| 6 | vehicle | dump trucks, trucks, vans |
Results
Validation split = the source datasets' own valid splits only (4,109 images), never used for training.
| metric | value |
|---|---|
| mAP50 | 0.549 |
| mAP50-95 | 0.355 |
| precision | 0.473 |
| recall | 0.648 |
Per-class mAP50 (small validation box counts mean noisy scores):
| class | mAP50 | val boxes |
|---|---|---|
| helmet | 0.939 | 9,262 |
| no_helmet | 0.928 | 2,255 |
| machinery | 0.876 | 14 |
| vehicle | 0.663 | 8 |
| vest | 0.186 | 135 |
| person | 0.171 | 237 |
| no_vest | 0.079 | 75 |
The headline use case — helmet vs. no helmet — is strong (≈ 0.93). Machinery and vehicle look good but rest on only 14 and 8 validation boxes, so treat those numbers as rough. Person and vest/no_vest are weak (see Limitations).
Training: YOLO26s from COCO-pretrained yolo26s.pt, imgsz 640, batch 32, 36 epochs (1.75 h time budget) on 1× NVIDIA L4 via Hugging Face Jobs — 107 min billed, ≈ $1.43. Script: scripts/train.py in the project repo; full curves in results.csv.
Training data and licenses (v1)
Merged into one YOLO-format dataset (private: plitip/team-qh-091-safesite-data) — 17,240 train / 4,109 val images.
| source | license | used for |
|---|---|---|
| keremberke/hard-hat-detection | CC BY 4.0 | helmet / no_helmet |
| keremberke/construction-safety-object-detection | CC BY 4.0 | person, helmet, vest, machinery, vehicle (+ "no-" classes) |
| Francesco/construction-safety-gsnvb | CC (as listed on the dataset page) | person, helmet, vest (+ "no-" classes) |
Dropped source classes: barricade, dumpster, gloves, mask, no-mask, safety net, safety shoes.
Limitations (v1)
personis weak (mAP50 0.17). The largest source, hard-hat-detection, shows many people but labels only their heads, so most people in training are unlabelled and the model learns to ignore them. Rely on helmet / no_helmet boxes (head-level) for PPE checks; a stock COCO person detector or YOLOE is better for counting people.- Vest / no_vest are weak (0.19 / 0.08) for the same reason — vests appear in hard-hat-detection photos without labels — plus few examples (~1,300 / ~900 boxes).
- Machinery and vehicle are very sparse in training data (~190 and ~100 boxes) and in validation (14 and 8 boxes), so their scores are unreliable. The Salamtak app uses open-vocabulary YOLOE for extra objects.
Intended use (v1 and v2)
- Flagging likely PPE gaps (missing helmet, vest or harness), people near machinery/vehicles, and work at height in still photos of construction sites, as input to a safety checklist reviewed by a person.
- Supervisor spot checks, toolbox talks, training material.
Not intended for: automated discipline or monitoring of individual workers, identifying people, legal or compliance decisions without human review, or any safety-critical decision on its own.
Limitations (both)
- Small, distant or heavily occluded heads are often missed; "no_helmet" can be confused with caps, scarves or hair.
- Training photos are mostly not from Qatar; lighting, heat haze, clothing (e.g. head coverings under helmets) and site layouts in the Gulf may lower accuracy.
- A detector only sees what is in frame; absence of a detection is not proof of safety.
License — AGPL-3.0
Built with Ultralytics YOLO, which is licensed under AGPL-3.0. These fine-tuned weights (v1 and v2) are released under AGPL-3.0 as well: if you use them in a network service, you must make your full source code available under the same license. Commercial use without open-sourcing requires an Ultralytics Enterprise License. The v2 pseudo labels came from an AGPL-3.0 teacher model (yihong1120/Construction-Hazard-Detection), consistent with this license. Training data is CC BY 4.0 / CC — credit the dataset authors above.
How to use
from huggingface_hub import hf_hub_download
from ultralytics import YOLO
# v2n (11 classes, the deployed model); "v2/best.pt" for v2 (YOLO26s), "best.pt" for v1 (7 classes)
weights = hf_hub_download("plitip/team-qh-091-safesite", "v2n/best.pt",
revision="b3fac75b643c0508f54ecccb045a385ce8798221")
model = YOLO(weights)
results = model("site_photo.jpg", conf=0.25)
results[0].show()