選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

26 行
975B

  1. #!/bin/bash
  2. # Zip coco folder
  3. # zip -r coco.zip coco
  4. # tar -czvf coco.tar.gz coco
  5. # Download labels from Google Drive, accepting presented query
  6. filename="coco2017labels.zip"
  7. fileid="1cXZR_ckHki6nddOmcysCuuJFM--T-Q6L"
  8. curl -c ./cookie -s -L "https://drive.google.com/uc?export=download&id=${fileid}" > /dev/null
  9. curl -Lb ./cookie "https://drive.google.com/uc?export=download&confirm=`awk '/download/ {print $NF}' ./cookie`&id=${fileid}" -o ${filename}
  10. rm ./cookie
  11. # Unzip labels
  12. unzip -q ${filename} # for coco.zip
  13. # tar -xzf ${filename} # for coco.tar.gz
  14. rm ${filename}
  15. # Download and unzip images
  16. cd coco/images
  17. f="train2017.zip" && curl http://images.cocodataset.org/zips/$f -o $f && unzip -q $f && rm $f # 19G, 118k images
  18. f="val2017.zip" && curl http://images.cocodataset.org/zips/$f -o $f && unzip -q $f && rm $f # 1G, 5k images
  19. # f="test2017.zip" && curl http://images.cocodataset.org/zips/$f -o $f && unzip -q $f && rm $f # 7G, 41k images
  20. # cd out
  21. cd ../..