All posts

Writing a good state: 'aisle 3 is clear' is not enough

A state is a sentence about a zone, true or false on one image, with a minimum duration. Vague and precise examples, the one-week history test, and the mistakes that keep coming back.

By Oussama Messai Published 13 September 2026 Updated 12 October 2026 6 min read Lire cet article en français
Warehouse aisle seen by a fixed camera, verification zone drawn on the floor

In Camly, everything starts with a sentence. The site writes what it expects of a zone, in plain language, and the system checks at regular intervals whether that sentence is true on the image. When it stops being true for long enough, an episode opens.1 The quality of everything that follows, the alerts, the monthly report, the line in the risk assessment document (DUERP), depends on the quality of that sentence. And the first version is almost always too vague.

What a state is

A state is a statement about a zone, which is true or false on the image, and which must stay false for a minimum duration to count as an episode. Three words matter.

Zone: the state speaks about a bounded place, drawn on the camera image, not the whole field of view. “Aisle 3” is a zone if it has been drawn. “The warehouse” is not.

Image: the state must be observable by looking at the image, at a given moment. A state that requires knowing what happened before, or guessing an intention, is not verifiable. “A pallet is on the floor in the zone” can be seen on one image. “Someone abandoned a pallet” cannot.

Minimum duration: a pallet crossing the aisle on a pallet truck is not an obstruction. The same pallet set down on the floor for the lunch break is. The duration is what separates normal traffic from the situation worth documenting.

Vague versus precise

Vague versionWhy it failsPrecise version
“Aisle 3 is clear”Clear of what? A passing forklift makes it “not clear”“No pallet, box or roll cage on the floor in aisle 3 between racks C and D; moving forklifts do not count”
“The emergency exit is clear”Which exit, what width?“Nothing placed in the zone drawn in front of door B, over its full width”
“The charging area is clean”“Clean” is not observable“No cardboard, stretch film or wooden pallet in the floor-marked zone around the chargers”
“The dock is safe”A judgement, not a state“No person and no forklift in the dock-edge zone of dock 3 when no trailer is docked”
“No wild storage”Neither the zone nor the object is defined“No pallet against the north façade, in the zone drawn between the two skips”
“Operators follow the rules”A state about people, refused by designReplace with the zone state that corresponds to the rule

The precise versions have three things in common. They name the zone. They say what counts as a violation, and what does not. They are observable by someone looking at the image who knows nothing about the site.

One state per zone, one zone per state

It is tempting to write one general state that covers everything: “nothing abnormal in the aisle”. That is the surest way to get episodes that can neither be interpreted nor corrected. If aisle 3 has two problems, storage on the floor and the fire door wedged open at the end of the aisle, those are two states, on two drawn zones, with two durations. The monthly report will then say how many times each occurred, and the corrective action will not be the same.

Conversely, a zone that is too large catches its neighbour. An “aisle 3” zone that spills onto the end of rack C will open an episode every time the rack is full. The right adjustment is made on the image, not in the sentence: the zone is drawn as tightly as possible, and the sentence describes what happens inside it.

Testing the state on a week of history

Before leaving a state in production, we let it run for a week and review the episodes. Three cases arise.

  • The state never opens. Either the zone really is always compliant, which is good news to be verified on a few random images; or the sentence is too permissive, or the minimum duration too long.
  • The state opens all the time. The zone is too wide, the sentence too strict, or the duration too short. A state that is true 2% of the time is not a state, it is background noise: nobody will read its episodes.
  • The state opens a few times a day, and the reviews confirm. That is the tuning we are after. The false alert rate measured from the “Was this right?” answers then becomes a figure that can be shown to the works council.1

On the demo site, the state “aisle C is clear” was first written without the clause on moving forklifts. It opened at every pass. With the clause and a minimum duration of a few minutes, it now opens only for pallets set down on the floor, which is what the site wanted to count.

The mistakes that keep coming back

  1. States about people. “Operators wear their vests”, “nobody runs”, “the temp worker follows the rule”. Camly refuses them by design: it checks places, not people.2 The corresponding zone state almost always exists: if the rule is to leave nothing in the aisle, the state is “nothing on the floor in the aisle”.
  2. States that need invisible context. “The pallet has been there too long” needs a memory. “The trailer left without authorisation” needs a document. The image does not know that; the episode’s duration and the history carry that information, not the sentence.
  3. States that depend on the time. “The dock is empty at night” mixes a state and a schedule. Write “no trailer at dock 3”, and read the report by time slot.
  4. States the camera cannot see. A film of water on the floor, a label on a drum, a door ajar by five centimetres thirty metres away. If you cannot see it on the image on screen, the system will not see it either. Change camera, or give up that state.
  5. “Just in case” states. Ten states per camera, seven of which will never be used. They cost checks, noise and attention. Three reviewed states are worth more than ten ignored ones.

Where to start

Take your most often repeated safety rule. Rewrite it as a sentence about a zone, true or false on one image, with what counts and what does not. Draw the zone. Set a duration. Let it run for a week and review. You will then have a state whose monthly report means something.

Sources

  1. Camly AI, “An episode, not an alarm: why Camly tracks states with a start, an end and a duration”, Camly AI blog, 2026. /en/episode-pas-alarme/
  2. Camly AI, “Why we do not do facial recognition” and “Ask your site”, Camly AI blog, 2026. /en/pas-de-reconnaissance-faciale/, /en/interroger-son-site/