A computer vision system does not learn the job described in the project plan. It learns the job as it appears in the images collected for it. If those images were gathered in clean light, at a bench, with tidy examples laid out by hand, the system has learned bench work. When it then meets cartons at line speed, under a shroud, in late-afternoon glare, it is applying a world that was never the real one.
That is why building the image set is not a preliminary chore. It determines what every later claim about accuracy can honestly mean. A weak set cannot be rescued by labeling or a cleverer model. It can only be replaced, usually after a public failure, at production prices.
Collect where the system will work
The first discipline is to collect under production conditions, or to say plainly that you did not. Position, light, speed, dust, and time of day are not background details. They are part of what the system must learn to see through.
There is an honest exception. A new defect may not have occurred naturally yet, so early examples may have to be staged. Staging is legitimate when it is done at the real position, in the real light, and when the records mark those images as staged. Without that mark, a later reviewer cannot tell evidence from reconstruction, and the two get quoted as if they were the same thing.
Collect what must be left alone
Beginners collect the thing they want to catch. Experienced builders also collect, on purpose, everything the system must not catch. That second collection, the negative space, is usually the larger and more important one.
A print inspection system will meet good cartons with heavy print that looks almost like the defect. It will meet dusty cartons, cartons from another line that will pass the camera, hands, gloves, tools, and stretches of empty belt. If the set contains none of those innocent look-alikes, the system cannot learn the difference between a defect and a resemblance. It will flag the innocent, often and confidently, and the floor will learn within a week to ignore its alarms. An alarm nobody trusts is useless.
So for every defect class, its innocent twins belong beside it: the good examples that come closest to looking bad. They teach restraint.
Proportions are a claim, make them honestly
A set also teaches how common things are. If a defect appears on roughly one carton in two hundred on the real line, a set built half defect and half good describes a different factory. A system raised on it will behave as if defects were everywhere, and its threshold behavior will surprise the people who trusted the test results.
Collecting extra examples of a rare defect is often the right teaching move, because a rare event still has to be learned well. The discipline is in the record. Note the deliberate skew, and write the real rate beside the collected rate. Later, evaluation can correct back to real proportions before anyone quotes a performance figure. What is not defensible is letting the collected proportions stand, silently, as if they were the line's own.
Split by real units, guard the split
Before building begins, the set divides into a portion the model learns from and a held-out portion it never sees, kept for honest testing. How that split is made decides whether the test means anything.
Splitting by shuffling individual frames is the common error. Frames of the same carton, taken moments apart, are near duplicates. If some land on each side, the test is partly a memory check, and the score flatters the system. Split instead by real-world units: by shift, by day, by batch, by pallet. Then write down which unit you chose and why. That one sentence is the difference between an evaluation and a rehearsal.
Dunvarra's set for Line 2 print inspection shows this working. It was built across eleven shifts, split by shift, with afternoon-glare shifts deliberately present in both portions. A held-out set without the hard hour would have certified a system the afternoons would then have dismantled.
Keep the log, and collect past the design
For every batch, the log records where and when it was gathered, which camera and view, what conditions, whether it was staged or natural, who collected it, and what was excluded and why. In the fourth month, when the system starts failing on Tuesdays, the log is the only way to discover that the Tuesdays in the set came from a different camera than the Tuesdays on the line.
One more discipline is often skipped under schedule pressure: collect a little beyond the current design, where the world is known to move. If the product has a seasonal variant, collect the shoulder of that season now, while the crew and cameras are set up. If a second supplier's version exists in the supply chain, collect it now. This forward collection is not scope creep. It is insurance bought at the cheapest moment it will ever be offered.
The common belief that more images means better data, so the right move is to grab everything the cameras have recorded and let the model sort it out, gets this backwards. Volume without design teaches the wrong world at scale: a month of frames from a mis-aimed camera, defects at demonstration proportions, the same pallet photographed four hundred times, and nothing from the night shift. The model will learn that skewed, duplicated, daylight-only world, and be confidently wrong where it matters.
The deciding move comes first. Write the design down: conditions, negative space, proportions with the real rate beside the collected rate, split unit, and log fields. Then collect to it.
Experience it, don’t just read about it
Collection discipline, building the image set by design from production conditions, with negative space, honest proportions, and a guarded split, is Concept 3 of Computer Vision in Practice: See, Sort and Inspect with Machines (Course No. 434), from Cognosco Learning, a learning company powered by AI. The course builds computer vision practice beyond this distinction — Label It Right — Labeling Quality and Edge Cases, Test on the Real Line — Evaluation That Holds, and Watch for Drift — When the World Changes — each worked through with an Agentic Socratic AI coach, one learner at a time. Try a Free Preview at cognoscolearning.com.
Navigate your own course.
© 2026 Cognosco Learning. All rights reserved.