YOLOv5 on the Construction Site: Helmets, Heads, and Danger Zones
A practical YOLOv5 v2.x wrapper that spots missing hard hats and flags trespassers in dangerous zones, bundled with a PyQt5 GUI and dataset-merge utilities.

What it does
Smart_Construction is a YOLOv5 v2.x application tuned for construction-site safety. It detects three classes—person, head, and helmet—to identify workers missing hard hats, and it can highlight people who enter user-marked danger zones. A PyQt5 visualization tool, added in March 2021, gives operators a point-and-click interface instead of a terminal.
The interesting bit
The project’s value is in the plumbing, not the architecture. The author provides pre-trained weights for three model sizes and a merge script that augments a head-only helmet dataset with full-body person labels by running a separate detection pass and combining the results.
Key highlights
- Pre-trained weights for YOLOv5s/m/l with overall mAP@0.5 scores ranging from 0.888 to 0.906
- PyQt5-based visualization interface for running detection without command-line arguments
- Dangerous-area mode that draws red zones and only flags
persondetections inside them - ONNX and TorchScript export support via the upstream export script
- Dataset utilities to merge third-party person labels into the base Safety-Helmet-Wearing-Dataset
Caveats
- Explicitly built on YOLOv5 v2.x, an older release branch that does not include subsequent upstream improvements
- Pre-trained weights are distributed exclusively through Baidu Cloud links with Chinese-language extraction codes
- The README prominently advertises paid remote assistance for graduation and course designs, signaling a student-project audience
Verdict Worth a download if you need a Chinese-language reference for construction-site detection or a quick academic prototype. Skip it if you want a current YOLO release with internationally hosted weights.
Frequently asked
- What is PeterH0323/Smart_Construction?
- A practical YOLOv5 v2.x wrapper that spots missing hard hats and flags trespassers in dangerous zones, bundled with a PyQt5 GUI and dataset-merge utilities.
- Is Smart_Construction open source?
- Yes — PeterH0323/Smart_Construction is open source, released under the GPL-3.0 license.
- What language is Smart_Construction written in?
- PeterH0323/Smart_Construction is primarily written in Python.
- How popular is Smart_Construction?
- PeterH0323/Smart_Construction has 2.6k stars on GitHub.
- Where can I find Smart_Construction?
- PeterH0323/Smart_Construction is on GitHub at https://github.com/PeterH0323/Smart_Construction.