Check integrity first
Before measuring class balance or label quality, make sure every file can be decoded and every annotation references a real image with valid coordinates.
Run these checks every time data is imported. A validation report is easier to fix than a training job that fails hours later.
- Reject corrupt or zero-byte images.
- Clamp or reject boxes outside image bounds.
- Verify class identifiers against one canonical class map.
Find leakage and duplicates
Near-duplicate frames across training and validation splits can make a model look far better than it is. Video datasets need grouping by source sequence before splitting.
Use exact hashes first, then perceptual similarity for resized, compressed, or slightly shifted copies.
- Hash exact duplicates.
- Cluster near-duplicates.
- Split by scene, camera, subject, or capture session.
Review the long tail
Aggregate counts hide the conditions that break production systems. Slice examples by lighting, location, object size, occlusion, camera, and other operating variables that matter.
Visual review remains useful. A grid of random samples per class can expose a class-map mistake or repeated annotation pattern in minutes.
for each class:
sample 64 images
render labels and metadata
group by camera and condition
flag unusual size or densityFreeze the evaluation contract
Keep a stable evaluation set and record why each slice exists. Change it deliberately, not as a side effect of importing new data.
Report performance by important slice as well as overall. A model can improve on the average while getting worse in the environment that matters most.