- The only dataset required in this repo is ImageNet, which is enough for pretraining, finetuning, linear evaluation and few-shot evaluation. If you want to evaluate on COCO, LVIS, ADE20k and robustness datasets, please follow the corresponding repos to prepare the data.
- Python >=3.7
- We recommend to use Pytorch1.11 for a faster training speed.
- timm == 0.6.12
- numpy == 1.21.5
- tensorboard
To run few-shot evaluation, cyanure package is further required. You can install it with
pip install cyanure-openblas
# or pip install cyanure-mkl
Download and extract ImageNet train and val images from http://image-net.org/.
The directory structure is the standard layout for the torchvision datasets.ImageFolder, and the training and validation data is expected to be in the train/ folder and val folder respectively:
/path/to/imagenet/
├── train/
│ ├── class1/
│ │ ├── img1.JPEG
| │ ├── img2.JPEG
| │ ├── img3.JPEG
| │ └── ...
│ ├── class2/
| │ └── ...
│ ├── class3/
| │ └── ...
| └── ...
└─── val
│ ├── class1/
│ │ ├── img4.JPEG
| │ ├── img5.JPEG
| │ ├── img6.JPEG
| │ └── ...
│ ├── class2/
| │ └── ...
│ ├── class3/
| │ └── ...
Note that raw val images are not put into class folders, use this script to get correct layout.