Let’s talk
← All entries

Entry №01 · Foundry

Field-condition CV

Why the camera in the mud needs to refuse a shot.

ICInsignia StudioSeptember 20255 min read

The mobile capture stage of Hide Nothing, our cattle-claim biometric pipeline, rejects more frames than it accepts. That is the feature, not a bug. Model accuracy in the lab is not the bottleneck for a CV system that has to work in a wet field, in low light, with a rancher holding the phone at whatever angle their hand defaults to. The bottleneck is input quality.

The fastest way to ruin a production embedding store is to populate it with one bad photo per policy that the matcher will later try to match against. So before any image leaves the device, a quality gate runs.

01. What the gate checks

Five checks run in parallel on the captured frame. All must pass; one fail kills the upload and triggers a reshoot.

  • Exposure within the workable range for the encoder
  • Focus, measured by Laplacian variance over the cow’s head region
  • Motion blur, sampled across the frame
  • Subject framing — the muzzle inside a sensible box at minimum pixel size
  • EXIF integrity — the photo was not pre-shot elsewhere and sideloaded

If any check fails, the rancher sees a reshoot prompt. It does not say “your photo is bad”; it says “the muzzle is not sharp enough; please hold steady and try again.” The first message costs you the relationship.

02. Why on-device matters

The naive build — upload first, gate in the cloud — fails for three reasons:

  • Latency — on a 2G link an upload takes forty seconds; a bad photo means over a minute before the rancher knows
  • Offline — rural enrolment days have intermittent connectivity at best
  • Poison — a bad photo that reaches the embedding store pollutes the match for every future claim on that policy, until re-enrolment

So the gate runs on the phone, before the upload queue: ONNX Runtime, the same encoders that run server-side, quantised to fit. The phone does the rejection; the cloud only sees clean frames.

03. The reshoot UX

The first version just showed a red error, and adoption tanked. The rebuild shows a live overlay — green when framing is right, red when it is not — says exactly what is wrong in the rancher’s language, and caches rejected photos locally so failure modes can be studied later.

04. What the field told us

After six months of deployment, rejections by failure mode:

  • Motion blur — 31%
  • Low light — 24%
  • Subject framing — 22%
  • Focus — 18%
  • Other — 5%

Motion blur dominated, which surprised us; the lab assumption was that low light would be the killer. In production, ranchers are quick-handed and the cow is moving.

05. The principle generalises

Any CV system that operates in conditions its developers do not control needs an honest reject mode. Without one, the accuracy measured on the test set is fiction the moment it ships. The right question is not “what is the recall on clean data?” but “what does the system do when the data is bad?” If the answer is a confident wrong answer, you have not shipped a CV system. You have shipped a liability.

End · Entry №01 · Filed September 2025

More from the journal

Dispatches from the studio.

All entries