The problem: violations are found too late
On construction sites and in factories, hard hats and high-visibility vests are among the simplest safety rules and the most often broken. A worker takes the helmet off for a few minutes because of the heat, or walks onto site without a vest because they will "be right back". A safety supervisor cannot be everywhere, and most violations are found on periodic rounds or after an accident.
Most sites already have cameras, but they are only reviewed when something happens. The idea behind Rakaiz Raqeeb is to turn those cameras into a monitor that checks every worker's equipment all the time and alerts the supervisor the moment a violation happens.
The first decision: which model?
Off-the-shelf object detectors know what a "person" is, but not a "hard hat" or a "high-visibility vest". We had two options: a model already trained on safety-gear images, or a model that recognises objects from a text description without any training.
We found trained models published online, but we did not use them. PyTorch model files can carry code that runs when they are loaded, and loading a file from an unknown source on a device that connects to a client's cameras is a risk not worth taking. We chose two official Ultralytics models: YOLO11 to detect and track workers, and YOLOE, which we give a text description such as "hard hat" or "safety vest" and it looks for it.
The challenges we hit
We tested the system on a 31-second clip from three cameras: an equipment yard with a worker without a vest, a ground floor with three workers, and a show apartment with one worker.
1. Equipment is small in the full frame
When we checked the whole frame, the model missed a clearly visible vest in some frames. The fix was to crop each worker and check the enlarged crop. That change alone clearly improved vest detection, and made it more accurate to link a helmet or vest to its wearer: the helmet must sit on the upper part of the worker's body and the vest on their torso.
2. The vest disappears when a worker raises an arm
A worker measuring a wall with an arm raised distorts the vest in the image, and the model fails to recognise it for a few seconds even though they are wearing it. Judging each frame on its own would have raised a false alert. So the system judges the last three seconds and remembers that it saw the vest on that worker moments earlier.
3. Balancing false alarms against missed violations
With the first settings, the system raised five alerts on the clip, most of them false. We tuned three things: the judging window, the memory, and a rule that a gap must persist for two seconds before alerting. After tuning there was a single alert, and it was the real violation: the worker wearing a hard hat but no vest.
Tuning has a cost, though. In the clip, one worker has their back to the camera, wearing a white shirt and a head cover, and the system did not raise an alert. Are they in violation? From behind, even a person would struggle to say. That is where camera placement and multiple angles matter, and why the system must be tested on real footage from the site before anyone relies on it.
4. Vests come in different colours
The classic fluorescent yellow vest is easy; orange or striped ones are harder. So we give the model several descriptions of a vest, and in production we train a model on images from the client's own sites, with the colours and types they actually use.
5. Privacy
The system judges the equipment and does not identify the worker. The photo is kept only as evidence of the violation, and faces can be blurred in any video that is shown. Processing happens on a device on site, so the video never leaves it.
The result: a dashboard for the safety supervisor
- A live feed where every worker is shown in the colour of their status: compliant, checking or violating
- A prominent alert for any open violation, with the worker's photo and the camera name
- An instant compliance gauge and a violation log with time and duration
- A daily summary for every camera: number of workers, compliance rate and violations
What we learned
- Security starts with the choice of model: do not load model files from untrusted sources on a client's devices
- Check each worker individually: cropping and enlarging beats checking the whole frame
- False alarms kill the system: a supervisor who gets false alerts stops reading them, so accuracy matters more than volume
- Test on your site before promising anything: count true alerts, false alerts and missed violations yourself over ten minutes of real camera footage
Want to monitor safety on your site?
See Rakaiz Raqeeb, read about Rakaiz Nabd for visitor counting and Rakaiz Obour for gates, or get in touch and we will try the system on footage from your site.



