mirror of
https://github.com/ultralytics/yolov5.git
synced 2025-06-03 14:49:29 +08:00
Created using Colaboratory
This commit is contained in:
parent
2eab46e2cf
commit
cac8a765c8
16
tutorial.ipynb
vendored
16
tutorial.ipynb
vendored
@ -550,7 +550,7 @@
|
|||||||
"colab": {
|
"colab": {
|
||||||
"base_uri": "https://localhost:8080/"
|
"base_uri": "https://localhost:8080/"
|
||||||
},
|
},
|
||||||
"outputId": "4576b05f-d6d1-404a-fc99-5663c71e3dc4"
|
"outputId": "9b022435-4197-41fc-abea-81f86ce857d0"
|
||||||
},
|
},
|
||||||
"source": [
|
"source": [
|
||||||
"!git clone https://github.com/ultralytics/yolov5 # clone repo\n",
|
"!git clone https://github.com/ultralytics/yolov5 # clone repo\n",
|
||||||
@ -561,14 +561,14 @@
|
|||||||
"from IPython.display import Image, clear_output # to display images\n",
|
"from IPython.display import Image, clear_output # to display images\n",
|
||||||
"\n",
|
"\n",
|
||||||
"clear_output()\n",
|
"clear_output()\n",
|
||||||
"print('Setup complete. Using torch %s %s' % (torch.__version__, torch.cuda.get_device_properties(0) if torch.cuda.is_available() else 'CPU'))"
|
"print(f\"Setup complete. Using torch {torch.__version__} ({torch.cuda.get_device_properties(0).name if torch.cuda.is_available() else 'CPU'})\")"
|
||||||
],
|
],
|
||||||
"execution_count": 1,
|
"execution_count": 31,
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"output_type": "stream",
|
"output_type": "stream",
|
||||||
"text": [
|
"text": [
|
||||||
"Setup complete. Using torch 1.8.1+cu101 _CudaDeviceProperties(name='Tesla V100-SXM2-16GB', major=7, minor=0, total_memory=16160MB, multi_processor_count=80)\n"
|
"Setup complete. Using torch 1.8.1+cu101 (Tesla V100-SXM2-16GB)\n"
|
||||||
],
|
],
|
||||||
"name": "stdout"
|
"name": "stdout"
|
||||||
}
|
}
|
||||||
@ -681,7 +681,7 @@
|
|||||||
"torch.hub.download_url_to_file('https://github.com/ultralytics/yolov5/releases/download/v1.0/coco2017val.zip', 'tmp.zip')\n",
|
"torch.hub.download_url_to_file('https://github.com/ultralytics/yolov5/releases/download/v1.0/coco2017val.zip', 'tmp.zip')\n",
|
||||||
"!unzip -q tmp.zip -d ../ && rm tmp.zip"
|
"!unzip -q tmp.zip -d ../ && rm tmp.zip"
|
||||||
],
|
],
|
||||||
"execution_count": 2,
|
"execution_count": null,
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"output_type": "display_data",
|
"output_type": "display_data",
|
||||||
@ -721,7 +721,7 @@
|
|||||||
"# Run YOLOv5x on COCO val2017\n",
|
"# Run YOLOv5x on COCO val2017\n",
|
||||||
"!python test.py --weights yolov5x.pt --data coco.yaml --img 640 --iou 0.65"
|
"!python test.py --weights yolov5x.pt --data coco.yaml --img 640 --iou 0.65"
|
||||||
],
|
],
|
||||||
"execution_count": 6,
|
"execution_count": null,
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"output_type": "stream",
|
"output_type": "stream",
|
||||||
@ -922,7 +922,7 @@
|
|||||||
"# Train YOLOv5s on COCO128 for 3 epochs\n",
|
"# Train YOLOv5s on COCO128 for 3 epochs\n",
|
||||||
"!python train.py --img 640 --batch 16 --epochs 3 --data coco128.yaml --weights yolov5s.pt --nosave --cache"
|
"!python train.py --img 640 --batch 16 --epochs 3 --data coco128.yaml --weights yolov5s.pt --nosave --cache"
|
||||||
],
|
],
|
||||||
"execution_count": 12,
|
"execution_count": null,
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"output_type": "stream",
|
"output_type": "stream",
|
||||||
@ -1259,4 +1259,4 @@
|
|||||||
"outputs": []
|
"outputs": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user