Skip to content

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:

  1. Parses image-label records and class membership.
  2. Seeds target splits with rare classes first.
  3. Fills remaining capacity using class balance, image-fill pressure, and seeded random tie-breaking.
  4. 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.