Skip to content

HUB Datasets

Ultralytics HUB datasets are a practical solution for managing and leveraging your custom datasets.

Once uploaded, datasets can be immediately utilized for model training. This integrated approach facilitates a seamless transition from dataset management to model training, significantly simplifying the entire process.



Watch: Watch: Upload Datasets to Ultralytics HUB | Complete Walkthrough of Dataset Upload Feature

Upload Dataset

Ultralytics HUB datasets are just like YOLOv5 and YOLOv8 🚀 datasets. They use the same structure and the same label formats to keep everything simple.

Before you upload a dataset to Ultralytics HUB, make sure to place your dataset YAML file inside the dataset root directory and that your dataset YAML, directory and ZIP have the same name, as shown in the example below, and then zip the dataset directory.

For example, if your dataset is called "coco8", as our COCO8 example dataset, then you should have a coco8.yaml inside your coco8/ directory, which will create a coco8.zip when zipped:

zip -r coco8.zip coco8

You can download our COCO8 example dataset and unzip it to see exactly how to structure your dataset.

COCO8 Dataset Structure

The dataset YAML is the same standard YOLOv5 and YOLOv8 YAML format.

coco8.yaml

# Ultralytics YOLO 🚀, AGPL-3.0 license
# COCO8 dataset (first 8 images from COCO train2017) by Ultralytics
# Documentation: https://docs.ultralytics.com/datasets/detect/coco8/
# Example usage: yolo train data=coco8.yaml
# parent
# ├── ultralytics
# └── datasets
#     └── coco8  ← downloads here (1 MB)

# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
path: ../datasets/coco8 # dataset root dir
train: images/train # train images (relative to 'path') 4 images
val: images/val # val images (relative to 'path') 4 images
test: # test images (optional)

# Classes
names:
  0: person
  1: bicycle
  2: car
  3: motorcycle
  4: airplane
  5: bus
  6: train
  7: truck
  8: boat
  9: traffic light
  10: fire hydrant
  11: stop sign
  12: parking meter
  13: bench
  14: bird
  15: cat
  16: dog
  17: horse
  18: sheep
  19: cow
  20: elephant
  21: bear
  22: zebra
  23: giraffe
  24: backpack
  25: umbrella
  26: handbag
  27: tie
  28: suitcase
  29: frisbee
  30: skis
  31: snowboard
  32: sports ball
  33: kite
  34: baseball bat
  35: baseball glove
  36: skateboard
  37: surfboard
  38: tennis racket
  39: bottle
  40: wine glass
  41: cup
  42: fork
  43: knife
  44: spoon
  45: bowl
  46: banana
  47: apple
  48: sandwich
  49: orange
  50: broccoli
  51: carrot
  52: hot dog
  53: pizza
  54: donut
  55: cake
  56: chair
  57: couch
  58: potted plant
  59: bed
  60: dining table
  61: toilet
  62: tv
  63: laptop
  64: mouse
  65: remote
  66: keyboard
  67: cell phone
  68: microwave
  69: oven
  70: toaster
  71: sink
  72: refrigerator
  73: book
  74: clock
  75: vase
  76: scissors
  77: teddy bear
  78: hair drier
  79: toothbrush

# Download script/URL (optional)
download: https://ultralytics.com/assets/coco8.zip

After zipping your dataset, you should validate it before uploading it to Ultralytics HUB. Ultralytics HUB conducts the dataset validation check post-upload, so by ensuring your dataset is correctly formatted and error-free ahead of time, you can forestall any setbacks due to dataset rejection.

from ultralytics.hub import check_dataset

check_dataset('path/to/coco8.zip')

Once your dataset ZIP is ready, navigate to the Datasets page by clicking on the Datasets button in the sidebar.

Ultralytics HUB screenshot of the Home page with an arrow pointing to the Datasets button in the sidebar

Click on the Upload Dataset button on the top right of the page. This action will trigger the Upload Dataset dialog.

Ultralytics HUB screenshot of the Dataset page with an arrow pointing to the Upload Dataset button

Upload your dataset in the Dataset .zip file field.

You have the additional option to set a custom name and description for your Ultralytics HUB dataset.

When you're happy with your dataset configuration, click Upload.

Ultralytics HUB screenshot of the Upload Dataset dialog with an arrow pointing to the Upload button

After your dataset is uploaded and processed, you will be able to access it from the Datasets page.

Ultralytics HUB screenshot of the Datasets page with an arrow pointing to one of the datasets

You can view the images in your dataset grouped by splits (Train, Validation, Test).

Ultralytics HUB screenshot of the Dataset page with an arrow pointing to the Images tab

Tip

Each image can be enlarged for better visualization.

Ultralytics HUB screenshot of the Images tab inside the Dataset page with an arrow pointing to the expand icon

Ultralytics HUB screenshot of the Images tab inside the Dataset page with one of the images expanded

Also, you can analyze your dataset by click on the Overview tab.

Ultralytics HUB screenshot of the Dataset page with an arrow pointing to the Overview tab

Next, train a model on your dataset.

Ultralytics HUB screenshot of the Dataset page with an arrow pointing to the Train Model button

Share Dataset

Info

Ultralytics HUB's sharing functionality provides a convenient way to share datasets with others. This feature is designed to accommodate both existing Ultralytics HUB users and those who have yet to create an account.

Note

You have control over the general access of your datasets.

You can choose to set the general access to "Private", in which case, only you will have access to it. Alternatively, you can set the general access to "Unlisted" which grants viewing access to anyone who has the direct link to the dataset, regardless of whether they have an Ultralytics HUB account or not.

Navigate to the Dataset page of the dataset you want to share, open the dataset actions dropdown and click on the Share option. This action will trigger the Share Dataset dialog.

Ultralytics HUB screenshot of the Dataset page with an arrow pointing to the Share option

Tip

You can also share a dataset directly from the Datasets page.

Ultralytics HUB screenshot of the Datasets page with an arrow pointing to the Share option of one of the datasets

Set the general access to "Unlisted" and click Save.

Ultralytics HUB screenshot of the Share Dataset dialog with an arrow pointing to the dropdown and one to the Save button

Now, anyone who has the direct link to your dataset can view it.

Tip

You can easily click on the dataset's link shown in the Share Dataset dialog to copy it.

Ultralytics HUB screenshot of the Share Dataset dialog with an arrow pointing to the dataset's link

Edit / Delete Dataset

Navigate to the Dataset page of the dataset you want to edit, open the dataset actions dropdown and click on the Edit option. This action will trigger the Update Dataset dialog.

Ultralytics HUB screenshot of the Dataset page with an arrow pointing to the Edit and Delete option

Apply the desired modifications to your dataset and then confirm the changes by clicking Save.

Navigate to the Dataset page of the dataset you want to delete, open the dataset actions dropdown and click on the Delete option. This action will delete the dataset.

Note

If you change your mind, you can restore the dataset from the Trash page.

Ultralytics HUB screenshot of the Trash page with an arrow pointing to the Restore option of one of the datasets



Created 2023-11-12, Updated 2024-02-13
Authors: glenn-jocher (4), priytosh-tripathi (1), RizwanMunawar (1), sergiuwaxmann (1), Laughing-q (1)

Comments