# Get Imagenet Ready

## Step 0, download the imagenet

```
wget --continue http://www.image-net.org/challenges/LSVRC/2012/nnoupb/ILSVRC2012_img_train.tar
wget --continue http://www.image-net.org/challenges/LSVRC/2012/nnoupb/ILSVRC2012_img_val.tar
```

## Step 1, check train and val images

`python 01_check_train_and_val_txt.py`

## Step 2, fetch the subsets

## Fetch subsets in the training data

1. `python 02_fetch_subset_train.py > subset_train.sh`
2. then run the output bash scripts `bash subset_train.sh ./imagenet/train ../restricted_imagenet_data/data/train`

## Fetch subsets in the test data

1. `python 02_fetch_subset_test.py > subset_test.sh`
2. then run the output bash scripts `bash subset_test.sh ./imagenet/val ../restricted_imagenet_data/data/val`
