Where the Training Data Comes From
The dataset determines the failure modes. Collecting it lawfully, composing it deliberately, and the questions to ask a vendor about theirs.
Procedure
A model reproduces the composition of what it was shown. Most deployment surprises are dataset properties surfacing later.
Collecting your own
The best source is your own site, because it matches your conditions.
Which means collecting footage of your own operation, and that footage contains people.
Establish the basis before collecting, not after: a lawful basis, a notice, a retention period, and a statement of what the footage will be used for.
Separate the training use from the operational use explicitly. People notified that cameras record for security have not been notified that footage trains a model.
Blur or exclude people where the target is an object, which removes most of the concern and is technically straightforward.
Composition
Cover the conditions you will operate in. Every hour of the day, every season, every weather, every shift.
Cover the variants. All the vehicle types, uniform colours, packaging designs, equipment states.
Cover the difficult cases deliberately. Partial occlusion, unusual angles, poor light. A dataset of easy examples produces a model that works on easy examples.
Where people are involved, composition across appearance matters, and an unrepresentative set produces exactly the uneven error distribution described elsewhere.
Record the composition, because you will be asked and because it explains the failure modes.
Class imbalance
The event you care about is rare, which is why you care about it.
A dataset of a thousand normal frames and five defect frames trains a model that says normal.
Options: collect over longer, oversample the rare class, weight the loss, generate synthetic examples, or use anomaly detection which needs only normal examples.
Synthetic data helps and does not substitute. A model trained on rendered defects handles rendered defects; the transfer to real ones is partial and must be measured.
Buying a pretrained model
Most deployments start here, and the questions are the same.
What was it trained on? A refusal to say is an answer.
What population is represented?
Has subgroup performance been measured, and can you see the numbers?
What conditions was it evaluated in?
How is it updated, and what happens to your performance when it is?
Can you evaluate it on your own data before committing?
Labelling
Consistency matters more than volume.
Write the labelling guidance before labelling, with edge cases decided in advance: partially visible objects, ambiguous cases, boundaries.
Measure agreement between labellers on a common subset. Low agreement means the class is not definable, which is a finding about the whole project rather than about the labellers.
Where the labellers are people whose work is being labelled, the labelling itself needs consent and a purpose statement.
Keep a held-out set that is never used for training or tuning, which is the only honest evaluation and which is frequently contaminated by iterative tuning.
The dataset outlives the project
Record where every image came from, under what basis, and when it must be deleted.
Apply the retention. Training data is personal data and does not become exempt by being useful.
A dataset assembled without provenance cannot be defended later, and it cannot be corrected when a source turns out to be problematic.
The provenance record
Per item, or at least per collection batch, and it outlives the project.
Source: which camera, which site, which period.
Basis under which it was collected.
Notice given, and when.
Whether people are present, and whether they were masked.
Retention date.
Whether it was shared with a vendor.
A dataset without this cannot be defended and cannot be corrected when one source turns out to be problematic — and a model trained on it cannot easily be untrained.
Held-out means untouched
The set is contaminated the moment you look at it and adjust.
Keep two: one for iteration, one opened only at the end.
Contamination is gradual and unconscious — a threshold nudged, a version chosen, a class rebalanced, each informed by the numbers.
Collect the final set at a different time from the training data, which catches temporal effects a random split hides.
Report the figure from the untouched set, and where iteration touched it, say so and treat the number as optimistic.