-
-
Notifications
You must be signed in to change notification settings - Fork 16.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.py
- Loading branch information
1 parent
3d8ed0a
commit 41523e2
Showing
9 changed files
with
95 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ | |
from models.experimental import attempt_load | ||
from utils.datasets import create_dataloader | ||
from utils.general import ( | ||
coco80_to_coco91_class, check_file, check_img_size, compute_loss, non_max_suppression, | ||
coco80_to_coco91_class, check_dataset, check_file, check_img_size, compute_loss, non_max_suppression, | ||
scale_coords, xyxy2xywh, clip_coords, plot_images, xywh2xyxy, box_iou, output_to_target, ap_per_class) | ||
from utils.torch_utils import select_device, time_synchronized | ||
|
||
|
@@ -68,6 +68,7 @@ def test(data, | |
model.eval() | ||
with open(data) as f: | ||
data = yaml.load(f, Loader=yaml.FullLoader) # model dict | ||
check_dataset(data) # check | ||
nc = 1 if single_cls else int(data['nc']) # number of classes | ||
iouv = torch.linspace(0.5, 0.95, 10).to(device) # iou vector for [email protected]:0.95 | ||
niou = iouv.numel() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters