Smart Split¶
Smart-balanced splitting is designed for detection datasets where rare classes can vanish from validation or test sets under a naive random split.
The current algorithm:
- Parses image-label records and class membership.
- Seeds target splits with rare classes first.
- Fills remaining capacity using class balance, image-fill pressure, and seeded random tie-breaking.
- Warns clearly when label files are empty and class balancing cannot be meaningful.
The seed changes deterministic tie-breaks, so repeated runs with the same seed match and different seeds can produce different valid splits.
Run the preparation wizard with:
uv run yolomatic-prepare
Related pages: Datasets, NDJSON conversion, First training run.