Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Y
yolov5
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Administrator
yolov5
Commits
17ac94b7
提交
17ac94b7
authored
2月 12, 2021
作者:
Glenn Jocher
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Created using Colaboratory
上级
bdd88e1e
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
91 行增加
和
92 行删除
+91
-92
tutorial.ipynb
tutorial.ipynb
+91
-92
没有找到文件。
tutorial.ipynb
浏览文件 @
17ac94b7
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
"accelerator": "GPU",
"accelerator": "GPU",
"widgets": {
"widgets": {
"application/vnd.jupyter.widget-state+json": {
"application/vnd.jupyter.widget-state+json": {
"
811fd52fef65422c8267bafcde8a2c3d
": {
"
1f8e9b8ebded4175b2eaa9f75c3ceb00
": {
"model_module": "@jupyter-widgets/controls",
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"model_name": "HBoxModel",
"state": {
"state": {
...
@@ -28,15 +28,15 @@
...
@@ -28,15 +28,15 @@
"_view_count": null,
"_view_count": null,
"_view_module_version": "1.5.0",
"_view_module_version": "1.5.0",
"box_style": "",
"box_style": "",
"layout": "IPY_MODEL_
8f41b90117224eef9133a9c3a103dbba
",
"layout": "IPY_MODEL_
0a1246a73077468ab80e979cc0576cd2
",
"_model_module": "@jupyter-widgets/controls",
"_model_module": "@jupyter-widgets/controls",
"children": [
"children": [
"IPY_MODEL_
ca2fb37af6ed43d4a74cdc9f2ac5c4a5
",
"IPY_MODEL_
d327cde5a85a4a51bb8b1b3e9cf06c97
",
"IPY_MODEL_
29419ae5ebb9403ea73f7e5a68037bdd
"
"IPY_MODEL_
d5ef1cb2cbed4b87b3c5d292ff2b0da6
"
]
]
}
}
},
},
"
8f41b90117224eef9133a9c3a103dbba
": {
"
0a1246a73077468ab80e979cc0576cd2
": {
"model_module": "@jupyter-widgets/base",
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_name": "LayoutModel",
"state": {
"state": {
...
@@ -87,12 +87,12 @@
...
@@ -87,12 +87,12 @@
"left": null
"left": null
}
}
},
},
"
ca2fb37af6ed43d4a74cdc9f2ac5c4a5
": {
"
d327cde5a85a4a51bb8b1b3e9cf06c97
": {
"model_module": "@jupyter-widgets/controls",
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"model_name": "FloatProgressModel",
"state": {
"state": {
"_view_name": "ProgressView",
"_view_name": "ProgressView",
"style": "IPY_MODEL_
6511b4dfb10b48d1bc98bcfb3987bfa0
",
"style": "IPY_MODEL_
8d5dff8bca14435a88fa1814533acd85
",
"_dom_classes": [],
"_dom_classes": [],
"description": "100%",
"description": "100%",
"_model_name": "FloatProgressModel",
"_model_name": "FloatProgressModel",
...
@@ -107,30 +107,30 @@
...
@@ -107,30 +107,30 @@
"min": 0,
"min": 0,
"description_tooltip": null,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_
64f0badf1a8f489885aa984dd62d37dc
"
"layout": "IPY_MODEL_
3d5136c19e7645ca9bc8f51ceffb2be1
"
}
}
},
},
"
29419ae5ebb9403ea73f7e5a68037bdd
": {
"
d5ef1cb2cbed4b87b3c5d292ff2b0da6
": {
"model_module": "@jupyter-widgets/controls",
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_name": "HTMLModel",
"state": {
"state": {
"_view_name": "HTMLView",
"_view_name": "HTMLView",
"style": "IPY_MODEL_
f569911c5cfc4d81bb1bdfa83447afc8
",
"style": "IPY_MODEL_
2919396dbd4b4c8e821d12bd28665d8a
",
"_dom_classes": [],
"_dom_classes": [],
"description": "",
"description": "",
"_model_name": "HTMLModel",
"_model_name": "HTMLModel",
"placeholder": "",
"placeholder": "",
"_view_module": "@jupyter-widgets/controls",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_module_version": "1.5.0",
"value": " 781M/781M [00:
23<00:00, 34.2
MB/s]",
"value": " 781M/781M [00:
12<00:00, 65.5
MB/s]",
"_view_count": null,
"_view_count": null,
"_view_module_version": "1.5.0",
"_view_module_version": "1.5.0",
"description_tooltip": null,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_
84943ade566440aaa2dcf3b3b27e707
4"
"layout": "IPY_MODEL_
6feb16f2b2fa4021b1a271e1dd442d0
4"
}
}
},
},
"
6511b4dfb10b48d1bc98bcfb3987bfa0
": {
"
8d5dff8bca14435a88fa1814533acd85
": {
"model_module": "@jupyter-widgets/controls",
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_name": "ProgressStyleModel",
"state": {
"state": {
...
@@ -145,7 +145,7 @@
...
@@ -145,7 +145,7 @@
"_model_module": "@jupyter-widgets/controls"
"_model_module": "@jupyter-widgets/controls"
}
}
},
},
"
64f0badf1a8f489885aa984dd62d37dc
": {
"
3d5136c19e7645ca9bc8f51ceffb2be1
": {
"model_module": "@jupyter-widgets/base",
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_name": "LayoutModel",
"state": {
"state": {
...
@@ -196,7 +196,7 @@
...
@@ -196,7 +196,7 @@
"left": null
"left": null
}
}
},
},
"
f569911c5cfc4d81bb1bdfa83447afc8
": {
"
2919396dbd4b4c8e821d12bd28665d8a
": {
"model_module": "@jupyter-widgets/controls",
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_name": "DescriptionStyleModel",
"state": {
"state": {
...
@@ -210,7 +210,7 @@
...
@@ -210,7 +210,7 @@
"_model_module": "@jupyter-widgets/controls"
"_model_module": "@jupyter-widgets/controls"
}
}
},
},
"
84943ade566440aaa2dcf3b3b27e707
4": {
"
6feb16f2b2fa4021b1a271e1dd442d0
4": {
"model_module": "@jupyter-widgets/base",
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_name": "LayoutModel",
"state": {
"state": {
...
@@ -261,7 +261,7 @@
...
@@ -261,7 +261,7 @@
"left": null
"left": null
}
}
},
},
"
8501ed1563e4452eac9df6b7a66e8f8
c": {
"
e6459e0bcee449b090fc9807672725b
c": {
"model_module": "@jupyter-widgets/controls",
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"model_name": "HBoxModel",
"state": {
"state": {
...
@@ -273,15 +273,15 @@
...
@@ -273,15 +273,15 @@
"_view_count": null,
"_view_count": null,
"_view_module_version": "1.5.0",
"_view_module_version": "1.5.0",
"box_style": "",
"box_style": "",
"layout": "IPY_MODEL_
d2bb96801e1f46f4a58e02534f7026ff
",
"layout": "IPY_MODEL_
c341e1d3bf3b40d1821ce392eb966c68
",
"_model_module": "@jupyter-widgets/controls",
"_model_module": "@jupyter-widgets/controls",
"children": [
"children": [
"IPY_MODEL_
468a796ef06b4a24bcba6fbd4a0a8db5
",
"IPY_MODEL_
660afee173694231a6dce3cd94df6cae
",
"IPY_MODEL_
42ad5c1ea7be4835bffebf90642178f1
"
"IPY_MODEL_
261218485cef48df961519dde5edfcbe
"
]
]
}
}
},
},
"
d2bb96801e1f46f4a58e02534f7026ff
": {
"
c341e1d3bf3b40d1821ce392eb966c68
": {
"model_module": "@jupyter-widgets/base",
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_name": "LayoutModel",
"state": {
"state": {
...
@@ -332,12 +332,12 @@
...
@@ -332,12 +332,12 @@
"left": null
"left": null
}
}
},
},
"
468a796ef06b4a24bcba6fbd4a0a8db5
": {
"
660afee173694231a6dce3cd94df6cae
": {
"model_module": "@jupyter-widgets/controls",
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"model_name": "FloatProgressModel",
"state": {
"state": {
"_view_name": "ProgressView",
"_view_name": "ProgressView",
"style": "IPY_MODEL_
c58b5536d98f4814831934e9c30c4d78
",
"style": "IPY_MODEL_
32736d503c06497abfae8c0421918255
",
"_dom_classes": [],
"_dom_classes": [],
"description": "100%",
"description": "100%",
"_model_name": "FloatProgressModel",
"_model_name": "FloatProgressModel",
...
@@ -352,30 +352,30 @@
...
@@ -352,30 +352,30 @@
"min": 0,
"min": 0,
"description_tooltip": null,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_
505597101151486ea29e9ab754544d27
"
"layout": "IPY_MODEL_
e257738711f54d5280c8393d9d3dce1c
"
}
}
},
},
"
42ad5c1ea7be4835bffebf90642178f1
": {
"
261218485cef48df961519dde5edfcbe
": {
"model_module": "@jupyter-widgets/controls",
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_name": "HTMLModel",
"state": {
"state": {
"_view_name": "HTMLView",
"_view_name": "HTMLView",
"style": "IPY_MODEL_
de6e7b4b4a1c408c9f89d89b07a13bcd
",
"style": "IPY_MODEL_
beb7a6fe34b840899bb79c062681696f
",
"_dom_classes": [],
"_dom_classes": [],
"description": "",
"description": "",
"_model_name": "HTMLModel",
"_model_name": "HTMLModel",
"placeholder": "",
"placeholder": "",
"_view_module": "@jupyter-widgets/controls",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_module_version": "1.5.0",
"value": " 21.1M/21.1M [00:0
1<00:00, 18.2
MB/s]",
"value": " 21.1M/21.1M [00:0
0<00:00, 33.5
MB/s]",
"_view_count": null,
"_view_count": null,
"_view_module_version": "1.5.0",
"_view_module_version": "1.5.0",
"description_tooltip": null,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_
f5cc9c7d4c274b2d81327ba3163c43fd
"
"layout": "IPY_MODEL_
e639132395d64d70b99d8b72c32f8fbb
"
}
}
},
},
"
c58b5536d98f4814831934e9c30c4d78
": {
"
32736d503c06497abfae8c0421918255
": {
"model_module": "@jupyter-widgets/controls",
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_name": "ProgressStyleModel",
"state": {
"state": {
...
@@ -390,7 +390,7 @@
...
@@ -390,7 +390,7 @@
"_model_module": "@jupyter-widgets/controls"
"_model_module": "@jupyter-widgets/controls"
}
}
},
},
"
505597101151486ea29e9ab754544d27
": {
"
e257738711f54d5280c8393d9d3dce1c
": {
"model_module": "@jupyter-widgets/base",
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_name": "LayoutModel",
"state": {
"state": {
...
@@ -441,7 +441,7 @@
...
@@ -441,7 +441,7 @@
"left": null
"left": null
}
}
},
},
"
de6e7b4b4a1c408c9f89d89b07a13bcd
": {
"
beb7a6fe34b840899bb79c062681696f
": {
"model_module": "@jupyter-widgets/controls",
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_name": "DescriptionStyleModel",
"state": {
"state": {
...
@@ -455,7 +455,7 @@
...
@@ -455,7 +455,7 @@
"_model_module": "@jupyter-widgets/controls"
"_model_module": "@jupyter-widgets/controls"
}
}
},
},
"
f5cc9c7d4c274b2d81327ba3163c43fd
": {
"
e639132395d64d70b99d8b72c32f8fbb
": {
"model_module": "@jupyter-widgets/base",
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_name": "LayoutModel",
"state": {
"state": {
...
@@ -550,7 +550,7 @@
...
@@ -550,7 +550,7 @@
"colab": {
"colab": {
"base_uri": "https://localhost:8080/"
"base_uri": "https://localhost:8080/"
},
},
"outputId": "
c6ad57c2-40b7-4764-b07d-19ee2ceaabaf
"
"outputId": "
ae8805a9-ce15-4e1c-f6b4-baa1c1033f56
"
},
},
"source": [
"source": [
"!git clone https://github.com/ultralytics/yolov5 # clone repo\n",
"!git clone https://github.com/ultralytics/yolov5 # clone repo\n",
...
@@ -563,12 +563,12 @@
...
@@ -563,12 +563,12 @@
"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('Setup complete. Using torch %s %s' % (torch.__version__, torch.cuda.get_device_properties(0) if torch.cuda.is_available() else 'CPU'))"
],
],
"execution_count":
null
,
"execution_count":
1
,
"outputs": [
"outputs": [
{
{
"output_type": "stream",
"output_type": "stream",
"text": [
"text": [
"Setup complete. Using torch 1.7.0+cu101 _CudaDeviceProperties(name='Tesla V100-SXM2-16GB', major=7, minor=0, total_memory=161
3
0MB, multi_processor_count=80)\n"
"Setup complete. Using torch 1.7.0+cu101 _CudaDeviceProperties(name='Tesla V100-SXM2-16GB', major=7, minor=0, total_memory=161
6
0MB, multi_processor_count=80)\n"
],
],
"name": "stdout"
"name": "stdout"
}
}
...
@@ -672,30 +672,30 @@
...
@@ -672,30 +672,30 @@
"base_uri": "https://localhost:8080/",
"base_uri": "https://localhost:8080/",
"height": 65,
"height": 65,
"referenced_widgets": [
"referenced_widgets": [
"
811fd52fef65422c8267bafcde8a2c3d
",
"
1f8e9b8ebded4175b2eaa9f75c3ceb00
",
"
8f41b90117224eef9133a9c3a103dbba
",
"
0a1246a73077468ab80e979cc0576cd2
",
"
ca2fb37af6ed43d4a74cdc9f2ac5c4a5
",
"
d327cde5a85a4a51bb8b1b3e9cf06c97
",
"
29419ae5ebb9403ea73f7e5a68037bdd
",
"
d5ef1cb2cbed4b87b3c5d292ff2b0da6
",
"
6511b4dfb10b48d1bc98bcfb3987bfa0
",
"
8d5dff8bca14435a88fa1814533acd85
",
"
64f0badf1a8f489885aa984dd62d37dc
",
"
3d5136c19e7645ca9bc8f51ceffb2be1
",
"
f569911c5cfc4d81bb1bdfa83447afc8
",
"
2919396dbd4b4c8e821d12bd28665d8a
",
"
84943ade566440aaa2dcf3b3b27e707
4"
"
6feb16f2b2fa4021b1a271e1dd442d0
4"
]
]
},
},
"outputId": "
59a7a546-8492-492e-861d-70a2c85a6794
"
"outputId": "
d6ace7c6-1be5-41ff-d607-1c716b88d298
"
},
},
"source": [
"source": [
"# Download COCO val2017\n",
"# Download COCO val2017\n",
"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":
null
,
"execution_count":
2
,
"outputs": [
"outputs": [
{
{
"output_type": "display_data",
"output_type": "display_data",
"data": {
"data": {
"application/vnd.jupyter.widget-view+json": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "
811fd52fef65422c8267bafcde8a2c3d
",
"model_id": "
1f8e9b8ebded4175b2eaa9f75c3ceb00
",
"version_minor": 0,
"version_minor": 0,
"version_major": 2
"version_major": 2
},
},
...
@@ -723,46 +723,45 @@
...
@@ -723,46 +723,45 @@
"colab": {
"colab": {
"base_uri": "https://localhost:8080/"
"base_uri": "https://localhost:8080/"
},
},
"outputId": "
427c211e-e283-4e87-f7b3-7b8dfb11a4a5
"
"outputId": "
cc25f70c-0a11-44f6-cc44-e92c5083488c
"
},
},
"source": [
"source": [
"# 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":
null
,
"execution_count":
3
,
"outputs": [
"outputs": [
{
{
"output_type": "stream",
"output_type": "stream",
"text": [
"text": [
"Namespace(augment=False, batch_size=32, conf_thres=0.001, data='./data/coco.yaml', device='', exist_ok=False, img_size=640, iou_thres=0.65, name='exp', project='runs/test', save_conf=False, save_hybrid=False, save_json=True, save_txt=False, single_cls=False, task='val', verbose=False, weights=['yolov5x.pt'])\n",
"Namespace(augment=False, batch_size=32, conf_thres=0.001, data='./data/coco.yaml', device='', exist_ok=False, img_size=640, iou_thres=0.65, name='exp', project='runs/test', save_conf=False, save_hybrid=False, save_json=True, save_txt=False, single_cls=False, task='val', verbose=False, weights=['yolov5x.pt'])\n",
"YOLOv5 v4.0-
21-gb26a2f6 torch 1.7.0+cu101 CUDA:0 (Tesla V100-SXM2-16GB, 1613
0.5MB)\n",
"YOLOv5 v4.0-
75-gbdd88e1 torch 1.7.0+cu101 CUDA:0 (Tesla V100-SXM2-16GB, 1616
0.5MB)\n",
"\n",
"\n",
"Downloading https://github.com/ultralytics/yolov5/releases/download/v4.0/yolov5x.pt to yolov5x.pt...\n",
"Downloading https://github.com/ultralytics/yolov5/releases/download/v4.0/yolov5x.pt to yolov5x.pt...\n",
"100% 168M/168M [00:0
5<00:00, 31.9
MB/s]\n",
"100% 168M/168M [00:0
4<00:00, 39.7
MB/s]\n",
"\n",
"\n",
"Fusing layers... \n",
"Fusing layers... \n",
"Model Summary: 476 layers, 87730285 parameters, 0 gradients, 218.8 GFLOPS\n",
"Model Summary: 476 layers, 87730285 parameters, 0 gradients, 218.8 GFLOPS\n",
"\u001b[34m\u001b[1mval: \u001b[0mScanning '../coco/labels/val2017' for images and labels... 4952 found, 48 missing, 0 empty, 0 corrupted: 100% 5000/5000 [00:01<00:00, 2791.81it/s]\n",
"\u001b[34m\u001b[1mval: \u001b[0mScanning '../coco/val2017' for images and labels... 4952 found, 48 missing, 0 empty, 0 corrupted: 100% 5000/5000 [00:01<00:00, 2824.78it/s]\n",
"\u001b[34m\u001b[1mval: \u001b[0mNew cache created: ../coco/labels/val2017.cache\n",
"\u001b[34m\u001b[1mval: \u001b[0mNew cache created: ../coco/val2017.cache\n",
"\u001b[34m\u001b[1mval: \u001b[0mScanning '../coco/labels/val2017.cache' for images and labels... 4952 found, 48 missing, 0 empty, 0 corrupted: 100% 5000/5000 [00:00<00:00, 13332180.55it/s]\n",
" Class Images Targets P R mAP@.5 mAP@.5:.95: 100% 157/157 [01:33<00:00, 1.68it/s]\n",
" Class Images Targets P R mAP@.5 mAP@.5:.95: 100% 157/157 [01:30<00:00, 1.73it/s]\n",
" all 5e+03 3.63e+04 0.749 0.619 0.68 0.486\n",
" all 5e+03 3.63e+04 0.419 0.765 0.68 0.486\n",
"Speed: 5.2/2.0/7.3 ms inference/NMS/total per 640x640 image at batch-size 32\n",
"Speed: 5.2/2.0/7.2 ms inference/NMS/total per 640x640 image at batch-size 32\n",
"\n",
"\n",
"Evaluating pycocotools mAP... saving runs/test/exp/yolov5x_predictions.json...\n",
"Evaluating pycocotools mAP... saving runs/test/exp/yolov5x_predictions.json...\n",
"loading annotations into memory...\n",
"loading annotations into memory...\n",
"Done (t=0.4
1
s)\n",
"Done (t=0.4
4
s)\n",
"creating index...\n",
"creating index...\n",
"index created!\n",
"index created!\n",
"Loading and preparing results...\n",
"Loading and preparing results...\n",
"DONE (t=
5.26
s)\n",
"DONE (t=
4.47
s)\n",
"creating index...\n",
"creating index...\n",
"index created!\n",
"index created!\n",
"Running per image evaluation...\n",
"Running per image evaluation...\n",
"Evaluate annotation type *bbox*\n",
"Evaluate annotation type *bbox*\n",
"DONE (t=9
3.9
7s).\n",
"DONE (t=9
4.8
7s).\n",
"Accumulating evaluation results...\n",
"Accumulating evaluation results...\n",
"DONE (t=15.
0
6s).\n",
"DONE (t=15.
9
6s).\n",
" Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.501\n",
" Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.501\n",
" Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.687\n",
" Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.687\n",
" Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.544\n",
" Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.544\n",
...
@@ -837,30 +836,30 @@
...
@@ -837,30 +836,30 @@
"base_uri": "https://localhost:8080/",
"base_uri": "https://localhost:8080/",
"height": 65,
"height": 65,
"referenced_widgets": [
"referenced_widgets": [
"
8501ed1563e4452eac9df6b7a66e8f8
c",
"
e6459e0bcee449b090fc9807672725b
c",
"
d2bb96801e1f46f4a58e02534f7026ff
",
"
c341e1d3bf3b40d1821ce392eb966c68
",
"
468a796ef06b4a24bcba6fbd4a0a8db5
",
"
660afee173694231a6dce3cd94df6cae
",
"
42ad5c1ea7be4835bffebf90642178f1
",
"
261218485cef48df961519dde5edfcbe
",
"
c58b5536d98f4814831934e9c30c4d78
",
"
32736d503c06497abfae8c0421918255
",
"
505597101151486ea29e9ab754544d27
",
"
e257738711f54d5280c8393d9d3dce1c
",
"
de6e7b4b4a1c408c9f89d89b07a13bcd
",
"
beb7a6fe34b840899bb79c062681696f
",
"
f5cc9c7d4c274b2d81327ba3163c43fd
"
"
e639132395d64d70b99d8b72c32f8fbb
"
]
]
},
},
"outputId": "
c68a3db4-1314-46b4-9e52-83532eb65749
"
"outputId": "
e8b7d5b3-a71e-4446-eec2-ad13419cf700
"
},
},
"source": [
"source": [
"# Download COCO128\n",
"# Download COCO128\n",
"torch.hub.download_url_to_file('https://github.com/ultralytics/yolov5/releases/download/v1.0/coco128.zip', 'tmp.zip')\n",
"torch.hub.download_url_to_file('https://github.com/ultralytics/yolov5/releases/download/v1.0/coco128.zip', 'tmp.zip')\n",
"!unzip -q tmp.zip -d ../ && rm tmp.zip"
"!unzip -q tmp.zip -d ../ && rm tmp.zip"
],
],
"execution_count":
null
,
"execution_count":
4
,
"outputs": [
"outputs": [
{
{
"output_type": "display_data",
"output_type": "display_data",
"data": {
"data": {
"application/vnd.jupyter.widget-view+json": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "
8501ed1563e4452eac9df6b7a66e8f8
c",
"model_id": "
e6459e0bcee449b090fc9807672725b
c",
"version_minor": 0,
"version_minor": 0,
"version_major": 2
"version_major": 2
},
},
...
@@ -925,27 +924,27 @@
...
@@ -925,27 +924,27 @@
"colab": {
"colab": {
"base_uri": "https://localhost:8080/"
"base_uri": "https://localhost:8080/"
},
},
"outputId": "
6af7116a-01ab-4b94-e5d7-b37c17dc95d
e"
"outputId": "
38e51b29-2df4-4f00-cde8-5f6e4a34da9
e"
},
},
"source": [
"source": [
"# 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":
null
,
"execution_count":
5
,
"outputs": [
"outputs": [
{
{
"output_type": "stream",
"output_type": "stream",
"text": [
"text": [
"\u001b[34m\u001b[1mgithub: \u001b[0mup to date with https://github.com/ultralytics/yolov5 ✅\n",
"\u001b[34m\u001b[1mgithub: \u001b[0mup to date with https://github.com/ultralytics/yolov5 ✅\n",
"YOLOv5 v4.0-
21-gb26a2f6 torch 1.7.0+cu101 CUDA:0 (Tesla V100-SXM2-16GB, 1613
0.5MB)\n",
"YOLOv5 v4.0-
75-gbdd88e1 torch 1.7.0+cu101 CUDA:0 (Tesla V100-SXM2-16GB, 1616
0.5MB)\n",
"\n",
"\n",
"Namespace(adam=False, batch_size=16, bucket='', cache_images=True, cfg='', data='./data/coco128.yaml', device='', epochs=3, evolve=False, exist_ok=False, global_rank=-1, hyp='data/hyp.scratch.yaml', image_weights=False, img_size=[640, 640], local_rank=-1, log_artifacts=False, log_imgs=16, multi_scale=False, name='exp', noautoanchor=False, nosave=True, notest=False, project='runs/train', quad=False, rect=False, resume=False, save_dir='runs/train/exp', single_cls=False, sync_bn=False, total_batch_size=16, weights='yolov5s.pt', workers=8, world_size=1)\n",
"Namespace(adam=False, batch_size=16, bucket='', cache_images=True, cfg='', data='./data/coco128.yaml', device='', epochs=3, evolve=False, exist_ok=False, global_rank=-1, hyp='data/hyp.scratch.yaml', image_weights=False, img_size=[640, 640], l
inear_lr=False, l
ocal_rank=-1, log_artifacts=False, log_imgs=16, multi_scale=False, name='exp', noautoanchor=False, nosave=True, notest=False, project='runs/train', quad=False, rect=False, resume=False, save_dir='runs/train/exp', single_cls=False, sync_bn=False, total_batch_size=16, weights='yolov5s.pt', workers=8, world_size=1)\n",
"\u001b[34m\u001b[1mwandb: \u001b[0mInstall Weights & Biases for YOLOv5 logging with 'pip install wandb' (recommended)\n",
"\u001b[34m\u001b[1mwandb: \u001b[0mInstall Weights & Biases for YOLOv5 logging with 'pip install wandb' (recommended)\n",
"Start Tensorboard with \"tensorboard --logdir runs/train\", view at http://localhost:6006/\n",
"Start Tensorboard with \"tensorboard --logdir runs/train\", view at http://localhost:6006/\n",
"2021-0
1-17 19:56:03.94585
1: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-0
2-12 06:38:28.02727
1: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.10.1\n",
"\u001b[34m\u001b[1mhyperparameters: \u001b[0mlr0=0.01, lrf=0.2, momentum=0.937, weight_decay=0.0005, warmup_epochs=3.0, warmup_momentum=0.8, warmup_bias_lr=0.1, box=0.05, cls=0.5, cls_pw=1.0, obj=1.0, obj_pw=1.0, iou_t=0.2, anchor_t=4.0, fl_gamma=0.0, hsv_h=0.015, hsv_s=0.7, hsv_v=0.4, degrees=0.0, translate=0.1, scale=0.5, shear=0.0, perspective=0.0, flipud=0.0, fliplr=0.5, mosaic=1.0, mixup=0.0\n",
"\u001b[34m\u001b[1mhyperparameters: \u001b[0mlr0=0.01, lrf=0.2, momentum=0.937, weight_decay=0.0005, warmup_epochs=3.0, warmup_momentum=0.8, warmup_bias_lr=0.1, box=0.05, cls=0.5, cls_pw=1.0, obj=1.0, obj_pw=1.0, iou_t=0.2, anchor_t=4.0, fl_gamma=0.0, hsv_h=0.015, hsv_s=0.7, hsv_v=0.4, degrees=0.0, translate=0.1, scale=0.5, shear=0.0, perspective=0.0, flipud=0.0, fliplr=0.5, mosaic=1.0, mixup=0.0\n",
"Downloading https://github.com/ultralytics/yolov5/releases/download/v4.0/yolov5s.pt to yolov5s.pt...\n",
"Downloading https://github.com/ultralytics/yolov5/releases/download/v4.0/yolov5s.pt to yolov5s.pt...\n",
"100% 14.1M/14.1M [00:0
0<00:00, 15.8
MB/s]\n",
"100% 14.1M/14.1M [00:0
1<00:00, 13.2
MB/s]\n",
"\n",
"\n",
"\n",
"\n",
" from n params module arguments \n",
" from n params module arguments \n",
...
@@ -979,12 +978,11 @@
...
@@ -979,12 +978,11 @@
"Transferred 362/362 items from yolov5s.pt\n",
"Transferred 362/362 items from yolov5s.pt\n",
"Scaled weight_decay = 0.0005\n",
"Scaled weight_decay = 0.0005\n",
"Optimizer groups: 62 .bias, 62 conv.weight, 59 other\n",
"Optimizer groups: 62 .bias, 62 conv.weight, 59 other\n",
"\u001b[34m\u001b[1mtrain: \u001b[0mScanning '../coco128/labels/train2017' for images and labels... 128 found, 0 missing, 2 empty, 0 corrupted: 100% 128/128 [00:00<00:00, 2
647.74
it/s]\n",
"\u001b[34m\u001b[1mtrain: \u001b[0mScanning '../coco128/labels/train2017' for images and labels... 128 found, 0 missing, 2 empty, 0 corrupted: 100% 128/128 [00:00<00:00, 2
566.00
it/s]\n",
"\u001b[34m\u001b[1mtrain: \u001b[0mNew cache created: ../coco128/labels/train2017.cache\n",
"\u001b[34m\u001b[1mtrain: \u001b[0mNew cache created: ../coco128/labels/train2017.cache\n",
"\u001b[34m\u001b[1mtrain: \u001b[0mScanning '../coco128/labels/train2017.cache' for images and labels... 128 found, 0 missing, 2 empty, 0 corrupted: 100% 128/128 [00:00<00:00, 1503840.09it/s]\n",
"\u001b[34m\u001b[1mtrain: \u001b[0mCaching images (0.1GB): 100% 128/128 [00:00<00:00, 175.07it/s]\n",
"\u001b[34m\u001b[1mtrain: \u001b[0mCaching images (0.1GB): 100% 128/128 [00:00<00:00, 176.03it/s]\n",
"\u001b[34m\u001b[1mval: \u001b[0mScanning '../coco128/labels/train2017.cache' for images and labels... 128 found, 0 missing, 2 empty, 0 corrupted: 100% 128/128 [00:00<00:00, 764773.38it/s]\n",
"\u001b[34m\u001b[1mval: \u001b[0mScanning '../coco128/labels/train2017.cache' for images and labels... 128 found, 0 missing, 2 empty, 0 corrupted: 100% 128/128 [00:00<00:00, 24200.82it/s]\n",
"\u001b[34m\u001b[1mval: \u001b[0mCaching images (0.1GB): 100% 128/128 [00:00<00:00, 128.17it/s]\n",
"\u001b[34m\u001b[1mval: \u001b[0mCaching images (0.1GB): 100% 128/128 [00:01<00:00, 123.25it/s]\n",
"Plotting labels... \n",
"Plotting labels... \n",
"\n",
"\n",
"\u001b[34m\u001b[1mautoanchor: \u001b[0mAnalyzing anchors... anchors/target = 4.26, Best Possible Recall (BPR) = 0.9946\n",
"\u001b[34m\u001b[1mautoanchor: \u001b[0mAnalyzing anchors... anchors/target = 4.26, Best Possible Recall (BPR) = 0.9946\n",
...
@@ -994,19 +992,19 @@
...
@@ -994,19 +992,19 @@
"Starting training for 3 epochs...\n",
"Starting training for 3 epochs...\n",
"\n",
"\n",
" Epoch gpu_mem box obj cls total targets img_size\n",
" Epoch gpu_mem box obj cls total targets img_size\n",
" 0/2 3.27G 0.04357 0.067
79 0.01869 0.1301 207 640: 100% 8/8 [00:04<00:00, 1.95
it/s]\n",
" 0/2 3.27G 0.04357 0.067
81 0.01869 0.1301 207 640: 100% 8/8 [00:03<00:00, 2.03
it/s]\n",
" Class Images Targets P R mAP@.5 mAP@.5:.95: 100%
8/8 [00:05<00:00, 1.36it/s
]\n",
" Class Images Targets P R mAP@.5 mAP@.5:.95: 100%
4/4 [00:04<00:00, 1.14s/it
]\n",
" all 128 929 0.
392 0.732 0.657 0.428
\n",
" all 128 929 0.
646 0.627 0.659 0.431
\n",
"\n",
"\n",
" Epoch gpu_mem box obj cls total targets img_size\n",
" Epoch gpu_mem box obj cls total targets img_size\n",
" 1/2 7.
47G 0.04308 0.06636 0.02083 0.1303 227 640: 100% 8/8 [00:02<00:00, 3.88
it/s]\n",
" 1/2 7.
75G 0.04308 0.06654 0.02083 0.1304 227 640: 100% 8/8 [00:01<00:00, 4.11
it/s]\n",
" Class Images Targets P R mAP@.5 mAP@.5:.95: 100%
8/8 [00:01<00:00, 5.07
it/s]\n",
" Class Images Targets P R mAP@.5 mAP@.5:.95: 100%
4/4 [00:01<00:00, 2.94
it/s]\n",
" all 128 929 0.
387 0.737 0.657 0.432
\n",
" all 128 929 0.
681 0.607 0.663 0.434
\n",
"\n",
"\n",
" Epoch gpu_mem box obj cls total targets img_size\n",
" Epoch gpu_mem box obj cls total targets img_size\n",
" 2/2 7.
48G 0.04461 0.06864 0.01866 0.1319 191 640: 100% 8/8 [00:02<00:00, 3.57
it/s]\n",
" 2/2 7.
75G 0.04461 0.06896 0.01866 0.1322 191 640: 100% 8/8 [00:02<00:00, 3.94
it/s]\n",
" Class Images Targets P R mAP@.5 mAP@.5:.95: 100%
8/8 [00:02<00:00, 2.8
2it/s]\n",
" Class Images Targets P R mAP@.5 mAP@.5:.95: 100%
4/4 [00:03<00:00, 1.2
2it/s]\n",
" all 128 929 0.
385 0.742 0.658 0.431
\n",
" all 128 929 0.
642 0.632 0.662 0.432
\n",
"Optimizer stripped from runs/train/exp/weights/last.pt, 14.8MB\n",
"Optimizer stripped from runs/train/exp/weights/last.pt, 14.8MB\n",
"3 epochs completed in 0.007 hours.\n",
"3 epochs completed in 0.007 hours.\n",
"\n"
"\n"
...
@@ -1238,4 +1236,4 @@
...
@@ -1238,4 +1236,4 @@
"outputs": []
"outputs": []
}
}
]
]
}
}
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论