Collecting and Labelling Shopfloor Data Without Building In Bias

The problem with training data is rarely that there is too little of it. It is that it is skewed. Collected over two days, on one shift, on one machine, with parts placed by one person, the resulting model memorises those conditions precisely and falls over when the batch, the shift or the operator changes. The fix belongs in the collection stage, not afterwards. The second risk lives in labelling and is not mislabelling but inconsistency, where the same person calls something a pass on Monday and a fail on Tuesday. This article sets out the dimensions to stratify and the labelling rules to agree before any bulk work starts.

Diagram of stratified sample collection across batches and shifts

Key takeaways

  • Stratify across batch, shift, lighting, station and operator, or the model learns one condition only.
  • Borderline samples must be collected deliberately; they are the main source of false alarms.
  • Agree rules and calibrate labellers on a small set before starting, or the rework is enormous.
  • Unjudgeable should be a legal label; forcing a binary choice injects noise into the training set.
Isometric diagram of an industrial camera and an edge computing box connected by a single cable
The station-level hardware: one industrial camera plus one edge computing box

When judgement uses deep learning, data quality matters far more than data volume, and the problem is almost never that there is too little. It is that the data is skewed. Collected over two days, on a single shift, on one machine, with parts placed by one person, the resulting model memorises those conditions precisely and falls apart as soon as the batch, the shift or the operator changes. Avoiding that has to happen at collection time, not afterwards. The second risk lives in labelling, and it is not mislabelling so much as inconsistency: the same person calls something a pass on Monday and a fail on Tuesday, and the training set gains a batch of self-contradictory samples from which the model can only learn noise.

Five dimensions collection has to cover

  • Batch: different suppliers and different arrival ages produce different appearances; cover the common incoming states.
  • Shift: ambient light, machine temperature and operator experience all differ across day, evening and night. Do not collect from one shift only.
  • Lighting: shop lighting changes through the day, machine doors open and close, and neighbouring equipment casts its own light into the frame.
  • Station and operator: the same action looks different at different stations and in different hands, particularly in placement attitude.
  • Operating condition: empty, loaded, mid-changeover, just started and after hours of running all have different image characteristics.

These five do not need equal volume, but all of them need representation. A practical approach is to build a collection schedule across dimensions before shooting, spreading times and shifts deliberately; compared with shooting whenever there is a free moment, a schedule removes a great deal of skew. One further point that gets missed: capture the metadata with each image — batch, shift, station, timestamp — because without it, neither stratified sampling during labelling and training nor diagnosis when the model misbehaves is possible. This is the same requirement as write-back field design, one stage earlier.

Borderline samples: where models are won and lost

Borderline means two things: parts that are just inside tolerance but look marginal, and parts that look acceptable but are actually out. They occur naturally at low rates and are the main source of both misses and false alarms, because the model wobbles exactly here. They cannot be collected by waiting. They have to be hunted: from historical rework, from alarm records, and from the experienced eye of somebody saying this batch looks off. Once found, they should form their own group, split between training and acceptance, with no overlap between the two. If there genuinely are too few, it is better to tighten the criterion and state explicitly that this region is not yet covered than to go live with a model that behaves randomly at the boundary. The trade-off between misses and false alarms is set out in weighing misses against false alarms.

Situations the labelling rules must cover

Ambiguous cases and suggested rules
SituationUsual disagreementSuggested rule
Target partly occludedHow much occlusion makes it unjudgeableAgree a visible-proportion threshold below which it is labelled unjudgeable
Blurred or out of focusA defect or a capture failureLabel as capture error and report separately, never as a positive or negative sample
Borderline partHow to label something on the lineFollow the final assembly outcome or the manual review verdict, and record the basis
Genuinely ambiguousSubjective disagreementLabel unjudgeable and treat as a lead for improving the criterion
Several defects in one imageOne label or allLabel all, allowing one sample to carry multiple labels

The unjudgeable label matters and should not be dropped. Forcing a labeller into a binary choice when the case is genuinely ambiguous injects random noise into the training set, and the model learns that this kind of image is sometimes right and sometimes wrong — which is exactly the flickering behaviour you then see in production. Reporting unjudgeable separately has additional value: if its share is high, either the imaging conditions are insufficient or the criterion itself is too vague, and both of those are design problems rather than things to solve by hoping the model copes.

Tools and effort estimation

For tools, classification labelling — which class does this image belong to — costs a fraction of detection or segmentation labelling. If the criterion can be reduced to classification, design it that way first; the same outcome can cost several times less in labelling effort. Rough rules of thumb: a simple classification label takes seconds, while a bounding box or outline takes tens of seconds to minutes. Work backwards from that to size the effort — how many images, and what does each cost — before committing people. Allow for review effort too, typically twenty to thirty percent of labelling volume. There is no need to start with a heavyweight platform; in early exploration, a lightweight tool and a working rule set beats a platform built before the problem is understood.

Data and labelling questions we get asked

How many images do we actually need?

There is no general number. Simpler tasks with clear class separation need fewer; more borderline cases and more varied conditions need more. A better signal is whether performance is still improving — once metrics stop moving as volume grows, what is missing is sample variety, not sample count.

Can operators label in the flow of their work?

Yes, but calibrate first and keep each label traceable to a person. Operators know the shopfloor and label efficiently, but the risk of inconsistent standards is higher, so a rules document and spot checks are essential.

Should we delete old training data?

Not outright. Old data records historical conditions, and deleting it makes the model forget them. Weight by age or stratify sampling so old and new coexist, and reassess at changeover and incoming-material milestones.


How many shifts and batches does your sample set cover?

Send us your collection conditions and labelling rules and we will look for obvious skew.

Contact us

Related articles

View all

Need specific advice for your production line?

Our engineers can share practical approaches to process error prevention and SOP compliance inspection for your scenario.

Request a free trial plan