Fine tune a Ultralytics Model with a HuggingFace dataset

Is it possible to fine tune an Ultralytics model (such as YOLOv12 for Object Detection), using a hugging face dataset

  1. is there direct support
  2. are there any converters that for HuggingFace Dataset to Ultralytics Dataset
    Regrardless are there any tutorials or code examples

Note: for context, I wish to train with my custom dataset on transformers.rt_detrv2 and yolo_v2 in order to compare performance

Thank you very much

Training an Ultralytics YOLO model will require conversion to the YOLO text file annotation format. If you have a specific HF dataset in mind, it would be helpful to share that to give more specific advice. According to this page:

it appears that the HF Datasets use CSV/DataFrame for storing annotations. So these would need to be converted into YOLO text files to train with.

I am using that dataset format, for my custom dataset

Hello! Thanks for reaching out.

While we don’t offer direct integration for training with Hugging Face datasets, it’s certainly possible by converting your dataset into the standard YOLO format that our models expect.

You will need to create a script to iterate through your Hugging Face dataset, save the images, and convert the annotations into .txt files with normalized class x_center y_center width height coordinates. You’ll also need a data.yaml file to define your dataset paths and class names. You can find a clear example of the required structure in our Ultralytics HUB Datasets documentation.

For your model comparison, we recommend using Ultralytics YOLO11, as it is our latest and most stable model, delivering state-of-the-art performance.

I hope this helps you get started