Created using Colaboratory

pull/1972/head
Glenn Jocher 2021-01-17 13:04:16 -08:00
parent b26a2f6242
commit 3a42abd18a
1 changed files with 131 additions and 125 deletions

256
tutorial.ipynb vendored
View File

@ -16,7 +16,7 @@
"accelerator": "GPU",
"widgets": {
"application/vnd.jupyter.widget-state+json": {
"02ac0588602847eea00a0205f87bcce2": {
"811fd52fef65422c8267bafcde8a2c3d": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
@ -28,15 +28,15 @@
"_view_count": null,
"_view_module_version": "1.5.0",
"box_style": "",
"layout": "IPY_MODEL_c472ea49806447a68b5a9221a4ddae85",
"layout": "IPY_MODEL_8f41b90117224eef9133a9c3a103dbba",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_091fdf499bd44a80af7281d16da4aa93",
"IPY_MODEL_c79f69c959de4427ba102a87a9f46d80"
"IPY_MODEL_ca2fb37af6ed43d4a74cdc9f2ac5c4a5",
"IPY_MODEL_29419ae5ebb9403ea73f7e5a68037bdd"
]
}
},
"c472ea49806447a68b5a9221a4ddae85": {
"8f41b90117224eef9133a9c3a103dbba": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
@ -87,12 +87,12 @@
"left": null
}
},
"091fdf499bd44a80af7281d16da4aa93": {
"ca2fb37af6ed43d4a74cdc9f2ac5c4a5": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_c42ae5af74a0491187827d0a1fc259bb",
"style": "IPY_MODEL_6511b4dfb10b48d1bc98bcfb3987bfa0",
"_dom_classes": [],
"description": "100%",
"_model_name": "FloatProgressModel",
@ -107,30 +107,30 @@
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_5a90f72d3a2d46cb9ad915daa3ead8b4"
"layout": "IPY_MODEL_64f0badf1a8f489885aa984dd62d37dc"
}
},
"c79f69c959de4427ba102a87a9f46d80": {
"29419ae5ebb9403ea73f7e5a68037bdd": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_2a7ed6611da34662b10e37fd4f4e4438",
"style": "IPY_MODEL_f569911c5cfc4d81bb1bdfa83447afc8",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 781M/781M [00:23<00:00, 35.1MB/s]",
"value": " 781M/781M [00:23<00:00, 34.2MB/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_fead0160658445bf9e966daa4481cad0"
"layout": "IPY_MODEL_84943ade566440aaa2dcf3b3b27e7074"
}
},
"c42ae5af74a0491187827d0a1fc259bb": {
"6511b4dfb10b48d1bc98bcfb3987bfa0": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"state": {
@ -145,7 +145,7 @@
"_model_module": "@jupyter-widgets/controls"
}
},
"5a90f72d3a2d46cb9ad915daa3ead8b4": {
"64f0badf1a8f489885aa984dd62d37dc": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
@ -196,7 +196,7 @@
"left": null
}
},
"2a7ed6611da34662b10e37fd4f4e4438": {
"f569911c5cfc4d81bb1bdfa83447afc8": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"state": {
@ -210,7 +210,7 @@
"_model_module": "@jupyter-widgets/controls"
}
},
"fead0160658445bf9e966daa4481cad0": {
"84943ade566440aaa2dcf3b3b27e7074": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
@ -261,7 +261,7 @@
"left": null
}
},
"cf1ab9fde7444d3e874fcd407ba8f0f8": {
"8501ed1563e4452eac9df6b7a66e8f8c": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
@ -273,15 +273,15 @@
"_view_count": null,
"_view_module_version": "1.5.0",
"box_style": "",
"layout": "IPY_MODEL_9ee03f9c85f34155b2645e89c9211547",
"layout": "IPY_MODEL_d2bb96801e1f46f4a58e02534f7026ff",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_933ebc451c09490aadf71afbbb3dff2a",
"IPY_MODEL_8e7c55cbca624432a84fa7ad8f3a4016"
"IPY_MODEL_468a796ef06b4a24bcba6fbd4a0a8db5",
"IPY_MODEL_42ad5c1ea7be4835bffebf90642178f1"
]
}
},
"9ee03f9c85f34155b2645e89c9211547": {
"d2bb96801e1f46f4a58e02534f7026ff": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
@ -332,50 +332,50 @@
"left": null
}
},
"933ebc451c09490aadf71afbbb3dff2a": {
"468a796ef06b4a24bcba6fbd4a0a8db5": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_dd62d83b35d04a178840772e82bd2f2e",
"style": "IPY_MODEL_c58b5536d98f4814831934e9c30c4d78",
"_dom_classes": [],
"description": "100%",
"_model_name": "FloatProgressModel",
"bar_style": "success",
"max": 22090455,
"max": 22091032,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 22090455,
"value": 22091032,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_d5c4f3d1c8b046e3a163faaa6b3a51ab"
"layout": "IPY_MODEL_505597101151486ea29e9ab754544d27"
}
},
"8e7c55cbca624432a84fa7ad8f3a4016": {
"42ad5c1ea7be4835bffebf90642178f1": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_78d1da8efb504b03878ca9ce5b404006",
"style": "IPY_MODEL_de6e7b4b4a1c408c9f89d89b07a13bcd",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 21.1M/21.1M [00:01<00:00, 16.9MB/s]",
"value": " 21.1M/21.1M [00:01<00:00, 18.2MB/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_d28208ba1213436a93926a01d99d97ae"
"layout": "IPY_MODEL_f5cc9c7d4c274b2d81327ba3163c43fd"
}
},
"dd62d83b35d04a178840772e82bd2f2e": {
"c58b5536d98f4814831934e9c30c4d78": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"state": {
@ -390,7 +390,7 @@
"_model_module": "@jupyter-widgets/controls"
}
},
"d5c4f3d1c8b046e3a163faaa6b3a51ab": {
"505597101151486ea29e9ab754544d27": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
@ -441,7 +441,7 @@
"left": null
}
},
"78d1da8efb504b03878ca9ce5b404006": {
"de6e7b4b4a1c408c9f89d89b07a13bcd": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"state": {
@ -455,7 +455,7 @@
"_model_module": "@jupyter-widgets/controls"
}
},
"d28208ba1213436a93926a01d99d97ae": {
"f5cc9c7d4c274b2d81327ba3163c43fd": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
@ -550,7 +550,7 @@
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "888d5c41-00e9-47d8-d230-dded99325bea"
"outputId": "c6ad57c2-40b7-4764-b07d-19ee2ceaabaf"
},
"source": [
"!git clone https://github.com/ultralytics/yolov5 # clone repo\n",
@ -563,7 +563,7 @@
"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'))"
],
"execution_count": null,
"execution_count": 3,
"outputs": [
{
"output_type": "stream",
@ -670,32 +670,32 @@
"id": "WQPtK1QYVaD_",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 66,
"height": 65,
"referenced_widgets": [
"02ac0588602847eea00a0205f87bcce2",
"c472ea49806447a68b5a9221a4ddae85",
"091fdf499bd44a80af7281d16da4aa93",
"c79f69c959de4427ba102a87a9f46d80",
"c42ae5af74a0491187827d0a1fc259bb",
"5a90f72d3a2d46cb9ad915daa3ead8b4",
"2a7ed6611da34662b10e37fd4f4e4438",
"fead0160658445bf9e966daa4481cad0"
"811fd52fef65422c8267bafcde8a2c3d",
"8f41b90117224eef9133a9c3a103dbba",
"ca2fb37af6ed43d4a74cdc9f2ac5c4a5",
"29419ae5ebb9403ea73f7e5a68037bdd",
"6511b4dfb10b48d1bc98bcfb3987bfa0",
"64f0badf1a8f489885aa984dd62d37dc",
"f569911c5cfc4d81bb1bdfa83447afc8",
"84943ade566440aaa2dcf3b3b27e7074"
]
},
"outputId": "780d8f5f-766e-4b99-e370-11f9b884c27a"
"outputId": "59a7a546-8492-492e-861d-70a2c85a6794"
},
"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",
"!unzip -q tmp.zip -d ../ && rm tmp.zip"
],
"execution_count": null,
"execution_count": 6,
"outputs": [
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "02ac0588602847eea00a0205f87bcce2",
"model_id": "811fd52fef65422c8267bafcde8a2c3d",
"version_minor": 0,
"version_major": 2
},
@ -723,56 +723,58 @@
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "013935a5-ba81-4810-b723-0cb01cf7bc79"
"outputId": "427c211e-e283-4e87-f7b3-7b8dfb11a4a5"
},
"source": [
"# Run YOLOv5x on COCO val2017\n",
"!python test.py --weights yolov5x.pt --data coco.yaml --img 640 --iou 0.65"
],
"execution_count": null,
"execution_count": 7,
"outputs": [
{
"output_type": "stream",
"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_json=True, save_txt=False, single_cls=False, task='val', verbose=False, weights=['yolov5x.pt'])\n",
"Using torch 1.7.0+cu101 CUDA:0 (Tesla V100-SXM2-16GB, 16130MB)\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, 16130.5MB)\n",
"\n",
"Downloading https://github.com/ultralytics/yolov5/releases/download/v3.1/yolov5x.pt to yolov5x.pt...\n",
"100% 170M/170M [00:05<00:00, 32.6MB/s]\n",
"Downloading https://github.com/ultralytics/yolov5/releases/download/v4.0/yolov5x.pt to yolov5x.pt...\n",
"100% 168M/168M [00:05<00:00, 31.9MB/s]\n",
"\n",
"Fusing layers... \n",
"Model Summary: 484 layers, 88922205 parameters, 0 gradients\n",
"Scanning labels ../coco/labels/val2017.cache (4952 found, 0 missing, 48 empty, 0 duplicate, for 5000 images): 5000it [00:00, 14785.71it/s]\n",
" Class Images Targets P R mAP@.5 mAP@.5:.95: 100% 157/157 [01:30<00:00, 1.74it/s]\n",
" all 5e+03 3.63e+04 0.409 0.754 0.672 0.484\n",
"Speed: 5.9/2.1/7.9 ms inference/NMS/total per 640x640 image at batch-size 32\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[0mNew cache created: ../coco/labels/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:30<00:00, 1.73it/s]\n",
" all 5e+03 3.63e+04 0.419 0.765 0.68 0.486\n",
"Speed: 5.2/2.0/7.2 ms inference/NMS/total per 640x640 image at batch-size 32\n",
"\n",
"Evaluating pycocotools mAP... saving runs/test/exp/yolov5x_predictions.json...\n",
"loading annotations into memory...\n",
"Done (t=0.43s)\n",
"Done (t=0.41s)\n",
"creating index...\n",
"index created!\n",
"Loading and preparing results...\n",
"DONE (t=4.67s)\n",
"DONE (t=5.26s)\n",
"creating index...\n",
"index created!\n",
"Running per image evaluation...\n",
"Evaluate annotation type *bbox*\n",
"DONE (t=92.11s).\n",
"DONE (t=93.97s).\n",
"Accumulating evaluation results...\n",
"DONE (t=13.24s).\n",
" Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.492\n",
" Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.676\n",
" Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.534\n",
" Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.318\n",
" Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.541\n",
" Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.633\n",
" Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.376\n",
" Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.617\n",
" Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.670\n",
" Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.493\n",
" Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.723\n",
" Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.812\n",
"DONE (t=15.06s).\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.75 | area= all | maxDets=100 ] = 0.544\n",
" Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.338\n",
" Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.548\n",
" Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.637\n",
" Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.378\n",
" Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.628\n",
" Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.680\n",
" Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.520\n",
" Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.729\n",
" Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.826\n",
"Results saved to runs/test/exp\n"
],
"name": "stdout"
@ -833,37 +835,37 @@
"id": "Knxi2ncxWffW",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 66,
"height": 65,
"referenced_widgets": [
"cf1ab9fde7444d3e874fcd407ba8f0f8",
"9ee03f9c85f34155b2645e89c9211547",
"933ebc451c09490aadf71afbbb3dff2a",
"8e7c55cbca624432a84fa7ad8f3a4016",
"dd62d83b35d04a178840772e82bd2f2e",
"d5c4f3d1c8b046e3a163faaa6b3a51ab",
"78d1da8efb504b03878ca9ce5b404006",
"d28208ba1213436a93926a01d99d97ae"
"8501ed1563e4452eac9df6b7a66e8f8c",
"d2bb96801e1f46f4a58e02534f7026ff",
"468a796ef06b4a24bcba6fbd4a0a8db5",
"42ad5c1ea7be4835bffebf90642178f1",
"c58b5536d98f4814831934e9c30c4d78",
"505597101151486ea29e9ab754544d27",
"de6e7b4b4a1c408c9f89d89b07a13bcd",
"f5cc9c7d4c274b2d81327ba3163c43fd"
]
},
"outputId": "59f9a94b-21e1-4626-f36a-a8e1b1e5c8f6"
"outputId": "c68a3db4-1314-46b4-9e52-83532eb65749"
},
"source": [
"# Download COCO128\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"
],
"execution_count": null,
"execution_count": 4,
"outputs": [
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "cf1ab9fde7444d3e874fcd407ba8f0f8",
"model_id": "8501ed1563e4452eac9df6b7a66e8f8c",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, max=22090455.0), HTML(value='')))"
"HBox(children=(FloatProgress(value=0.0, max=22091032.0), HTML(value='')))"
]
},
"metadata": {
@ -923,86 +925,90 @@
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "138f2d1d-364c-405a-cf13-ea91a2aff915"
"outputId": "6af7116a-01ab-4b94-e5d7-b37c17dc95de"
},
"source": [
"# 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"
],
"execution_count": null,
"execution_count": 5,
"outputs": [
{
"output_type": "stream",
"text": [
"Using torch 1.7.0+cu101 CUDA:0 (Tesla V100-SXM2-16GB, 16130MB)\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, 16130.5MB)\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_imgs=16, multi_scale=False, name='exp', noautoanchor=False, nosave=True, notest=False, project='runs/train', 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], 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",
"\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",
"2020-11-20 11:45:17.042357: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.1\n",
"Hyperparameters {'lr0': 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/v3.1/yolov5s.pt to yolov5s.pt...\n",
"100% 14.5M/14.5M [00:01<00:00, 14.8MB/s]\n",
"2021-01-17 19:56:03.945851: 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",
"Downloading https://github.com/ultralytics/yolov5/releases/download/v4.0/yolov5s.pt to yolov5s.pt...\n",
"100% 14.1M/14.1M [00:00<00:00, 15.8MB/s]\n",
"\n",
"\n",
" from n params module arguments \n",
" 0 -1 1 3520 models.common.Focus [3, 32, 3] \n",
" 1 -1 1 18560 models.common.Conv [32, 64, 3, 2] \n",
" 2 -1 1 19904 models.common.BottleneckCSP [64, 64, 1] \n",
" 2 -1 1 18816 models.common.C3 [64, 64, 1] \n",
" 3 -1 1 73984 models.common.Conv [64, 128, 3, 2] \n",
" 4 -1 1 161152 models.common.BottleneckCSP [128, 128, 3] \n",
" 4 -1 1 156928 models.common.C3 [128, 128, 3] \n",
" 5 -1 1 295424 models.common.Conv [128, 256, 3, 2] \n",
" 6 -1 1 641792 models.common.BottleneckCSP [256, 256, 3] \n",
" 6 -1 1 625152 models.common.C3 [256, 256, 3] \n",
" 7 -1 1 1180672 models.common.Conv [256, 512, 3, 2] \n",
" 8 -1 1 656896 models.common.SPP [512, 512, [5, 9, 13]] \n",
" 9 -1 1 1248768 models.common.BottleneckCSP [512, 512, 1, False] \n",
" 9 -1 1 1182720 models.common.C3 [512, 512, 1, False] \n",
" 10 -1 1 131584 models.common.Conv [512, 256, 1, 1] \n",
" 11 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] \n",
" 12 [-1, 6] 1 0 models.common.Concat [1] \n",
" 13 -1 1 378624 models.common.BottleneckCSP [512, 256, 1, False] \n",
" 13 -1 1 361984 models.common.C3 [512, 256, 1, False] \n",
" 14 -1 1 33024 models.common.Conv [256, 128, 1, 1] \n",
" 15 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] \n",
" 16 [-1, 4] 1 0 models.common.Concat [1] \n",
" 17 -1 1 95104 models.common.BottleneckCSP [256, 128, 1, False] \n",
" 17 -1 1 90880 models.common.C3 [256, 128, 1, False] \n",
" 18 -1 1 147712 models.common.Conv [128, 128, 3, 2] \n",
" 19 [-1, 14] 1 0 models.common.Concat [1] \n",
" 20 -1 1 313088 models.common.BottleneckCSP [256, 256, 1, False] \n",
" 20 -1 1 296448 models.common.C3 [256, 256, 1, False] \n",
" 21 -1 1 590336 models.common.Conv [256, 256, 3, 2] \n",
" 22 [-1, 10] 1 0 models.common.Concat [1] \n",
" 23 -1 1 1248768 models.common.BottleneckCSP [512, 512, 1, False] \n",
" 23 -1 1 1182720 models.common.C3 [512, 512, 1, False] \n",
" 24 [17, 20, 23] 1 229245 models.yolo.Detect [80, [[10, 13, 16, 30, 33, 23], [30, 61, 62, 45, 59, 119], [116, 90, 156, 198, 373, 326]], [128, 256, 512]]\n",
"Model Summary: 283 layers, 7468157 parameters, 7468157 gradients\n",
"Model Summary: 283 layers, 7276605 parameters, 7276605 gradients, 17.1 GFLOPS\n",
"\n",
"Transferred 370/370 items from yolov5s.pt\n",
"Optimizer groups: 62 .bias, 70 conv.weight, 59 other\n",
"Scanning images: 100% 128/128 [00:00<00:00, 5395.63it/s]\n",
"Scanning labels ../coco128/labels/train2017.cache (126 found, 0 missing, 2 empty, 0 duplicate, for 128 images): 128it [00:00, 13972.28it/s]\n",
"Caching images (0.1GB): 100% 128/128 [00:00<00:00, 173.55it/s]\n",
"Scanning labels ../coco128/labels/train2017.cache (126 found, 0 missing, 2 empty, 0 duplicate, for 128 images): 128it [00:00, 8693.98it/s]\n",
"Caching images (0.1GB): 100% 128/128 [00:00<00:00, 133.30it/s]\n",
"NumExpr defaulting to 2 threads.\n",
"Transferred 362/362 items from yolov5s.pt\n",
"Scaled weight_decay = 0.0005\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, 2647.74it/s]\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, 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, 24200.82it/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",
"\n",
"Analyzing 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",
"Image sizes 640 train, 640 test\n",
"Using 2 dataloader workers\n",
"Logging results to runs/train/exp\n",
"Starting training for 3 epochs...\n",
"\n",
" Epoch gpu_mem box obj cls total targets img_size\n",
" 0/2 5.24G 0.04202 0.06745 0.01503 0.1245 194 640: 100% 8/8 [00:03<00:00, 2.01it/s]\n",
" Class Images Targets P R mAP@.5 mAP@.5:.95: 100% 8/8 [00:03<00:00, 2.40it/s]\n",
" all 128 929 0.404 0.758 0.701 0.45\n",
" 0/2 3.27G 0.04357 0.06779 0.01869 0.1301 207 640: 100% 8/8 [00:04<00:00, 1.95it/s]\n",
" Class Images Targets P R mAP@.5 mAP@.5:.95: 100% 8/8 [00:05<00:00, 1.36it/s]\n",
" all 128 929 0.392 0.732 0.657 0.428\n",
"\n",
" Epoch gpu_mem box obj cls total targets img_size\n",
" 1/2 5.12G 0.04461 0.05874 0.0169 0.1202 142 640: 100% 8/8 [00:01<00:00, 4.14it/s]\n",
" Class Images Targets P R mAP@.5 mAP@.5:.95: 100% 8/8 [00:01<00:00, 5.75it/s]\n",
" all 128 929 0.403 0.772 0.703 0.453\n",
" 1/2 7.47G 0.04308 0.06636 0.02083 0.1303 227 640: 100% 8/8 [00:02<00:00, 3.88it/s]\n",
" Class Images Targets P R mAP@.5 mAP@.5:.95: 100% 8/8 [00:01<00:00, 5.07it/s]\n",
" all 128 929 0.387 0.737 0.657 0.432\n",
"\n",
" Epoch gpu_mem box obj cls total targets img_size\n",
" 2/2 5.12G 0.04445 0.06545 0.01667 0.1266 149 640: 100% 8/8 [00:01<00:00, 4.15it/s]\n",
" Class Images Targets P R mAP@.5 mAP@.5:.95: 100% 8/8 [00:06<00:00, 1.18it/s]\n",
" all 128 929 0.395 0.767 0.702 0.452\n",
"Optimizer stripped from runs/train/exp/weights/last.pt, 15.2MB\n",
"3 epochs completed in 0.006 hours.\n",
" 2/2 7.48G 0.04461 0.06864 0.01866 0.1319 191 640: 100% 8/8 [00:02<00:00, 3.57it/s]\n",
" Class Images Targets P R mAP@.5 mAP@.5:.95: 100% 8/8 [00:02<00:00, 2.82it/s]\n",
" all 128 929 0.385 0.742 0.658 0.431\n",
"Optimizer stripped from runs/train/exp/weights/last.pt, 14.8MB\n",
"3 epochs completed in 0.007 hours.\n",
"\n"
],
"name": "stdout"