sxzrt / CIFAR-10-W

CIFAR-10-Warehouse: Towards Broad and More Realistic Testbeds in Model Generalization Analysis
MIT License
16 stars 0 forks source link

Linux bash script to get all splits in one go #2

Open black0017 opened 1 month ago

black0017 commented 1 month ago

Hello @sxzrt , using gdown in my python env i was able to download all splits with this bash script. Maybe it will be helpful to your or other researchers.

out_path=$"your/amazing/path/to/cifar10w"
cd $out_path
gdown https://drive.google.com/uc?id=18RKtnxfKGiFTXvDsT4nd9ve04bUt2J3H
gdown https://drive.google.com/uc?id=1yz56SW9NJzqcon-2Jj2Slnb9ANPHbC28
gdown https://drive.google.com/uc?id=1YSGQtxcmpnSiHsveAyR5TR2l_5vCzxKl
gdown https://drive.google.com/uc?id=1b9E7W_gu1845DADALJmB9UulofsoCDoW
gdown https://drive.google.com/uc?id=1aT1zlgEQxuL2FjlZTIZpXDyVgWhUy4Fi
gdown https://drive.google.com/uc?id=1fIVQa0Ma04B2n-_RdwOqQkt2rV7Zdo9U
gdown https://drive.google.com/uc?id=1p3zzK5M4elIXAbcLKNXXSIu3Uiu9SxL5
gdown https://drive.google.com/uc?id=1ITAS0ESiLfP9oRkT3OXoYByI5iDbB9fd
gdown https://drive.google.com/uc?id=113T3SMgIBfZJIw7XxZaXoOfIIUyPU4WL
gdown https://drive.google.com/uc?id=1WravuqPV1UrSEaoP6bAlu7ZvxwbNHMpX
gdown https://drive.google.com/uc?id=1zH8zW1ri6bL4Zgb0lsdZM-EeM_aTZYHO
gdown https://drive.google.com/uc?id=1UMAFveY2gTJcebEn56OUDzhoCtc6uUi7 
gdown https://drive.google.com/uc?id=1cQyStZe0u-t9sjjUitqioP5OO9Qfalga

# get downloaded files and extract them in the same directory
for file in `ls *.zip`
do
    unzip $file
    rm $file
done

Feel free to add in the repo if you wish! Hope it's helpful!

sxzrt commented 1 month ago

Thank you so much for sharing this, @sxzrt! This is incredibly helpful. I will definitely add it to the repository. Your contribution will be valuable for other researchers as well. Thanks again!