DeCLIP-TPAMI / third_party /TinyCLIP /docs /PREPARATION.md
xiaomoguhzz's picture
Add files using upload-large-folder tool
979b286 verified

Preparation

Install the dependencies

pip install -r requirements-training.txt
pip install -v -e .

Data Preparation

We need to prepare ImageNet-1k datasets to do zero-shot classification task.

  • ImageNet-1k

ImageNet-1k contains 1.28 M images for training and 50 K images for validation. The train set and validation set should be saved as the *.tar archives:

ImageNet/
β”œβ”€β”€ train.tar
└── val.tar

Our code also supports storing images as individual files as follow:

ImageNet/
β”œβ”€β”€ train
β”‚   β”œβ”€β”€ n01440764
β”‚   β”‚   β”œβ”€β”€ n01440764_10026.JPEG
β”‚   β”‚   β”œβ”€β”€ n01440764_10027.JPEG
...
β”œβ”€β”€ val
β”‚   β”œβ”€β”€ n01440764
β”‚   β”‚   β”œβ”€β”€ ILSVRC2012_val_00000293.JPEG