|
|
|
|
|
|
|
|
"id": "eyTZYGgRjnMc" |
|
|
"id": "eyTZYGgRjnMc" |
|
|
}, |
|
|
}, |
|
|
"source": [ |
|
|
"source": [ |
|
|
"## COCO val2017\n", |
|
|
|
|
|
|
|
|
"## COCO val\n", |
|
|
"Download [COCO val 2017](https://github.com/ultralytics/yolov5/blob/74b34872fdf41941cddcf243951cdb090fbac17b/data/coco.yaml#L14) dataset (1GB - 5000 images), and test model accuracy." |
|
|
"Download [COCO val 2017](https://github.com/ultralytics/yolov5/blob/74b34872fdf41941cddcf243951cdb090fbac17b/data/coco.yaml#L14) dataset (1GB - 5000 images), and test model accuracy." |
|
|
] |
|
|
] |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
"outputId": "7e6f5c96-c819-43e1-cd03-d3b9878cf8de" |
|
|
"outputId": "7e6f5c96-c819-43e1-cd03-d3b9878cf8de" |
|
|
}, |
|
|
}, |
|
|
"source": [ |
|
|
"source": [ |
|
|
"# Download COCO val2017\n", |
|
|
|
|
|
"torch.hub.download_url_to_file('https://github.com/ultralytics/yolov5/releases/download/v1.0/coco2017val.zip', 'tmp.zip')\n", |
|
|
|
|
|
|
|
|
"# Download COCO val\n", |
|
|
|
|
|
"torch.hub.download_url_to_file('https://ultralytics.com/assets/coco2017val.zip', 'tmp.zip')\n", |
|
|
"!unzip -q tmp.zip -d ../datasets && rm tmp.zip" |
|
|
"!unzip -q tmp.zip -d ../datasets && rm tmp.zip" |
|
|
], |
|
|
], |
|
|
"execution_count": null, |
|
|
"execution_count": null, |
|
|
|
|
|
|
|
|
"outputId": "3dd0e2fc-aecf-4108-91b1-6392da1863cb" |
|
|
"outputId": "3dd0e2fc-aecf-4108-91b1-6392da1863cb" |
|
|
}, |
|
|
}, |
|
|
"source": [ |
|
|
"source": [ |
|
|
"# Run YOLOv5x on COCO val2017\n", |
|
|
|
|
|
|
|
|
"# Run YOLOv5x on COCO val\n", |
|
|
"!python val.py --weights yolov5x.pt --data coco.yaml --img 640 --iou 0.65 --half" |
|
|
"!python val.py --weights yolov5x.pt --data coco.yaml --img 640 --iou 0.65 --half" |
|
|
], |
|
|
], |
|
|
"execution_count": null, |
|
|
"execution_count": null, |
|
|
|
|
|
|
|
|
"id": "rc_KbFk0juX2" |
|
|
"id": "rc_KbFk0juX2" |
|
|
}, |
|
|
}, |
|
|
"source": [ |
|
|
"source": [ |
|
|
"## COCO test-dev2017\n", |
|
|
|
|
|
|
|
|
"## COCO test\n", |
|
|
"Download [COCO test2017](https://github.com/ultralytics/yolov5/blob/74b34872fdf41941cddcf243951cdb090fbac17b/data/coco.yaml#L15) dataset (7GB - 40,000 images), to test model accuracy on test-dev set (**20,000 images, no labels**). Results are saved to a `*.json` file which should be **zipped** and submitted to the evaluation server at https://competitions.codalab.org/competitions/20794." |
|
|
"Download [COCO test2017](https://github.com/ultralytics/yolov5/blob/74b34872fdf41941cddcf243951cdb090fbac17b/data/coco.yaml#L15) dataset (7GB - 40,000 images), to test model accuracy on test-dev set (**20,000 images, no labels**). Results are saved to a `*.json` file which should be **zipped** and submitted to the evaluation server at https://competitions.codalab.org/competitions/20794." |
|
|
] |
|
|
] |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
"source": [ |
|
|
"source": [ |
|
|
"# Download COCO test-dev2017\n", |
|
|
"# Download COCO test-dev2017\n", |
|
|
"torch.hub.download_url_to_file('https://github.com/ultralytics/yolov5/releases/download/v1.0/coco2017labels.zip', 'tmp.zip')\n", |
|
|
|
|
|
"!unzip -q tmp.zip -d ../ && rm tmp.zip # unzip labels\n", |
|
|
|
|
|
"!f=\"test2017.zip\" && curl http://images.cocodataset.org/zips/$f -o $f && unzip -q $f && rm $f # 7GB, 41k images\n", |
|
|
|
|
|
"%mv ./test2017 ../coco/images # move to /coco" |
|
|
|
|
|
|
|
|
"torch.hub.download_url_to_file('https://ultralytics.com/assets/coco2017labels.zip', 'tmp.zip')\n", |
|
|
|
|
|
"!unzip -q tmp.zip -d ../datasets && rm tmp.zip # unzip labels\n", |
|
|
|
|
|
"!f=\"test2017.zip\" && curl http://images.cocodataset.org/zips/$f -o $f && unzip -q $f -d ../datasets/coco/images # 7GB 41k images" |
|
|
], |
|
|
], |
|
|
"execution_count": null, |
|
|
"execution_count": null, |
|
|
"outputs": [] |
|
|
"outputs": [] |
|
|
|
|
|
|
|
|
"id": "29GJXAP_lPrt" |
|
|
"id": "29GJXAP_lPrt" |
|
|
}, |
|
|
}, |
|
|
"source": [ |
|
|
"source": [ |
|
|
"# Run YOLOv5s on COCO test-dev2017 using --task test\n", |
|
|
|
|
|
|
|
|
"# Run YOLOv5s on COCO test\n", |
|
|
"!python val.py --weights yolov5s.pt --data coco.yaml --task test" |
|
|
"!python val.py --weights yolov5s.pt --data coco.yaml --task test" |
|
|
], |
|
|
], |
|
|
"execution_count": null, |
|
|
"execution_count": null, |