You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

get_coco2017.sh 1.1KB

4 年之前
4 年之前
4 年之前
123456789101112131415161718192021222324252627282930
  1. #!/bin/bash
  2. # COCO 2017 dataset http://cocodataset.org
  3. # Download command: bash yolov5/data/get_coco2017.sh
  4. # Train command: python train.py --data coco.yaml
  5. # Default dataset location is next to /yolov5:
  6. # /parent_folder
  7. # /coco
  8. # /yolov5
  9. # Download labels from Google Drive, accepting presented query
  10. filename="coco2017labels.zip"
  11. fileid="1cXZR_ckHki6nddOmcysCuuJFM--T-Q6L"
  12. curl -c ./cookie -s -L "https://drive.google.com/uc?export=download&id=${fileid}" > /dev/null
  13. curl -Lb ./cookie "https://drive.google.com/uc?export=download&confirm=`awk '/download/ {print $NF}' ./cookie`&id=${fileid}" -o ${filename}
  14. rm ./cookie
  15. # Unzip labels
  16. unzip -q ${filename} # for coco.zip
  17. # tar -xzf ${filename} # for coco.tar.gz
  18. rm ${filename}
  19. # Download and unzip images
  20. cd coco/images
  21. f="train2017.zip" && curl http://images.cocodataset.org/zips/$f -o $f && unzip -q $f && rm $f # 19G, 118k images
  22. f="val2017.zip" && curl http://images.cocodataset.org/zips/$f -o $f && unzip -q $f && rm $f # 1G, 5k images
  23. # f="test2017.zip" && curl http://images.cocodataset.org/zips/$f -o $f && unzip -q $f && rm $f # 7G, 41k images
  24. # cd out
  25. cd ../..