Manufacturing & Industrial Vision// diagnostic

Wearing a hard hat and still flagged: tracing a false PPE violation

In short

Open the evidence clip and answer one question before anything else: is the head visible in the frames that raised the flag? If it is not, the cause is occlusion or resolution. If it is, and the headwear is plainly there, the model was never taught that kind of headwear. If the person had no business being judged at all, the zone rule is wrong. Three branches, three unrelated fixes.

Key takeaways

  • The evidence clip answers this in about 30 seconds. Without one, every diagnosis is a guess about a frame nobody kept.
  • Measure head-box height in source pixels across 20 false flags and 20 correct ones. If the false ones cluster low, it is resolution.
  • A 1920x1080 frame squeezed into a 320x320 inference input loses 6x horizontally. A distant head becomes 4 pixels.
  • Bump caps, welding hoods, winter liners and headwear worn under a helmet are classes, not edge cases. Name them before labelling.
  • A rule applied to a walkway or an office in frame produces flags that are technically correct and organisationally useless.

A worker in a helmet gets flagged for not wearing one. Before anyone touches the model, open the evidence clip attached to the event and answer a single question: in the frames that produced the flag, is the head visible at all? If it is not — turned away, behind a machine, cropped, or four pixels tall — the problem is occlusion or resolution and no retraining fixes it. If the head is clearly visible with a helmet on it, the model does not recognise that headwear. If the person is walking a marked corridor with no hazard in it, the rule was applied to ground it should never have covered.

Those three answers lead to three unrelated fixes: a siting change, a data change, and a configuration change. Teams that skip the clip usually pick the data change, because it feels like the technical one, and spend a month labelling images for a problem that was geometric.

Four questions the clip answers before the model gets blamed

  1. Is the head in frame and unobstructed for at least a second of the event? Pause on the first and last frames, not the thumbnail the interface picked.
  2. How tall is the head in the source image, in pixels? Not in the downscaled inference view — in the recorded frame, where you can measure it.
  3. Is anyone else within a metre of them in those frames? Two overlapping people is the single commonest way one person's helmet gets credited to the other.
  4. Where were they standing, and should the rule have been live there at that hour? A flag on a walkway at 06:40 is a rule question, not a vision question.

Do this on 20 flagged events rather than the one that was escalated. A single event tells you about that event; 20 tell you which cause you actually have, and they cluster hard — on one camera, one hour band, or one crew.

Six causes, ranked by how often they turn out to be the one

CauseWhat the clip showsFix belongs to
Head occluded by posture or plantPerson bent into a machine, back turned, or behind a rackRules — require dwell with the head visible
Two people overlappingBoxes intersect; the helmet sits on the other person's trackEngineering — association logic
Head too small in the framePerson is a smudge at the far end of the baySiting — camera position, lens or an extra camera
Headwear outside the trained classesHelmet plainly present, and unusual: liner, hood, capData — new class, labelled and retrained
Steep overhead camera angleOnly the crown of the head is visible, as an ellipseSiting first, data second
Rule applied to the wrong groundPerson is on a walkway, in an office, or off shiftConfiguration — zone geometry and schedule
What each cause looks like in the clip, and which team owns the fix

The order matters: the first three are cheap to confirm and expensive to guess at. The last is cheapest to fix and most often left alone, because the alerts it generates are individually defensible and collectively useless.

The head is there and the camera cannot see it

PPE detection is two judgements, not one: find the person, then decide what is on their head. Both can fail independently, and the second fails silently. A fitter leaning into a press has a head pointing at the floor; a welder's hood covers everything the classifier keys on; a worker carrying a panel on their shoulder has occluded themselves. In each case the person is detected correctly and the headwear evidence is simply absent.

Overlapping people are worse, because the failure is in the association step rather than in either detection. In the on-premise PPE and intrusion system we run, person detection feeds a tracker that keeps a short identity history, and helmet detections are matched to person tracks by box geometry. Two people standing shoulder to shoulder 4 m from the camera produce overlapping boxes, and the helmet can be attached to the wrong track — one person double-credited, the other flagged.

Headwear the model was never taught

Most PPE models are trained on the common case: a smooth, brimmed, brightly coloured hard hat seen from roughly eye level. Real sites are full of legitimate headwear that looks nothing like that, and each is a class decision rather than a bug report.

  • Bump caps, which look like a baseball cap because that is broadly what they are — and which are correct in some areas and non-compliant in others, so the model has to distinguish them rather than accept them.
  • Welding hoods, face shields and full visors, which change the head silhouette completely and often appear exactly where the hazard is highest.
  • Winter liners, balaclavas and hairnets under a helmet, which alter colour and outline at the boundary the classifier is keying on.
  • Religious headwear worn with or under a helmet, including a turban or a patka. This has to be handled explicitly at labelling time, because a model that under-detects it turns a technical gap into a fairness problem on the floor.
  • Site-specific colour coding, where visitors wear a different colour from operators and the training set only ever saw one of them.

Colour-keyed classes carry an extra failure mode. Once cameras switch to infrared, colour is gone entirely and every rule that depended on it degrades at the same moment each evening, which is the whole of everything works until the cameras switch to infrared. If the false flags all sit after dusk, stop reading here and go there.

Twenty pixels of head is not a hard hat

Inference does not run on your recorded frame. It runs on a downscaled copy, and the arithmetic is unforgiving: a 1920x1080 frame squeezed into a 320x320 input is reduced by 6x horizontally and about 3.4x vertically. A person 120 pixels tall in the recording is roughly 35 pixels at inference, and their head — call it a seventh of standing height — is about 5 pixels. There is no headwear decision available in 5 pixels, and a model asked to make one will produce something.

  1. Take 20 confirmed false flags and 20 correct detections from the same camera and shift.
  2. In the recorded frames, measure the head-box height in pixels for each. A rough measure from the player is enough to see a difference of this size.
  3. Plot the two sets. If the false flags sit clearly below the correct ones, you have a resolution problem and the fix is optical or positional, not statistical.
  4. Check the same 40 against distance from the camera. Resolution problems have a distance boundary, and it is worth knowing where yours is, because it defines the part of the bay the rule can honestly cover.
  5. Where the boundary cuts through a hazard you must cover, the honest options are a second camera, a longer lens, or accepting the rule does not apply beyond that line. Write down which you chose.

The same reasoning decides whether cameras are the right instrument at all. Where the thing you need to observe cannot be resolved from any reasonable mounting point, a different sensor is the answer rather than a better model — the trade set out in warning the driver or counting the conflicts. Distance and lighting are worse again on loading docks and yards, which is part of the operational picture in AI in logistics operations.

The rule that should never have applied here

A helmet zone drawn generously covers the marked walkway beside the bay, so everyone heading to the canteen is flagged. An office window or a mezzanine sits in frame, so a supervisor at a desk is flagged. A contractor area with different rules falls inside a zone written for production staff. A zone with no schedule fires all weekend while the machine is isolated.

Every one of those flags is technically correct against the rule as written, which is why they survive review. They are also exactly the flags that teach a supervisor the screen is not worth opening, and the volume effect is its own failure mode in three hundred alerts a shift and nobody opens them. Where the polygon itself is claiming floor it does not own, the underlying geometry is in what a restricted zone polygon really means.

A flag that is correct against the rule and wrong about the workplace is not a model failure. It is a specification that was never read back to the people it judges.

Where the tree ends: siting, data, or configuration

  1. Head not visible in the clip, and the person is close to the camera: rule fix. Add a visible-head dwell condition and re-measure.
  2. Head not visible, and the head box is small or the person distant: siting fix. Nothing in the training pipeline recovers pixels that were never captured.
  3. Head visible, helmet present, unusual headwear: data fix. Name the class, label it deliberately, retrain, and keep the old model available for comparison.
  4. Head visible, helmet present, another person overlapping: engineering fix in the association logic — and until it ships, a rule that suppresses events where boxes overlap heavily.
  5. Head visible, no helmet, person legitimately unjudged: configuration fix. Redraw the zone, add the schedule, exclude the walkway.
  6. Flags concentrated after dusk regardless of the above: treat it as the day-night switch and stop diagnosing headwear.

One thing to resist along the way: raising the confidence threshold because it makes the false flags go away. It does, and it takes real violations with it, in a ratio nobody has measured. Thresholds are set against a labelled sample with both error directions on the table, the discipline described in choosing an anomaly score threshold on a running line. Build the triage itself into the loop — the clip, the classification, the retraining queue — because an unattended detector with no feedback path degrades quietly, which is the pattern our AI agents and automation work is designed around.

The neighbouring problems — alert routing, coverage audits, the record shape all of this writes into — sit under safety, PPE and site monitoring, part of our manufacturing and industrial vision practice.

Frequently asked questions

Short answers to the follow-ups this page tends to raise.

Why does the PPE system flag a worker who is clearly wearing a hard hat?

Almost always because the head was not visible in the frames that raised the flag, not because the helmet was misclassified. Bending into a machine, turning away, standing behind a rack, being partly hidden by a colleague, or simply being too far from the camera all remove the evidence the classifier needs, and the rule then reads absence as non-compliance. The evidence clip separates this from a genuine model gap in seconds.

Does a bump cap get detected as a hard hat?

Not reliably, and it should not be, since the two are different levels of protection and are correct in different areas. A bump cap resembles a baseball cap, so a model trained only on brimmed hard hats will either miss it or accept any cap as compliant. Both outcomes are wrong. Bump caps need to be their own labelled class, with the rule stating where each is acceptable.

How far from the camera can PPE detection still work?

Far enough that the head occupies a usable number of pixels in the frame the model actually sees, which is a downscaled copy of your recording. Measure it rather than assume: sample confirmed correct detections and confirmed false flags from one camera, measure head-box height in the recorded frames, and find the boundary where the two populations separate. That distance is the honest coverage of that camera.

Should we raise the confidence threshold to stop false PPE alerts?

Only against a labelled sample, and never as a first response. Raising the threshold suppresses false flags and missed violations together, and without a labelled set the second effect is invisible. Diagnose first: occlusion and resolution are unaffected by the threshold, and an unlearned headwear class needs data rather than a tighter cut-off.

  • ppe detection
  • false positives
  • computer vision
  • troubleshooting
// shipped work

The work behind this page

Builds from our portfolio that this page draws on.

Working on something in this space?

Tell us where you are in a sentence or two. We'll tell you honestly whether we're the right team, and what a sensible first slice of the work looks like.

Start the conversation