2020-08-09 20:52:57 -07:00
|
|
|
#!/bin/bash
|
|
|
|
# COCO 2017 dataset http://cocodataset.org
|
|
|
|
# Download command: bash data/scripts/get_coco.sh
|
|
|
|
# Train command: python train.py --data coco.yaml
|
2021-04-22 12:10:26 +02:00
|
|
|
# Default dataset location is next to YOLOv5:
|
2020-08-09 20:52:57 -07:00
|
|
|
# /parent_folder
|
|
|
|
# /coco
|
|
|
|
# /yolov5
|
|
|
|
|
|
|
|
# Download/unzip labels
|
|
|
|
d='../' # unzip directory
|
2020-10-13 15:58:03 +02:00
|
|
|
url=https://github.com/ultralytics/yolov5/releases/download/v1.0/
|
2021-02-11 21:22:45 -08:00
|
|
|
f='coco2017labels.zip' # or 'coco2017labels-segments.zip', 68 MB
|
2021-02-06 22:13:39 -08:00
|
|
|
echo 'Downloading' $url$f ' ...'
|
|
|
|
curl -L $url$f -o $f && unzip -q $f -d $d && rm $f & # download, unzip, remove in background
|
2020-08-09 20:52:57 -07:00
|
|
|
|
|
|
|
# Download/unzip images
|
|
|
|
d='../coco/images' # unzip directory
|
2020-10-13 15:58:03 +02:00
|
|
|
url=http://images.cocodataset.org/zips/
|
|
|
|
f1='train2017.zip' # 19G, 118k images
|
|
|
|
f2='val2017.zip' # 1G, 5k images
|
|
|
|
f3='test2017.zip' # 7G, 41k images (optional)
|
|
|
|
for f in $f1 $f2; do
|
2021-02-06 22:13:39 -08:00
|
|
|
echo 'Downloading' $url$f '...'
|
|
|
|
curl -L $url$f -o $f && unzip -q $f -d $d && rm $f & # download, unzip, remove in background
|
2020-10-13 15:58:03 +02:00
|
|
|
done
|
2021-01-24 18:01:58 -08:00
|
|
|
wait # finish background tasks
|