glenn-jocher commited on
Commit
b760ace
1 Parent(s): 441b47c

Created using Colaboratory

Browse files
Files changed (1) hide show
  1. tutorial.ipynb +9 -10
tutorial.ipynb CHANGED
@@ -505,7 +505,7 @@
505
  "id": "eyTZYGgRjnMc"
506
  },
507
  "source": [
508
- "## COCO val2017\n",
509
  "Download [COCO val 2017](https://github.com/ultralytics/yolov5/blob/74b34872fdf41941cddcf243951cdb090fbac17b/data/coco.yaml#L14) dataset (1GB - 5000 images), and test model accuracy."
510
  ]
511
  },
@@ -533,8 +533,8 @@
533
  "outputId": "7e6f5c96-c819-43e1-cd03-d3b9878cf8de"
534
  },
535
  "source": [
536
- "# Download COCO val2017\n",
537
- "torch.hub.download_url_to_file('https://github.com/ultralytics/yolov5/releases/download/v1.0/coco2017val.zip', 'tmp.zip')\n",
538
  "!unzip -q tmp.zip -d ../datasets && rm tmp.zip"
539
  ],
540
  "execution_count": null,
@@ -567,7 +567,7 @@
567
  "outputId": "3dd0e2fc-aecf-4108-91b1-6392da1863cb"
568
  },
569
  "source": [
570
- "# Run YOLOv5x on COCO val2017\n",
571
  "!python val.py --weights yolov5x.pt --data coco.yaml --img 640 --iou 0.65 --half"
572
  ],
573
  "execution_count": null,
@@ -627,7 +627,7 @@
627
  "id": "rc_KbFk0juX2"
628
  },
629
  "source": [
630
- "## COCO test-dev2017\n",
631
  "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."
632
  ]
633
  },
@@ -638,10 +638,9 @@
638
  },
639
  "source": [
640
  "# Download COCO test-dev2017\n",
641
- "torch.hub.download_url_to_file('https://github.com/ultralytics/yolov5/releases/download/v1.0/coco2017labels.zip', 'tmp.zip')\n",
642
- "!unzip -q tmp.zip -d ../ && rm tmp.zip # unzip labels\n",
643
- "!f=\"test2017.zip\" && curl http://images.cocodataset.org/zips/$f -o $f && unzip -q $f && rm $f # 7GB, 41k images\n",
644
- "%mv ./test2017 ../coco/images # move to /coco"
645
  ],
646
  "execution_count": null,
647
  "outputs": []
@@ -652,7 +651,7 @@
652
  "id": "29GJXAP_lPrt"
653
  },
654
  "source": [
655
- "# Run YOLOv5s on COCO test-dev2017 using --task test\n",
656
  "!python val.py --weights yolov5s.pt --data coco.yaml --task test"
657
  ],
658
  "execution_count": null,
 
505
  "id": "eyTZYGgRjnMc"
506
  },
507
  "source": [
508
+ "## COCO val\n",
509
  "Download [COCO val 2017](https://github.com/ultralytics/yolov5/blob/74b34872fdf41941cddcf243951cdb090fbac17b/data/coco.yaml#L14) dataset (1GB - 5000 images), and test model accuracy."
510
  ]
511
  },
 
533
  "outputId": "7e6f5c96-c819-43e1-cd03-d3b9878cf8de"
534
  },
535
  "source": [
536
+ "# Download COCO val\n",
537
+ "torch.hub.download_url_to_file('https://ultralytics.com/assets/coco2017val.zip', 'tmp.zip')\n",
538
  "!unzip -q tmp.zip -d ../datasets && rm tmp.zip"
539
  ],
540
  "execution_count": null,
 
567
  "outputId": "3dd0e2fc-aecf-4108-91b1-6392da1863cb"
568
  },
569
  "source": [
570
+ "# Run YOLOv5x on COCO val\n",
571
  "!python val.py --weights yolov5x.pt --data coco.yaml --img 640 --iou 0.65 --half"
572
  ],
573
  "execution_count": null,
 
627
  "id": "rc_KbFk0juX2"
628
  },
629
  "source": [
630
+ "## COCO test\n",
631
  "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."
632
  ]
633
  },
 
638
  },
639
  "source": [
640
  "# Download COCO test-dev2017\n",
641
+ "torch.hub.download_url_to_file('https://ultralytics.com/assets/coco2017labels.zip', 'tmp.zip')\n",
642
+ "!unzip -q tmp.zip -d ../datasets && rm tmp.zip # unzip labels\n",
643
+ "!f=\"test2017.zip\" && curl http://images.cocodataset.org/zips/$f -o $f && unzip -q $f -d ../datasets/coco/images # 7GB 41k images"
 
644
  ],
645
  "execution_count": null,
646
  "outputs": []
 
651
  "id": "29GJXAP_lPrt"
652
  },
653
  "source": [
654
+ "# Run YOLOv5s on COCO test\n",
655
  "!python val.py --weights yolov5s.pt --data coco.yaml --task test"
656
  ],
657
  "execution_count": null,