Pre-processing to convert imagenet-1k to PyTorch's ImageFolder arrangement
https://huggingface.co/datasets/ILSVRC/imagenet-1k
I modified it a bit to work with the following code. Thanks so much for the following codeš
https://stackoverflow.com/a/78633633
git clone https://github.com/saten-private/imagenet-1k-image-folder-preprocessing.git
- Create a
train
folder under the repository. - Download
train_images_X.tar.gz
from here. - Extract the images from
train_images_X.tar.gz
into thetrain
folder. - Run
python train_preprocessing.py
. The process divides thetrain
folder into folders with class names and relocates them.
- Create a
val
folder under the repository. - Download
val_images.tar.gz
from here. - Extract the images from
val_images.tar.gz
into theval
folder. - Run
python val_preprocessing.py
. The process divides theval
folder into folders with class names and relocates them.