From 5648e4858c6a0c4a70aedc860e78f59364d7b617 Mon Sep 17 00:00:00 2001 From: Yunseong Kim Date: Fri, 4 Oct 2024 07:03:00 +0900 Subject: [PATCH] Check for getting ILSVRC2012 datasets from image-net.org Checking the data is exists for imagenet and download the ILSVRC2012 training and validation datasets from image-net.org. Signed-off-by: Yunseong Kim --- imagenet/extract_ILSVRC.sh | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/imagenet/extract_ILSVRC.sh b/imagenet/extract_ILSVRC.sh index 9f13ac341e..975a6ac2e7 100644 --- a/imagenet/extract_ILSVRC.sh +++ b/imagenet/extract_ILSVRC.sh @@ -22,7 +22,29 @@ # │ ├── ...... # ├── ...... # -# + +if [ ! -f ILSVRC2012_img_train.tar ]; then + read -p "There is no train data. Do you want to download ILSVRC2012_img_train.tar (about 138 GB)? (y/n): " answer + if [ "$answer" = "y" ]; then + wget https://image-net.org/data/ILSVRC/2012/ILSVRC2012_img_train.tar --no-check-certificate + else + exit + fi +else + echo "The train data 'ILSVRC2012_img_train.tar' is in the current directory." +fi + +if [ ! -f ILSVRC2012_img_val.tar ]; then + read -p "There is no train data. Do you want to download ILSVRC2012_img_val.tar (about 6.3 GB)? (y/n): " answer + if [ "$answer" = "y" ]; then + wget https://image-net.org/data/ILSVRC/2012/ILSVRC2012_img_val.tar --no-check-certificate + else + exit + fi +else + echo "The val data 'ILSVRC2012_img_val.tar' is in the current directory." +fi + # Make imagnet directory # mkdir imagenet