From 6b8425b9ec21740c3a8fb9d22e57221accadc709 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Fri, 13 Dec 2019 17:31:27 -0800 Subject: [PATCH] updates --- data/get_coco2017.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 data/get_coco2017.sh diff --git a/data/get_coco2017.sh b/data/get_coco2017.sh new file mode 100755 index 00000000..6569e379 --- /dev/null +++ b/data/get_coco2017.sh @@ -0,0 +1,31 @@ +#!/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} +rm ./cookie ./$filename + +# Unzip labels +unzip -q ${filename} # for coco.zip +# tar -xzf ${filename} # for coco.tar.gz + +# 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 +rm -rf *.zip + +# cd out +cd ../.. +