Manufacturing & Industrial Vision// diagnostic

Everything works until the cameras switch to infrared at dusk

In short

Detection quality collapses at dusk because the camera changes what it produces, not because the site got dark. When the infrared cut filter drops out the frame becomes monochrome, retroreflective tape blooms white, exposure lengthens and gain rises — so plot detection counts against each camera's own switch time rather than against sunset.

Key takeaways

  • Align detections to each camera's own switch, not to sunset. A dirty dome or a nearby lamp moves the trigger by 30 minutes or more, per camera.
  • You can find the switch in the frames: mean saturation collapses towards zero the moment the infrared cut filter drops out.
  • A hi-vis vest is not hi-vis in infrared. The colour is gone and the retroreflective tape returns the illuminator as a blown-out white bar.
  • Lowering the confidence threshold at night is the wrong lever. It trades silent misses for an alert volume the shift stops opening.
  • A rule that cannot be evidenced after dark should be switched off after dark, with the shift told which rules are live.

The collapse is caused by the camera, not by the darkness. At a lux threshold set in the camera's own configuration, a mechanical infrared cut filter swings out of the light path and the sensor starts seeing near-infrared. The frame becomes monochrome, the illuminator floods the scene from beside the lens, the exposure lengthens and the gain climbs. A model trained on daytime colour frames is now being asked to score an image type it has never seen, and it does exactly what you would expect.

That is why the first move is a chart, and why the usual version of the chart is misleading. Detections plotted against sunset show a smeared decline across 90 minutes, which invites theories about ambient light. Detections plotted against each camera's own switch show a step. Steps have single causes; smears do not. Getting this right early saves a fortnight of model work that would not have helped, and it applies across most of safety, PPE and site monitoring.

Finding the exact moment each camera switched

Switch times differ per camera and drift over months. A camera under a sodium lamp switches late or oscillates; one behind a dusty dome switches early; one facing a bay door switches twice as a vehicle's headlights sweep past. Asking the VMS for a nominal time is not good enough at that resolution.

  1. Detect the switch from the frames themselves. Convert 1 sampled frame per minute to HSV and take the mean saturation across the image. In colour mode a working scene sits well clear of zero; the moment the filter drops out the mean falls to within 1 or 2 points of zero and stays there. That crossing is the switch, timestamped from the frame rather than from a log.
  2. Bucket detections into 5-minute bins for the 4 hours around it, per camera and per rule, and align every camera to its own crossing rather than to the clock.
  3. Separate the counts by rule class. A person-presence rule and a vest-compliance rule usually fall by very different amounts, and the ratio between the 2 is the diagnosis.
  4. Pull 20 clips from either side of the crossing on the worst camera and look at them. Everything after this point is confirmation of something you can see in a clip, and teams that skip this step spend weeks on the wrong cause.

Why a hi-vis vest stops being hi-vis

2 separate things happen to the same garment, and they push in opposite directions. First, the colour goes. An orange vest and a grey jacket become two similar mid-tones, so any class whose separability rested on hue has lost most of its signal. A detector that appeared to be finding vests may in fact have been finding orange, and dusk is when that becomes measurable.

Second, the retroreflective tape on the vest does what it was engineered to do: it returns light straight back towards its source. With the illuminator mounted around the lens, the tape returns almost all of it into the sensor and saturates. What the model receives is a bright white bar across a dark torso, with the garment either side of it crushed into black. That is not a degraded version of the daytime appearance; it is a different object. Helmet stripes and reflective trouser bands behave the same way, which is why a helmet rule can fail at night while a person rule does not.

In infrared, a high-visibility vest is not a bright orange garment. It is a white bar on a black shape, and no daytime example looks like that.

The four other things the switch changes

ChangeWhat you see in the clipWhat it costs the model
Longer exposure per frameA person walking at 1.4 m/s smears; a forklift leaves a streakBoxes drift behind the subject, tracks fragment, dwell timers reset
Higher sensor gainVisible grain across flat surfaces, worst in the far half of the sceneSmall parts stop being resolvable — chin straps, gloves, ear defenders
Focus shift into infraredThe whole frame is uniformly soft, not just moving objectsEdge detail collapses everywhere; a lens that is not infrared-corrected cannot be fixed in software
Stream profile change at nightFrame rate or resolution drops on the analysed sub-streamFewer frames per event, so short violations fall below a dwell threshold entirely
What else changes at the switch, and how it shows up in a night clip

The last row is the one that hides best. Some cameras are configured, sometimes by default, to change the sub-stream at night while the recorded main stream stays as it was. Reviewers pull the recording, see acceptable footage, and conclude the analytics are at fault — when the analytics were handed something else entirely. Check the profile the analytics pipeline is actually consuming, at night, on the camera, not in the design document.

Fixes, ranked by what they cost and what they actually buy

  • Add white lighting to the zone. The most effective fix by a distance, because it keeps the camera in colour mode and the entire daytime model applies unchanged. It is a facilities job rather than a software one, it changes how the area feels to work in, and in a yard or a loading bay it is often already justified on safety grounds alone.
  • Move the illuminator off-axis. Mounting the infrared source 1 metre from the lens rather than around it removes most of the retroreflective bloom, because the tape no longer returns light along the viewing axis. Cheap, physical, and frequently enough on its own.
  • Fit an infrared-corrected lens. If the whole frame is soft at night and sharp by day, the lens is focusing visible and infrared light at different planes. No training set fixes this, and no other fix works until it is done.
  • Cap the exposure time and accept the noise. A maximum shutter of 1/100 second trades grain for sharpness, and for moving-person rules that is usually the right trade — but it makes the far half of the scene worse, so verify per camera rather than fleet-wide.
  • Build a separate night training set. Label infrared frames as their own data and either train a second model or fine-tune with them well represented; do not simply pour them into the daytime set, where they are outnumbered and ignored. Whether the night problem is better posed as named classes or as a model of what normal looks like is the same choice argued in anomaly detection versus supervised defect classification.
  • Re-specify the rule for darkness. Detect person plus helmet shape rather than vest colour, or fall back to presence and zone rules that need only a body-shaped region. Less capable, honestly labelled, and available immediately.

One lever that looks tempting and is not: lowering the detector's confidence threshold after dark. It recovers the count on a dashboard and does it by converting silent misses into noisy false alarms, which is the fastest known way to produce an alert queue nobody works — the collapse described in three hundred alerts a shift and nobody opens them.

The rules that should simply be switched off after dark

Some rules cannot be run honestly on infrared frames with the cameras a site actually has, and continuing to run them is worse than stopping. A colour-dependent rule that quietly misses 8 violations in 10 between 19:00 and 06:00 does not produce a gap in the record; it produces a clean record, and a clean record is read by everyone as compliance. That is an active harm, not a limitation.

So state it explicitly: a per-rule schedule, visible on the operator screen, showing which rules are live in which lighting mode. The night shift is entitled to know that vest checking is not running and intrusion detection is. Coverage should be re-audited under night conditions too, because an illuminator's usable range is far shorter than the lens's daylight field of view, and a zone that is covered at noon can be effectively uncovered at midnight — the audit method is in the incident nobody has footage of.

Proving the fix before the next night shift trusts it

Hold out a labelled night set before changing anything: 300 to 500 frames per zone drawn from after each camera's switch, covering the movements you care about. Score every candidate fix on that set alone. A mixed day-and-night evaluation is dominated by daylight frames and will show a comfortable overall figure while night recall stays where it was, which is how a fix gets signed off and the problem persists.

If the answer turns out to be the cameras rather than the model — soft lenses, on-axis illuminators, sub-streams that change profile — that is a procurement finding, and it belongs in the estate review rather than the backlog. Sorting an inherited camera estate into reusable, repositionable and replace is the exercise in can the cameras you already own do this. Doing that survey once, with night performance included, is cheaper than the second round of model work — and it is the kind of unglamorous groundwork that decides whether a manufacturing and industrial vision deployment survives its first winter. Where the answer is genuinely a build, scope it as a product build with the night set as an acceptance criterion rather than as a later phase.

Frequently asked questions

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

Why does video analytics accuracy drop at night even with infrared illumination?

Because infrared illumination produces a different kind of image, not a dimmer version of the same one. The cut filter swings out and the frame becomes monochrome, so colour cues vanish; the illuminator makes retroreflective tape bloom white; exposure lengthens and gain rises. A model trained on daytime colour frames is being asked to score an image type it has never seen, and the drop is a step at the switch rather than a gradual decline.

How do I find the exact time a camera switched to night mode?

Read it out of the frames. Sample 1 frame a minute, convert to HSV and take the mean saturation across the image; when the infrared cut filter drops out that mean falls to near zero and stays there. Align detection counts to that crossing per camera, because switch times vary by camera and drift with a dirty dome or a nearby lamp — often by more than 30 minutes against sunset.

Should I lower the confidence threshold at night to recover detections?

No. It restores the count on a dashboard by converting silent misses into false alarms, and an alert queue the night shift stops opening is worse than an honest gap. If the underlying frames have lost the information the rule depends on, the answer is better frames, a separate night model, or a narrower ruleset — not a lower bar on the same evidence.

Is it acceptable to disable some safety rules overnight?

It is better than running them badly, provided it is stated. A colour-dependent rule that misses most violations after dark produces a clean record, and a clean record reads as compliance to everyone who sees it. Publish a per-rule schedule showing which rules are live in which lighting mode, so the shift knows what is being watched and what is not.

  • video analytics
  • PPE detection
  • cameras
  • night shift
// 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