A robot inspection dataset contains thousands of image files, but those files may describe only a small number of physical parts. Randomly dividing the filenames can place nearly identical views of the same part into both training and evaluation. The resulting score then answers a narrower question than performance on unseen parts.

The important boundary is not always the image file. It may be the physical item, acquisition run, production batch, camera, or time period. Choosing that boundary requires stating what the trained system is expected to encounter for the first time.

An original example with twenty physical parts

Imagine a hypothetical robot captures fifty neighboring frames of each of twenty parts. The dataset contains 1,000 images, but only twenty physical part identities. Images from one part share its surface details, defect geometry, background, and acquisition conditions.

Suppose a file-based split places forty frames of each part in training and ten in evaluation. There are 800 training images and 200 evaluation images. Every evaluated part has already contributed images to training.

The evaluation can still describe held-out views of familiar parts. It does not isolate the question of how the system handles a wholly unseen part identity. The distinction follows from the construction of the example and requires no assumed model score.

Now instead place all fifty frames from sixteen parts in training and all frames from four other parts in evaluation. The image totals remain 800 and 200, but the part identities no longer overlap.

The same split percentage has produced a different experiment. A report that records only an 80/20 image ratio would conceal the difference.

What group-aware splitting establishes

The scikit-learn cross-validation guide describes group-aware methods that keep the same declared group out of both training and testing within a split. It also distinguishes group structure from class-label stratification.

For the fictional part dataset, a group could identify the physical part, with every frame from that part carrying the same identifier. Keeping groups separate would enforce the intended part-identity boundary.

This is a proposed use of grouping, not a guarantee that one named splitting method resolves every robot-data problem. A tool can enforce only the group definitions it receives. It cannot infer an omitted relationship between two filenames or determine whether a batch identifier captures the dependency relevant to deployment.

Relatedness has more than one scale

Suppose the twenty parts were photographed in two sessions with different lighting arrangements. Holding out parts while mixing both sessions across training and evaluation does not isolate performance under a wholly new lighting session.

Conversely, holding out an entire session can change several factors at once: lighting, camera alignment, part population, and operator setup. A different score would not identify which factor caused the change.

These examples explain why grouping should follow a stated generalization question. Unseen part, unseen batch, and later production period are different questions. They may require separate evaluations rather than one split that is advertised as covering them all.

Exact duplicates are only the obvious case

Removing byte-identical files can prevent one kind of overlap. It does not make two neighboring video frames independent. A tiny camera movement or compression change can produce different files while preserving essentially the same part-specific evidence.

Augmentation introduces another relationship. Crops, rotations, or brightness variants derived from one original image retain that ancestry. Dividing those variants independently can place the same original observation on both sides of an evaluation boundary.

In the fictional dataset, keeping the original image and all its descendants with the same relevant group preserves the intended separation. This is an editorial data-lineage rule, not a statement that all augmentations are invalid or that related views can never be evaluated together.

Preprocessing can cross the boundary too

The scikit-learn common-pitfalls guide explains that information from evaluation data can enter training through preprocessing or model choices. It recommends learning fitted transformations from training data and applying the learned transformation to the held-out subset.

Consider a hypothetical feature normalization whose mean is estimated from all 1,000 images before splitting. The held-out images have then influenced a quantity used by the model. Their labels need not have been exposed for information to cross the intended boundary.

Separating part identities does not automatically prevent that different form of leakage. The grouping decision and the fitting boundary address distinct operations in the data pipeline.

A fixed, externally specified conversion is not the same as a transformation learned from the evaluation population. The record should identify which operations estimate parameters and which merely apply an already defined operation.

Evaluation data can become familiar through iteration

Repeatedly examining held-out failures and changing the model, feature choices, or threshold in response makes those observations part of the development process. Calling that same collection untouched afterward would misdescribe its role.

This does not make iteration undesirable. It means development evidence and a later assessment of the resulting system have different responsibilities. A useful account names which data guided choices and which data remained outside those choices.

The hypothetical 1,000-image collection also illustrates a sample-size limitation: four held-out parts are still four part identities, even though they contribute 200 images. A large frame count should not be presented as the same breadth of evidence as hundreds of distinct parts.

Preserve the split as an artifact

An explanatory dataset record can retain original-image identity, physical part identity, acquisition session, derived-image ancestry, and assigned subset. The fields are a proposed recordkeeping approach, not a universal file format.

Those relationships make the evaluation question reviewable. They explain why two 80/20 splits can provide different evidence, and why a robot vision score becomes more meaningful when the unit of novelty is stated before the image files are divided.

Image note: The accompanying site-library robot and computer scene is a concept illustration of data preparation. It is not a recorded training run, an evaluation result, or evidence of a particular model's generalization.

Sources checked October 23, 2026:

scikit-learn, Cross-validation: evaluating estimator performance, stable documentation as accessed:

https://scikit-learn.org/stable/modules/cross_validation.html

scikit-learn, Common pitfalls and recommended practices:

https://scikit-learn.org/stable/common_pitfalls.html

Hypothetical parts, frame counts, split comparisons, and data-lineage interpretation: original ZHILIANHAI editorial analysis.