Computer vision

Construction safety monitor

Per-worker PPE checks from a camera, and LiDAR danger-zone alerts around a machine.

Bird's-eye LiDAR view with coloured zones beside the front camera

The problem

A construction site needs two different safety checks: is each worker wearing a hard hat and vest, and is anyone standing too close to a working machine. The first is a camera problem and the second a LiDAR one. Both have to answer per person, and an alert is only useful if you can tell why it fired.

What I built

  1. Fine-tuned YOLO11n on 10 PPE classes, then wrote rules that attach hard hats and vests to the person wearing them and flag workers with a violation.
  2. Built a classical LiDAR pipeline: crop and voxel grid, RANSAC ground removal seeded with the lowest point of each 1 m cell, DBSCAN, and gradient-boosted trees on 14 cluster features to pick out people.
  3. Raised red (3 m) and amber (6 m) alerts around the machine with a debounce. Parameters were chosen on 6 Argoverse 2 logs and tested once on 6 others.
  4. Exported the PPE detector to ONNX and CoreML, re-scored every file, and ported the post-processing to JavaScript so a 3.3 MB INT8 model runs in the browser.

Results

PPE checks on the Roboflow test split, LiDAR on 6 held-out Argoverse 2 logs (192 sweeps).
CheckDataResult
PPE mAP@0.5All 82 test images0.713
PPE mAP@0.540 clean test images0.671
Violation flaggingPPE test split0.97 precision, 0.68 recall
LiDAR person F1, hand-written rules192 sweeps0.406
LiDAR person F1, boosted trees192 sweeps0.626
Red-zone alerts18 occupied frames1.00 precision, 17/18 recall

What the results show

  • Half of the shipped test images come from videos that also appear in training. On the clean subset mAP@0.5 drops from 0.713 to 0.671, which is the leakage effect.
  • Plain RANSAC fit a band through the walls in more than half the sweeps (median error 1.2 m). Seeding it from the lowest points brought that to 7 cm and raised cluster recall from 0.61 to 0.83.
  • LiDAR recall is limited by clustering, not the classifier: 16 % of people never get a cluster of their own because they merge with a pole, a wall or another person.
  • INT8 costs about 0.01 mAP@0.5 and one caught violation, and the browser pipeline returns exactly Python's boxes on the 82 test images.

Limitations

  • Argoverse 2 is a car in city traffic, not a construction site, so scaffolding and rebar are untested. The sensor vehicle stands in for the machine.
  • Only 18 frames have someone in the red zone, so the recall interval is wide (0.74–0.99).
  • Violation recall is 0.68. Most misses are workers the detector didn't find at all.

Full results, commands and figures are in the repository README.