| # Preparation | |
| ### Install the dependencies | |
| ```bash | |
| pip install -r requirements-training.txt | |
| pip install -v -e . | |
| ``` | |
| ### Data Preparation | |
| We need to prepare [ImageNet-1k](http://www.image-net.org/) 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 | |
| ``` | |