2019-12-14 01:31:27 +00:00
|
|
|
#!/bin/bash
|
|
|
|
# Zip coco folder
|
|
|
|
# zip -r coco.zip coco
|
|
|
|
# tar -czvf coco.tar.gz coco
|
|
|
|
|
|
|
|
# Download labels from Google Drive, accepting presented query
|
|
|
|
filename="coco2017labels.zip"
|
|
|
|
fileid="1cXZR_ckHki6nddOmcysCuuJFM--T-Q6L"
|
|
|
|
curl -c ./cookie -s -L "https://drive.google.com/uc?export=download&id=${fileid}" > /dev/null
|
|
|
|
curl -Lb ./cookie "https://drive.google.com/uc?export=download&confirm=`awk '/download/ {print $NF}' ./cookie`&id=${fileid}" -o ${filename}
|
2019-12-14 01:34:19 +00:00
|
|
|
rm ./cookie
|
2019-12-14 01:31:27 +00:00
|
|
|
|
|
|
|
# Unzip labels
|
|
|
|
unzip -q ${filename} # for coco.zip
|
|
|
|
# tar -xzf ${filename} # for coco.tar.gz
|
2019-12-14 01:46:42 +00:00
|
|
|
rm ${filename}
|
2019-12-14 01:31:27 +00:00
|
|
|
|
|
|
|
# Download images
|
|
|
|
cd coco/images
|
|
|
|
wget -c http://images.cocodataset.org/zips/train2017.zip
|
|
|
|
wget -c http://images.cocodataset.org/zips/val2017.zip
|
|
|
|
|
|
|
|
# Unzip images
|
|
|
|
unzip -q train2017.zip
|
|
|
|
unzip -q val2017.zip
|
|
|
|
|
|
|
|
# (optional) Delete zip files
|
2019-12-14 01:46:42 +00:00
|
|
|
rm -rf *.zip
|
2019-12-14 01:31:27 +00:00
|
|
|
|
|
|
|
# cd out
|
|
|
|
cd ../..
|
|
|
|
|