Dataset Upload Guidelines

Learn how to structure your ZIP files for different annotation formats

YOLO Format Structure

The YOLO (You Only Look Once) format requires specific structure in your ZIP file:

  • Images must be in an images/ folder
  • Labels must be in a labels/ folder
  • Each label file should correspond to an image file (same name, .txt extension)
  • A data.yaml file must be at the root
  • Supported image formats: JPG, PNG, JPEG

Each YOLO annotation text file should:

  • Contain one line per annotation
  • Bounding box: Each line should have the format: class_id center_x center_y width height
  • Polygon: Each line should have the format: class_id x1 y1 x2 y2...
  • All values after class_id are relative to the image width and height (0.0-1.0)

Expected Structure:

root_folder/

├── data.yaml

├── images/

├── image1.jpg

└── image2.jpg

└── labels/

├── image1.txt

└── image2.txt

Example data.yaml:


nc: 3
names:
  - person
  - car
  - dog

Example annotation (image1.txt):

0 0.5 0.5 0.2 0.3
1 0.7 0.7 0.1 0.1

LabelMe Format Structure

The LabelMe format requires a specific organization in your ZIP file:

  • All images must be in an images/ folder
  • Note that "imagePath" attribute can also reference just image file name
  • Annotations must be in a labels/ folder
  • Each annotation file must correspond to an image file with the same name but .json extension
  • Supported image formats: JPG, PNG, JPEG

Make sure your LabelMe JSON files follow the standard LabelMe format with:

  • Image path, width, and height information
  • Shapes array containing annotations with label, points, shape_type, and flags
  • Image path key can contain just filename of image
  • Valid polygon or rectangle

Expected Structure:

root_folder/

├── images/

├── image1.jpg

└── image2.jpg

└── labels/

├── image1.json

└── image2.json

Example LabelMe JSON Structure:

{
  "version": "4.5.6",
  "flags": {},
  "shapes": [
    {
      "label": "dog",
      "points": [
        [100, 100],
        [300, 100],
        [300, 300],
        [100, 300]
      ],
      "group_id": null,
      "shape_type": "polygon",
      "flags": {}
    }
  ],
  "imagePath": "../images/image1.jpg", // Or just file name (image1.jpg)
  "imageData": null,
  "imageHeight": 480,
  "imageWidth": 640
}

COCO Format Structure

The COCO (Common Objects in Context) format requires a specific structure in your ZIP file:

  • All images must be in an images/ folder
  • Annotations must be in a single JSON file named _annotations.coco.json
  • The JSON file should be at the root of the archive
  • Supported image formats: JPG, PNG, JPEG

Make sure your COCO JSON file follows the official COCO format with:

  • A list of image objects with id, width, height, and filename
  • A list of annotation objects with id, image_id, category_id, segmentation, area, bbox, and iscrowd
  • A list of categories with id and name

Expected Structure:

root_folder/

├── images/

├── image1.jpg

└── image2.jpg

└── _annotations.coco.json

Example COCO JSON Structure:

{
  "images": [
    {
      "id": 1,
      "width": 640,
      "height": 480,
      "file_name": "image1.jpg"
    },
    {
      "id": 2,
      "width": 640,
      "height": 480,
      "file_name": "image2.jpg"
    }
  ],
  "annotations": [
    {
      "id": 1,
      "image_id": 1,
      "category_id": 1,
      "bbox": [100, 100, 200, 200],
      "segmentation": [[100, 100, 200, 100, 200, 200, 100, 200]]
    },
    {
      "id": 2,
      "image_id": 2,
      "category_id": 2,
      "bbox": [150, 150, 250, 250],
      "segmentation": [[150, 150, 250, 150, 250, 250, 150, 250]]
    }
  ],
  "categories": [
    {"id": 1, "name": "dog"},
    {"id": 2, "name": "cat"}
  ]
}

Pascal VOC Format Structure

The Pascal VOC (Visual Object Classes) format requires a specific structure in your ZIP file:

  • Images and their corresponding XML files must be at the root level
  • Each image must have a matching XML file with the same name
  • XML files contain annotation data for each image
  • Supported image formats: JPG, PNG, JPEG

Make sure your Pascal VOC XML files follow the official format with:

  • Image filename, size (width, height, depth), and source information
  • Object definitions with name, pose, truncated, difficult flags
  • Bounding box coordinates (xmin, ymin, xmax, ymax)
  • Optional segmentation information when available

Expected Structure:

root_folder/

├── image1.jpg

├── image2.jpg

├── image1.xml

└── image2.xml

Example Pascal VOC XML Structure:

<annotation>
  <folder>VOC2012</folder>
  <filename>image1.jpg</filename>
  <source>
    <database>The VOC Database</database>
    <annotation>PASCAL VOC</annotation>
  </source>
  <size>
    <width>640</width>
    <height>480</height>
    <depth>3</depth>
  </size>
  <segmented>0</segmented>
  <object>
    <name>dog</name>
    <pose>Unspecified</pose>
    <truncated>0</truncated>
    <difficult>0</difficult>
    <bndbox>
      <xmin>100</xmin>
      <ymin>100</ymin>
      <xmax>300</xmax>
      <ymax>300</ymax>
    </bndbox>
  </object>
  <object>
    <name>cat</name>
    <pose>Unspecified</pose>
    <truncated>0</truncated>
    <difficult>0</difficult>
    <bndbox>
      <xmin>150</xmin>
      <ymin>150</ymin>
      <xmax>400</xmax>
      <ymax>400</ymax>
    </bndbox>
    <polygon>
      <x1>3765</x1>
      <y1>1175</y1>
      <x2>4095</x2>
      <y2>1210</y2>
      <x3>4335</x3>
      <y3>1220</y3>
      <x4>4715</x4>
      <y4>1265</y4>
      <x5>4830</x5>
      <y5>1130</y5>
    </polygon>
  </object>
</annotation>