2019-12-13 18:52:08 -08: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="coco2014labels.zip"
|
|
|
|
|
fileid="1s6-CmF5_SElM28r52P1OUrCcuXZN-SFo"
|
2020-08-22 17:49:27 -07:00
|
|
|
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-13 18:52:08 -08:00
|
|
|
rm ./cookie
|
|
|
|
|
|
|
|
|
|
# Unzip labels
|
2020-08-22 17:49:27 -07:00
|
|
|
unzip -q ${filename} # for coco.zip
|
|
|
|
|
# tar -xzf ${filename} # for coco.tar.gz
|
2019-12-13 18:52:08 -08:00
|
|
|
rm ${filename}
|
|
|
|
|
|
2019-12-21 19:30:22 -08:00
|
|
|
# Download and unzip images
|
2019-12-13 18:52:08 -08:00
|
|
|
cd coco/images
|
2019-12-21 19:30:22 -08:00
|
|
|
f="train2014.zip" && curl http://images.cocodataset.org/zips/$f -o $f && unzip -q $f && rm $f
|
|
|
|
|
f="val2014.zip" && curl http://images.cocodataset.org/zips/$f -o $f && unzip -q $f && rm $f
|
2019-12-13 18:52:08 -08:00
|
|
|
|
|
|
|
|
# cd out
|
|
|
|
|
cd ../..
|