How to install datasets

September 29, 2024 · View on GitHub

Our dataset setting is inhereted from CoOp. We suggest putting all datasets under the same folder (say $DATA) to ease management and following the instructions below to organize datasets to avoid modifying the source code. The file structure looks like

$DATA/
|–– dtd/
|–– caltech-101/
|–– oxford_pets/
|–– food101/

If you have some datasets already installed somewhere else, you can create symbolic links in $DATA/dataset_name that point to the original data to avoid duplicate download.

Datasets list:

The instructions to prepare each dataset are detailed below. To ensure reproducibility and fair comparison for future work, we provide fixed train/val/test splits for all datasets except ImageNet where the validation set is used as test set. The fixed splits are either from the original datasets (if available) or created by us.

Caltech101

The directory structure should look like

caltech-101/
|–– 101_ObjectCategories/
|–– split_zhou_Caltech101.json

OxfordPets

The directory structure should look like

oxford_pets/
|–– images/
|–– annotations/
|–– split_zhou_OxfordPets.json

Flowers102

The directory structure should look like

oxford_flowers/
|–– cat_to_name.json
|–– imagelabels.mat
|–– jpg/
|–– split_zhou_OxfordFlowers.json

Food101

The directory structure should look like

food-101/
|–– images/
|–– license_agreement.txt
|–– meta/
|–– README.txt
|–– split_zhou_Food101.json

DTD

The directory structure should look like

dtd/
|–– images/
|–– imdb/
|–– labels/
|–– split_zhou_DescribableTextures.json