YOLO-World4 / docs /data.md
csmithxc's picture
Upload 146 files
1530901 verified
|
raw
history blame
No virus
4.45 kB

Preparing Data for YOLO-World

Overview

For pre-training YOLO-World, we adopt several datasets as listed in the below table:

Data Samples Type Boxes
Objects365v1 609k detection 9,621k
GQA 621k grounding 3,681k
Flickr 149k grounding 641k
CC3M-Lite 245k image-text 821k

Dataset Directory

We put all data into the data directory, such as:

β”œβ”€β”€ coco
β”‚   β”œβ”€β”€ annotations
β”‚   β”œβ”€β”€ lvis
β”‚   β”œβ”€β”€ train2017
β”‚   β”œβ”€β”€ val2017
β”œβ”€β”€ flickr
β”‚   β”œβ”€β”€ annotations
β”‚   └── images
β”œβ”€β”€ mixed_grounding
β”‚   β”œβ”€β”€ annotations
β”‚   β”œβ”€β”€ images
β”œβ”€β”€ mixed_grounding
β”‚   β”œβ”€β”€ annotations
β”‚   β”œβ”€β”€ images
β”œβ”€β”€ objects365v1
β”‚   β”œβ”€β”€ annotations
β”‚   β”œβ”€β”€ train
β”‚   β”œβ”€β”€ val

NOTE: We strongly suggest that you check the directories or paths in the dataset part of the config file, especially for the values ann_file, data_root, and data_prefix.

We provide the annotations of the pre-training data in the below table:

Acknowledgement: We sincerely thank GLIP and mdetr for providing the annotation files for pre-training.

Dataset Class

For training YOLO-World, we mainly adopt two kinds of dataset classs:

1. MultiModalDataset

MultiModalDataset is a simple wrapper for pre-defined Dataset Class, such as Objects365 or COCO, which add the texts (category texts) into the dataset instance for formatting input texts.

Text JSON

The json file is formatted as follows:

[
    ['A_1','A_2'],
    ['B'],
    ['C_1', 'C_2', 'C_3'],
    ...
]

We have provided the text json for LVIS, COCO, and Objects365

2. YOLOv5MixedGroundingDataset

The YOLOv5MixedGroundingDataset extends the COCO dataset by supporting loading texts/captions from the json file. It's desgined for MixedGrounding or Flickr30K with text tokens for each object.

πŸ”₯ Custom Datasets

For custom dataset, we suggest the users convert the annotation files according to the usage. Note that, converting the annotations to the standard COCO format is basically required.

  1. Large vocabulary, grounding, referring: you can follow the annotation format as the MixedGrounding dataset, which adds caption and tokens_positive for assigning the text for each object. The texts can be a category or a noun phrases.

  2. Custom vocabulary (fixed): you can adopt the MultiModalDataset wrapper as the Objects365 and create a text json for your custom categories.

CC3M Pseudo Annotations

The following annotations are generated according to the automatic labeling process in our paper. Adn we report the results based on these annotations.

To use CC3M annotations, you need to prepare the CC3M images first.

Data Images Boxes File
CC3M-246K 246,363 820,629 Download πŸ€—
CC3M-500K 536,405 1,784,405 Download πŸ€—
CC3M-750K 750,000 4,504,805 Download πŸ€—