Skip to content

ethanhe42/mini-ImageNet

Repository files navigation

Generate mini-ImageNet with ImageNet

GitHub - yihui-he/mini-ImageNet: Generate mini-ImageNet with ImageNet for fewshot learning

for both caffe and torch style input

prepare ImageNet

mkdir train && mv ILSVRC2012_img_train.tar train/ && cd train
tar -xvf ILSVRC2012_img_train.tar && rm -f ILSVRC2012_img_train.tar
find . -name "*.tar" | while read NAME ; do mkdir -p "${NAME%.tar}"; tar -xvf "${NAME}" -C "${NAME%.tar}"; rm -f "${NAME}"; done
cd ..
mkdir val && mv ILSVRC2012_img_val.tar val/ && cd val && tar -xvf ILSVRC2012_img_val.tar
wget -qO- https://raw.githubusercontent.com/soumith/imagenetloader.torch/master/valprep.sh | bash
rm -f ILSVRC2012_img_val.tar

without deleting *.tar

mkdir train && mv ILSVRC2012_img_train.tar train/ && cd train
tar -xvf ILSVRC2012_img_train.tar
find . -name "*.tar" | while read NAME ; do mkdir -p "${NAME%.tar}"; tar -xvf "${NAME}" -C "${NAME%.tar}"; rm -f "${NAME}"; done
cd ..
mkdir val && mv ILSVRC2012_img_val.tar val/ && cd val && tar -xvf ILSVRC2012_img_val.tar
wget -qO- https://raw.githubusercontent.com/soumith/imagenetloader.torch/master/valprep.sh | bash

Generate mini-ImageNet

python generate.py

About

Generate mini-ImageNet with ImageNet for fewshot learning

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published