Dataset autodownload feature addition (#685)
* initial commit * move download scripts into data/scripts * new check_dataset() function in general.py * move check_dataset() out of with context * Update general.py * DDP update * Update general.pypull/1/head
parent
3d8ed0a76b
commit
41523e2c91
@ -1,30 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# COCO 2017 dataset http://cocodataset.org
|
|
||||||
# Download command: bash yolov5/data/get_coco2017.sh
|
|
||||||
# Train command: python train.py --data coco.yaml
|
|
||||||
# Default dataset location is next to /yolov5:
|
|
||||||
# /parent_folder
|
|
||||||
# /coco
|
|
||||||
# /yolov5
|
|
||||||
|
|
||||||
|
|
||||||
# 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
|
|
||||||
|
|
||||||
# Unzip labels
|
|
||||||
unzip -q ${filename} # for coco.zip
|
|
||||||
# tar -xzf ${filename} # for coco.tar.gz
|
|
||||||
rm ${filename}
|
|
||||||
|
|
||||||
# Download and unzip images
|
|
||||||
cd coco/images
|
|
||||||
f="train2017.zip" && curl http://images.cocodataset.org/zips/$f -o $f && unzip -q $f && rm $f # 19G, 118k images
|
|
||||||
f="val2017.zip" && curl http://images.cocodataset.org/zips/$f -o $f && unzip -q $f && rm $f # 1G, 5k images
|
|
||||||
# f="test2017.zip" && curl http://images.cocodataset.org/zips/$f -o $f && unzip -q $f && rm $f # 7G, 41k images
|
|
||||||
|
|
||||||
# cd out
|
|
||||||
cd ../..
|
|
@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# COCO 2017 dataset http://cocodataset.org
|
||||||
|
# Download command: bash data/scripts/get_coco.sh
|
||||||
|
# Train command: python train.py --data coco.yaml
|
||||||
|
# Default dataset location is next to /yolov5:
|
||||||
|
# /parent_folder
|
||||||
|
# /coco
|
||||||
|
# /yolov5
|
||||||
|
|
||||||
|
# Download/unzip labels
|
||||||
|
echo 'Downloading COCO 2017 labels ...'
|
||||||
|
d='../' # unzip directory
|
||||||
|
f='coco2017labels.zip' && curl -L https://github.com/ultralytics/yolov5/releases/download/v1.0/$f -o $f
|
||||||
|
unzip -q $f -d $d && rm $f
|
||||||
|
|
||||||
|
# Download/unzip images
|
||||||
|
echo 'Downloading COCO 2017 images ...'
|
||||||
|
d='../coco/images' # unzip directory
|
||||||
|
f='train2017.zip' && curl http://images.cocodataset.org/zips/$f -o $f && unzip -q $f -d $d && rm $f # 19G, 118k images
|
||||||
|
f='val2017.zip' && curl http://images.cocodataset.org/zips/$f -o $f && unzip -q $f -d $d && rm $f # 1G, 5k images
|
||||||
|
# f='test2017.zip' && curl http://images.cocodataset.org/zips/$f -o $f && unzip -q $f -d $d && rm $f # 7G, 41k images
|
Loading…
Reference in new issue