Create custom dataset from pre-existing datasets

There is tons of pre-existing datasets with various classes.
For your use-case a subset of a bigger dataset or a mix of classes from different datasets is often helpful.

Introducing https://pypi.org/project/YoloDatasetCustomizer/

  1. Give a list of paths to “data.yaml” files and/or just a top folder where all your local datasets reside.
  2. Select the class names you want to have in your custom dataset.

Enjoy your custom dataset :wink:

Thanks for sharing this, Luca! Building a subset or a class mix from several existing YOLO datasets is a common need, so a tool that works straight from each data.yaml is handy. One tip for anyone merging sources: check that each class name maps to the same index across the merged files, since YOLO label files store indices, not names. If you’d rather work in the browser, Ultralytics Platform datasets let you clone public datasets and copy images between your own, and the detection dataset guide covers the label format the merged dataset needs.