Colab example/test of new features
Browse files- advanced_logging_test.ipynb +544 -0
advanced_logging_test.ipynb
ADDED
@@ -0,0 +1,544 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"nbformat": 4,
|
3 |
+
"nbformat_minor": 0,
|
4 |
+
"metadata": {
|
5 |
+
"colab": {
|
6 |
+
"name": "advanced_logging_test.ipynb",
|
7 |
+
"provenance": [],
|
8 |
+
"authorship_tag": "ABX9TyPFy7j0vPOSgtY60fQfXjdq",
|
9 |
+
"include_colab_link": true
|
10 |
+
},
|
11 |
+
"kernelspec": {
|
12 |
+
"name": "python3",
|
13 |
+
"display_name": "Python 3"
|
14 |
+
},
|
15 |
+
"accelerator": "GPU"
|
16 |
+
},
|
17 |
+
"cells": [
|
18 |
+
{
|
19 |
+
"cell_type": "markdown",
|
20 |
+
"metadata": {
|
21 |
+
"id": "view-in-github",
|
22 |
+
"colab_type": "text"
|
23 |
+
},
|
24 |
+
"source": [
|
25 |
+
"<a href=\"https://colab.research.google.com/github/alexstoken/yolov5/blob/advanced_logging/advanced_logging_test.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
|
26 |
+
]
|
27 |
+
},
|
28 |
+
{
|
29 |
+
"cell_type": "markdown",
|
30 |
+
"metadata": {
|
31 |
+
"id": "-cMOOhIGFBJa",
|
32 |
+
"colab_type": "text"
|
33 |
+
},
|
34 |
+
"source": [
|
35 |
+
"# **Test Advanced Logging Branch Features**"
|
36 |
+
]
|
37 |
+
},
|
38 |
+
{
|
39 |
+
"cell_type": "code",
|
40 |
+
"metadata": {
|
41 |
+
"id": "YwXvkCXB9Yif",
|
42 |
+
"colab_type": "code",
|
43 |
+
"colab": {
|
44 |
+
"base_uri": "https://localhost:8080/",
|
45 |
+
"height": 136
|
46 |
+
},
|
47 |
+
"outputId": "9a7ab9a3-c73d-4dae-ae35-237c9d84728f"
|
48 |
+
},
|
49 |
+
"source": [
|
50 |
+
"!git clone -b advanced_logging https://github.com/alexstoken/yolov5.git"
|
51 |
+
],
|
52 |
+
"execution_count": 1,
|
53 |
+
"outputs": [
|
54 |
+
{
|
55 |
+
"output_type": "stream",
|
56 |
+
"text": [
|
57 |
+
"Cloning into 'yolov5'...\n",
|
58 |
+
"remote: Enumerating objects: 53, done.\u001b[K\n",
|
59 |
+
"remote: Counting objects: 100% (53/53), done.\u001b[K\n",
|
60 |
+
"remote: Compressing objects: 100% (39/39), done.\u001b[K\n",
|
61 |
+
"remote: Total 1223 (delta 28), reused 35 (delta 14), pack-reused 1170\u001b[K\n",
|
62 |
+
"Receiving objects: 100% (1223/1223), 3.50 MiB | 3.20 MiB/s, done.\n",
|
63 |
+
"Resolving deltas: 100% (811/811), done.\n"
|
64 |
+
],
|
65 |
+
"name": "stdout"
|
66 |
+
}
|
67 |
+
]
|
68 |
+
},
|
69 |
+
{
|
70 |
+
"cell_type": "code",
|
71 |
+
"metadata": {
|
72 |
+
"id": "pNJbzKWK9r3l",
|
73 |
+
"colab_type": "code",
|
74 |
+
"colab": {
|
75 |
+
"base_uri": "https://localhost:8080/",
|
76 |
+
"height": 34
|
77 |
+
},
|
78 |
+
"outputId": "67d82040-b5af-48b5-fb93-4ed962e48680"
|
79 |
+
},
|
80 |
+
"source": [
|
81 |
+
"!pip install -r yolov5/requirements.txt # install dependencies\n",
|
82 |
+
"%cd yolov5\n",
|
83 |
+
"\n",
|
84 |
+
"import torch\n",
|
85 |
+
"from IPython.display import Image, clear_output # to display images\n",
|
86 |
+
"from utils.google_utils import gdrive_download # to download models/datasets\n",
|
87 |
+
"\n",
|
88 |
+
"clear_output()\n",
|
89 |
+
"print('Setup complete. Using torch %s %s' % (torch.__version__, torch.cuda.get_device_properties(0) if torch.cuda.is_available() else 'CPU'))"
|
90 |
+
],
|
91 |
+
"execution_count": 2,
|
92 |
+
"outputs": [
|
93 |
+
{
|
94 |
+
"output_type": "stream",
|
95 |
+
"text": [
|
96 |
+
"Setup complete. Using torch 1.5.1+cu101 _CudaDeviceProperties(name='Tesla K80', major=3, minor=7, total_memory=11441MB, multi_processor_count=13)\n"
|
97 |
+
],
|
98 |
+
"name": "stdout"
|
99 |
+
}
|
100 |
+
]
|
101 |
+
},
|
102 |
+
{
|
103 |
+
"cell_type": "markdown",
|
104 |
+
"metadata": {
|
105 |
+
"id": "amtgnroz901E",
|
106 |
+
"colab_type": "text"
|
107 |
+
},
|
108 |
+
"source": [
|
109 |
+
"## Train"
|
110 |
+
]
|
111 |
+
},
|
112 |
+
{
|
113 |
+
"cell_type": "code",
|
114 |
+
"metadata": {
|
115 |
+
"id": "0NSb22om9ybq",
|
116 |
+
"colab_type": "code",
|
117 |
+
"colab": {
|
118 |
+
"base_uri": "https://localhost:8080/",
|
119 |
+
"height": 34
|
120 |
+
},
|
121 |
+
"outputId": "ee202bce-ad59-4bba-fcd2-77a3dd98fd4a"
|
122 |
+
},
|
123 |
+
"source": [
|
124 |
+
"# Download tutorial dataset coco128.yaml\n",
|
125 |
+
"gdrive_download('1n_oKgR81BJtqk75b00eAjdv03qVCQn2f','coco128.zip') # tutorial dataset\n",
|
126 |
+
"!mv ./coco128 ../ # move folder alongside /yolov5"
|
127 |
+
],
|
128 |
+
"execution_count": 3,
|
129 |
+
"outputs": [
|
130 |
+
{
|
131 |
+
"output_type": "stream",
|
132 |
+
"text": [
|
133 |
+
"Downloading https://drive.google.com/uc?export=download&id=1n_oKgR81BJtqk75b00eAjdv03qVCQn2f as coco128.zip... unzipping... Done (5.1s)\n"
|
134 |
+
],
|
135 |
+
"name": "stdout"
|
136 |
+
}
|
137 |
+
]
|
138 |
+
},
|
139 |
+
{
|
140 |
+
"cell_type": "markdown",
|
141 |
+
"metadata": {
|
142 |
+
"id": "71hxUTfvFJky",
|
143 |
+
"colab_type": "text"
|
144 |
+
},
|
145 |
+
"source": [
|
146 |
+
"**Verify Help Arg Works**"
|
147 |
+
]
|
148 |
+
},
|
149 |
+
{
|
150 |
+
"cell_type": "code",
|
151 |
+
"metadata": {
|
152 |
+
"id": "6SLw4hNi-C1L",
|
153 |
+
"colab_type": "code",
|
154 |
+
"colab": {
|
155 |
+
"base_uri": "https://localhost:8080/",
|
156 |
+
"height": 544
|
157 |
+
},
|
158 |
+
"outputId": "e0ca506c-ddfb-4b86-d5e8-ca98729672b9"
|
159 |
+
},
|
160 |
+
"source": [
|
161 |
+
"!python train.py --help"
|
162 |
+
],
|
163 |
+
"execution_count": 4,
|
164 |
+
"outputs": [
|
165 |
+
{
|
166 |
+
"output_type": "stream",
|
167 |
+
"text": [
|
168 |
+
"Apex recommended for faster mixed precision training: https://github.com/NVIDIA/apex\n",
|
169 |
+
"usage: train.py [-h] [--cfg CFG] [--data DATA] [--hyp HYP] [--epochs EPOCHS]\n",
|
170 |
+
" [--batch-size BATCH_SIZE] [--img-size IMG_SIZE [IMG_SIZE ...]]\n",
|
171 |
+
" [--rect] [--resume [RESUME]] [--nosave] [--notest]\n",
|
172 |
+
" [--noautoanchor] [--evolve] [--bucket BUCKET] [--cache-images]\n",
|
173 |
+
" [--weights WEIGHTS] [--name NAME] [--device DEVICE]\n",
|
174 |
+
" [--multi-scale] [--single-cls]\n",
|
175 |
+
"\n",
|
176 |
+
"optional arguments:\n",
|
177 |
+
" -h, --help show this help message and exit\n",
|
178 |
+
" --cfg CFG model cfg path[*.yaml]\n",
|
179 |
+
" --data DATA data cfg path [*.yaml]\n",
|
180 |
+
" --hyp HYP hyp cfg path [*.yaml].\n",
|
181 |
+
" --epochs EPOCHS\n",
|
182 |
+
" --batch-size BATCH_SIZE\n",
|
183 |
+
" --img-size IMG_SIZE [IMG_SIZE ...]\n",
|
184 |
+
" train,test sizes. Assumes square imgs.\n",
|
185 |
+
" --rect rectangular training\n",
|
186 |
+
" --resume [RESUME] resume training from given path/to/last.pt, or most\n",
|
187 |
+
" recent run if blank.\n",
|
188 |
+
" --nosave only save final checkpoint\n",
|
189 |
+
" --notest only test final epoch\n",
|
190 |
+
" --noautoanchor disable autoanchor check\n",
|
191 |
+
" --evolve evolve hyperparameters\n",
|
192 |
+
" --bucket BUCKET gsutil bucket\n",
|
193 |
+
" --cache-images cache images for faster training\n",
|
194 |
+
" --weights WEIGHTS initial weights path\n",
|
195 |
+
" --name NAME renames results.txt to results_name.txt if supplied\n",
|
196 |
+
" --device DEVICE cuda device, i.e. 0 or 0,1,2,3 or cpu\n",
|
197 |
+
" --multi-scale vary img-size +/- 50%\n",
|
198 |
+
" --single-cls train as single-class dataset\n"
|
199 |
+
],
|
200 |
+
"name": "stdout"
|
201 |
+
}
|
202 |
+
]
|
203 |
+
},
|
204 |
+
{
|
205 |
+
"cell_type": "markdown",
|
206 |
+
"metadata": {
|
207 |
+
"id": "ou1ochfx-VTr",
|
208 |
+
"colab_type": "text"
|
209 |
+
},
|
210 |
+
"source": [
|
211 |
+
"**Run with hyperparameters from yaml file**"
|
212 |
+
]
|
213 |
+
},
|
214 |
+
{
|
215 |
+
"cell_type": "code",
|
216 |
+
"metadata": {
|
217 |
+
"id": "wLHoZYbk-EqT",
|
218 |
+
"colab_type": "code",
|
219 |
+
"colab": {
|
220 |
+
"base_uri": "https://localhost:8080/",
|
221 |
+
"height": 1000
|
222 |
+
},
|
223 |
+
"outputId": "63ed4676-22b8-4852-e663-5c3cfefe19df"
|
224 |
+
},
|
225 |
+
"source": [
|
226 |
+
"!python train.py --img 320 --batch 32 --epochs 3 --data ./data/coco128.yaml --cfg ./models/yolov5s.yaml --weights yolov5s.pt --name tutorial --cache --hyp new_hyp.yaml"
|
227 |
+
],
|
228 |
+
"execution_count": 9,
|
229 |
+
"outputs": [
|
230 |
+
{
|
231 |
+
"output_type": "stream",
|
232 |
+
"text": [
|
233 |
+
"Apex recommended for faster mixed precision training: https://github.com/NVIDIA/apex\n",
|
234 |
+
"Namespace(batch_size=32, bucket='', cache_images=True, cfg='./models/yolov5s.yaml', data='./data/coco128.yaml', device='', epochs=3, evolve=False, hyp='new_hyp.yaml', img_size=[320], multi_scale=False, name='tutorial', noautoanchor=False, nosave=False, notest=False, rect=False, resume=False, single_cls=False, weights='yolov5s.pt')\n",
|
235 |
+
"Using CUDA device0 _CudaDeviceProperties(name='Tesla K80', total_memory=11441MB)\n",
|
236 |
+
"\n",
|
237 |
+
"2020-07-07 16:03:25.684542: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
|
238 |
+
"Using FocalLoss(gamma=1)\n",
|
239 |
+
"Beginning training with {'optimizer': 'adam', 'lr0': 0.001, 'momentum': 0.9, 'weight_decay': 0.000625, 'giou': 0.15, 'cls': 0.58, 'cls_pw': 1.0, 'obj': 1.0, 'obj_pw': 1.0, 'iou_t': 0.2, 'anchor_t': 10.0, 'fl_gamma': 1.0, 'hsv_h': 0.014, 'hsv_s': 0.68, 'hsv_v': 0.36, 'degrees': 20.0, 'translate': 0.0, 'scale': 0.5, 'shear': 0.0}\n",
|
240 |
+
"\n",
|
241 |
+
"\n",
|
242 |
+
"Start Tensorboard with \"tensorboard --logdir=runs\", view at http://localhost:6006/\n",
|
243 |
+
"\n",
|
244 |
+
" from n params module arguments \n",
|
245 |
+
" 0 -1 1 3520 models.common.Focus [3, 32, 3] \n",
|
246 |
+
" 1 -1 1 18560 models.common.Conv [32, 64, 3, 2] \n",
|
247 |
+
" 2 -1 1 19904 models.common.BottleneckCSP [64, 64, 1] \n",
|
248 |
+
" 3 -1 1 73984 models.common.Conv [64, 128, 3, 2] \n",
|
249 |
+
" 4 -1 1 161152 models.common.BottleneckCSP [128, 128, 3] \n",
|
250 |
+
" 5 -1 1 295424 models.common.Conv [128, 256, 3, 2] \n",
|
251 |
+
" 6 -1 1 641792 models.common.BottleneckCSP [256, 256, 3] \n",
|
252 |
+
" 7 -1 1 1180672 models.common.Conv [256, 512, 3, 2] \n",
|
253 |
+
" 8 -1 1 656896 models.common.SPP [512, 512, [5, 9, 13]] \n",
|
254 |
+
" 9 -1 1 1248768 models.common.BottleneckCSP [512, 512, 1, False] \n",
|
255 |
+
" 10 -1 1 131584 models.common.Conv [512, 256, 1, 1] \n",
|
256 |
+
" 11 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] \n",
|
257 |
+
" 12 [-1, 6] 1 0 models.common.Concat [1] \n",
|
258 |
+
" 13 -1 1 378624 models.common.BottleneckCSP [512, 256, 1, False] \n",
|
259 |
+
" 14 -1 1 33024 models.common.Conv [256, 128, 1, 1] \n",
|
260 |
+
" 15 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] \n",
|
261 |
+
" 16 [-1, 4] 1 0 models.common.Concat [1] \n",
|
262 |
+
" 17 -1 1 95104 models.common.BottleneckCSP [256, 128, 1, False] \n",
|
263 |
+
" 18 -1 1 32895 torch.nn.modules.conv.Conv2d [128, 255, 1, 1] \n",
|
264 |
+
" 19 -2 1 147712 models.common.Conv [128, 128, 3, 2] \n",
|
265 |
+
" 20 [-1, 14] 1 0 models.common.Concat [1] \n",
|
266 |
+
" 21 -1 1 313088 models.common.BottleneckCSP [256, 256, 1, False] \n",
|
267 |
+
" 22 -1 1 65535 torch.nn.modules.conv.Conv2d [256, 255, 1, 1] \n",
|
268 |
+
" 23 -2 1 590336 models.common.Conv [256, 256, 3, 2] \n",
|
269 |
+
" 24 [-1, 10] 1 0 models.common.Concat [1] \n",
|
270 |
+
" 25 -1 1 1248768 models.common.BottleneckCSP [512, 512, 1, False] \n",
|
271 |
+
" 26 -1 1 130815 torch.nn.modules.conv.Conv2d [512, 255, 1, 1] \n",
|
272 |
+
" 27 [-1, 22, 18] 1 0 models.yolo.Detect [80, [[116, 90, 156, 198, 373, 326], [30, 61, 62, 45, 59, 119], [10, 13, 16, 30, 33, 23]]]\n",
|
273 |
+
"Model Summary: 191 layers, 7.46816e+06 parameters, 7.46816e+06 gradients\n",
|
274 |
+
"\n",
|
275 |
+
"Optimizer groups: 62 .bias, 70 conv.weight, 59 other\n",
|
276 |
+
"/usr/local/lib/python3.6/dist-packages/torch/optim/lr_scheduler.py:123: UserWarning: Detected call of `lr_scheduler.step()` before `optimizer.step()`. In PyTorch 1.1.0 and later, you should call them in the opposite order: `optimizer.step()` before `lr_scheduler.step()`. Failure to do this will result in PyTorch skipping the first value of the learning rate schedule. See more details at https://pytorch.org/docs/stable/optim.html#how-to-adjust-learning-rate\n",
|
277 |
+
" \"https://pytorch.org/docs/stable/optim.html#how-to-adjust-learning-rate\", UserWarning)\n",
|
278 |
+
"Caching labels ../coco128/labels/train2017 (126 found, 0 missing, 2 empty, 0 duplicate, for 128 images): 100% 128/128 [00:00<00:00, 6343.82it/s]\n",
|
279 |
+
"Caching images (0.0GB): 100% 128/128 [00:00<00:00, 137.36it/s]\n",
|
280 |
+
"Caching labels ../coco128/labels/train2017 (126 found, 0 missing, 2 empty, 0 duplicate, for 128 images): 100% 128/128 [00:00<00:00, 4530.37it/s]\n",
|
281 |
+
"Caching images (0.0GB): 100% 128/128 [00:01<00:00, 124.18it/s]\n",
|
282 |
+
"\n",
|
283 |
+
"Analyzing anchors... Best Possible Recall (BPR) = 0.9968\n",
|
284 |
+
"Image sizes 320 train, 320 test\n",
|
285 |
+
"Using 2 dataloader workers\n",
|
286 |
+
"Starting training for 3 epochs...\n",
|
287 |
+
"\n",
|
288 |
+
" Epoch gpu_mem GIoU obj cls total targets img_size\n",
|
289 |
+
" 0/2 2.71G 0.2492 0.08469 0.01266 0.3466 469 320: 100% 4/4 [00:06<00:00, 1.56s/it]\n",
|
290 |
+
" Class Images Targets P R [email protected] [email protected]:.95: 100% 4/4 [00:21<00:00, 5.39s/it]\n",
|
291 |
+
" all 128 929 0.0866 0.26 0.14 0.0587\n",
|
292 |
+
"\n",
|
293 |
+
" Epoch gpu_mem GIoU obj cls total targets img_size\n",
|
294 |
+
" 1/2 2.67G 0.245 0.07209 0.01212 0.3292 424 320: 100% 4/4 [00:02<00:00, 1.69it/s]\n",
|
295 |
+
" Class Images Targets P R [email protected] [email protected]:.95: 0% 0/4 [00:00<?, ?it/s]tcmalloc: large alloc 1076248576 bytes == 0x6d04e000 @ 0x7fd07507bb6b 0x7fd07509b379 0x7fd029dce04e 0x7fd029dcff4a 0x7fd062ec0f3b 0x7fd062b0ff7e 0x7fd062d79075 0x7fd062d6b081 0x7fd062d6a5ce 0x7fd062d6b081 0x7fd0647c173a 0x7fd062d6b081 0x7fd062b0ad17 0x7fd062b0b940 0x7fd062e29fda 0x7fd0648a8ebe 0x7fd062d6b532 0x7fd010be3a51 0x7fd010be2dca 0x7fd010be22f1 0x7fd010be19b7 0x7fd010be0f74 0x7fd010bdf3a3 0x7fd010b47a1e 0x7fd010b58607 0x7fd064b4df34 0x7fd07142a49f 0x7fd0713f9a94 0x7fd0710f1213 0x50a635 0x50bfb4\n",
|
296 |
+
"tcmalloc: large alloc 1448099840 bytes == 0x6d04e000 @ 0x7fd07507bb6b 0x7fd07509b379 0x7fd029dce04e 0x7fd029dcff4a 0x7fd062ec0f3b 0x7fd062b0ff7e 0x7fd062d79075 0x7fd062d6b081 0x7fd062d6a5ce 0x7fd062d6b081 0x7fd0647c173a 0x7fd062d6b081 0x7fd062b0ad17 0x7fd062b0b940 0x7fd062e29fda 0x7fd0648a8ebe 0x7fd062d6b532 0x7fd010be3a51 0x7fd010be2dca 0x7fd010be22f1 0x7fd010be19b7 0x7fd010be0f74 0x7fd010bdf3a3 0x7fd010b47a1e 0x7fd010b58607 0x7fd064b4df34 0x7fd07142a49f 0x7fd0713f9a94 0x7fd0710f1213 0x50a635 0x50bfb4\n",
|
297 |
+
"tcmalloc: large alloc 1466916864 bytes == 0x6d04e000 @ 0x7fd07507bb6b 0x7fd07509b379 0x7fd029dce04e 0x7fd029dcff4a 0x7fd062ec0f3b 0x7fd062b0ff7e 0x7fd062d79075 0x7fd062d6b081 0x7fd062d6a5ce 0x7fd062d6b081 0x7fd0647c173a 0x7fd062d6b081 0x7fd062b0ad17 0x7fd062b0b940 0x7fd062e29fda 0x7fd0648a8ebe 0x7fd062d6b532 0x7fd010be3a51 0x7fd010be2dca 0x7fd010be22f1 0x7fd010be19b7 0x7fd010be0f74 0x7fd010bdf3a3 0x7fd010b47a1e 0x7fd010b58607 0x7fd064b4df34 0x7fd07142a49f 0x7fd0713f9a94 0x7fd0710f1213 0x50a635 0x50bfb4\n",
|
298 |
+
" Class Images Targets P R [email protected] [email protected]:.95: 25% 1/4 [00:12<00:37, 12.65s/it]tcmalloc: large alloc 1618354176 bytes == 0x6d04e000 @ 0x7fd07507bb6b 0x7fd07509b379 0x7fd029dce04e 0x7fd029dcff4a 0x7fd062ec0f3b 0x7fd062b0ff7e 0x7fd062d79075 0x7fd062d6b081 0x7fd062d6a5ce 0x7fd062d6b081 0x7fd0647c173a 0x7fd062d6b081 0x7fd062b0ad17 0x7fd062b0b940 0x7fd062e29fda 0x7fd0648a8ebe 0x7fd062d6b532 0x7fd010be3a51 0x7fd010be2dca 0x7fd010be22f1 0x7fd010be19b7 0x7fd010be0f74 0x7fd010bdf3a3 0x7fd010b47a1e 0x7fd010b58607 0x7fd064b4df34 0x7fd07142a49f 0x7fd0713f9a94 0x7fd0710f1213 0x50a635 0x50bfb4\n",
|
299 |
+
"tcmalloc: large alloc 1809465344 bytes == 0x6d04e000 @ 0x7fd07507bb6b 0x7fd07509b379 0x7fd029dce04e 0x7fd029dcff4a 0x7fd062ec0f3b 0x7fd062b0ff7e 0x7fd062d79075 0x7fd062d6b081 0x7fd062d6a5ce 0x7fd062d6b081 0x7fd0647c173a 0x7fd062d6b081 0x7fd062b0ad17 0x7fd062b0b940 0x7fd062e29fda 0x7fd0648a8ebe 0x7fd062d6b532 0x7fd010be3a51 0x7fd010be2dca 0x7fd010be22f1 0x7fd010be19b7 0x7fd010be0f74 0x7fd010bdf3a3 0x7fd010b47a1e 0x7fd010b58607 0x7fd064b4df34 0x7fd07142a49f 0x7fd0713f9a94 0x7fd0710f1213 0x50a635 0x50bfb4\n",
|
300 |
+
" Class Images Targets P R [email protected] [email protected]:.95: 50% 2/4 [00:23<00:23, 11.97s/it]tcmalloc: large alloc 2126405632 bytes == 0x6d04e000 @ 0x7fd07507bb6b 0x7fd07509b379 0x7fd029dce04e 0x7fd029dcff4a 0x7fd062ec0f3b 0x7fd062b0ff7e 0x7fd062d79075 0x7fd062d6b081 0x7fd062d6a5ce 0x7fd062d6b081 0x7fd0647c173a 0x7fd062d6b081 0x7fd062b0ad17 0x7fd062b0b940 0x7fd062e29fda 0x7fd0648a8ebe 0x7fd062d6b532 0x7fd010be3a51 0x7fd010be2dca 0x7fd010be22f1 0x7fd010be19b7 0x7fd010be0f74 0x7fd010bdf3a3 0x7fd010b47a1e 0x7fd010b58607 0x7fd064b4df34 0x7fd07142a49f 0x7fd0713f9a94 0x7fd0710f1213 0x50a635 0x50bfb4\n",
|
301 |
+
"tcmalloc: large alloc 2575089664 bytes == 0x6d04e000 @ 0x7fd07507bb6b 0x7fd07509b379 0x7fd029dce04e 0x7fd029dcff4a 0x7fd062ec0f3b 0x7fd062b0ff7e 0x7fd062d79075 0x7fd062d6b081 0x7fd062d6a5ce 0x7fd062d6b081 0x7fd0647c173a 0x7fd062d6b081 0x7fd062b0ad17 0x7fd062b0b940 0x7fd062e29fda 0x7fd0648a8ebe 0x7fd062d6b532 0x7fd010be3a51 0x7fd010be2dca 0x7fd010be22f1 0x7fd010be19b7 0x7fd010be0f74 0x7fd010bdf3a3 0x7fd010b47a1e 0x7fd010b58607 0x7fd064b4df34 0x7fd07142a49f 0x7fd0713f9a94 0x7fd0710f1213 0x50a635 0x50bfb4\n",
|
302 |
+
" Class Images Targets P R [email protected] [email protected]:.95: 75% 3/4 [00:33<00:11, 11.55s/it]tcmalloc: large alloc 2550161408 bytes == 0x6d04e000 @ 0x7fd07507bb6b 0x7fd07509b379 0x7fd029dce04e 0x7fd029dcff4a 0x7fd062ec0f3b 0x7fd062b0ff7e 0x7fd062d79075 0x7fd062d6b081 0x7fd062d6a5ce 0x7fd062d6b081 0x7fd0647c173a 0x7fd062d6b081 0x7fd062b0ad17 0x7fd062b0b940 0x7fd062e29fda 0x7fd0648a8ebe 0x7fd062d6b532 0x7fd010be3a51 0x7fd010be2dca 0x7fd010be22f1 0x7fd010be19b7 0x7fd010be0f74 0x7fd010bdf3a3 0x7fd010b47a1e 0x7fd010b58607 0x7fd064b4df34 0x7fd07142a49f 0x7fd0713f9a94 0x7fd0710f1213 0x50a635 0x50bfb4\n",
|
303 |
+
" Class Images Targets P R [email protected] [email protected]:.95: 100% 4/4 [00:44<00:00, 11.08s/it]\n",
|
304 |
+
" all 128 929 0.00153 0.0283 0.00768 0.002\n",
|
305 |
+
"\n",
|
306 |
+
" Epoch gpu_mem GIoU obj cls total targets img_size\n",
|
307 |
+
" 2/2 9.18G 0.2386 0.06668 0.0113 0.3166 358 320: 100% 4/4 [00:02<00:00, 1.65it/s]\n",
|
308 |
+
" Class Images Targets P R [email protected] [email protected]:.95: 50% 2/4 [00:21<00:22, 11.30s/it]tcmalloc: large alloc 2955386880 bytes == 0x6d04e000 @ 0x7fd07507bb6b 0x7fd07509b379 0x7fd029dce04e 0x7fd029dcff4a 0x7fd062ec0f3b 0x7fd062b0ff7e 0x7fd062d79075 0x7fd062d6b081 0x7fd062d6a5ce 0x7fd062d6b081 0x7fd0647c173a 0x7fd062d6b081 0x7fd062b0ad17 0x7fd062b0b940 0x7fd062e29fda 0x7fd0648a8ebe 0x7fd062d6b532 0x7fd010be3a51 0x7fd010be2dca 0x7fd010be22f1 0x7fd010be19b7 0x7fd010be0f74 0x7fd010bdf3a3 0x7fd010b47a1e 0x7fd010b58607 0x7fd064b4df34 0x7fd07142a49f 0x7fd0713f9a94 0x7fd0710f1213 0x50a635 0x50bfb4\n",
|
309 |
+
" Class Images Targets P R [email protected] [email protected]:.95: 75% 3/4 [00:32<00:11, 11.11s/it]tcmalloc: large alloc 3214819328 bytes == 0x6d04e000 @ 0x7fd07507bb6b 0x7fd07509b379 0x7fd029dce04e 0x7fd029dcff4a 0x7fd062ec0f3b 0x7fd062b0ff7e 0x7fd062d79075 0x7fd062d6b081 0x7fd062d6a5ce 0x7fd062d6b081 0x7fd0647c173a 0x7fd062d6b081 0x7fd062b0ad17 0x7fd062b0b940 0x7fd062e29fda 0x7fd0648a8ebe 0x7fd062d6b532 0x7fd010be3a51 0x7fd010be2dca 0x7fd010be22f1 0x7fd010be19b7 0x7fd010be0f74 0x7fd010bdf3a3 0x7fd010b47a1e 0x7fd010b58607 0x7fd064b4df34 0x7fd07142a49f 0x7fd0713f9a94 0x7fd0710f1213 0x50a635 0x50bfb4\n",
|
310 |
+
" Class Images Targets P R [email protected] [email protected]:.95: 100% 4/4 [00:43<00:00, 10.78s/it]\n",
|
311 |
+
" all 128 929 0.00137 0.0103 0.00455 0.00129\n",
|
312 |
+
"Optimizer stripped from runs/Jul07_16-03-25_7d20d25984catutorial/weights/last_tutorial.pt\n",
|
313 |
+
"Optimizer stripped from runs/Jul07_16-03-25_7d20d25984catutorial/weights/best_tutorial.pt\n",
|
314 |
+
"3 epochs completed in 0.034 hours.\n",
|
315 |
+
"\n"
|
316 |
+
],
|
317 |
+
"name": "stdout"
|
318 |
+
}
|
319 |
+
]
|
320 |
+
},
|
321 |
+
{
|
322 |
+
"cell_type": "markdown",
|
323 |
+
"metadata": {
|
324 |
+
"id": "ai02PVU6BsOT",
|
325 |
+
"colab_type": "text"
|
326 |
+
},
|
327 |
+
"source": [
|
328 |
+
"**Resume from last run**"
|
329 |
+
]
|
330 |
+
},
|
331 |
+
{
|
332 |
+
"cell_type": "code",
|
333 |
+
"metadata": {
|
334 |
+
"id": "tPBo4h3xCIJq",
|
335 |
+
"colab_type": "code",
|
336 |
+
"colab": {
|
337 |
+
"base_uri": "https://localhost:8080/",
|
338 |
+
"height": 1000
|
339 |
+
},
|
340 |
+
"outputId": "a5f66250-e624-49d3-c1ae-eaa1168951f8"
|
341 |
+
},
|
342 |
+
"source": [
|
343 |
+
"!python train.py --img 320 --batch 32 --epochs 5 --data ./data/coco128.yaml --cfg ./models/yolov5s.yaml --name tutorial --cache --resume"
|
344 |
+
],
|
345 |
+
"execution_count": 18,
|
346 |
+
"outputs": [
|
347 |
+
{
|
348 |
+
"output_type": "stream",
|
349 |
+
"text": [
|
350 |
+
"Apex recommended for faster mixed precision training: https://github.com/NVIDIA/apex\n",
|
351 |
+
"Resuming training from ./runs/Jul07_16-15-02_7d20d25984catutorial/weights/last.pt\n",
|
352 |
+
"Namespace(batch_size=32, bucket='', cache_images=True, cfg='./models/yolov5s.yaml', data='./data/coco128.yaml', device='', epochs=5, evolve=False, hyp='', img_size=[320], multi_scale=False, name='tutorial', noautoanchor=False, nosave=False, notest=False, rect=False, resume='get_last', single_cls=False, weights='./runs/Jul07_16-15-02_7d20d25984catutorial/weights/last.pt')\n",
|
353 |
+
"Using CUDA device0 _CudaDeviceProperties(name='Tesla K80', total_memory=11441MB)\n",
|
354 |
+
"\n",
|
355 |
+
"2020-07-07 16:16:11.652288: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
|
356 |
+
"Beginning training with {'optimizer': 'SGD', 'lr0': 0.01, 'momentum': 0.937, 'weight_decay': 0.0005, 'giou': 0.05, 'cls': 0.58, '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.014, 'hsv_s': 0.68, 'hsv_v': 0.36, 'degrees': 0.0, 'translate': 0.0, 'scale': 0.5, 'shear': 0.0}\n",
|
357 |
+
"\n",
|
358 |
+
"\n",
|
359 |
+
"Start Tensorboard with \"tensorboard --logdir=runs\", view at http://localhost:6006/\n",
|
360 |
+
"\n",
|
361 |
+
" from n params module arguments \n",
|
362 |
+
" 0 -1 1 3520 models.common.Focus [3, 32, 3] \n",
|
363 |
+
" 1 -1 1 18560 models.common.Conv [32, 64, 3, 2] \n",
|
364 |
+
" 2 -1 1 19904 models.common.BottleneckCSP [64, 64, 1] \n",
|
365 |
+
" 3 -1 1 73984 models.common.Conv [64, 128, 3, 2] \n",
|
366 |
+
" 4 -1 1 161152 models.common.BottleneckCSP [128, 128, 3] \n",
|
367 |
+
" 5 -1 1 295424 models.common.Conv [128, 256, 3, 2] \n",
|
368 |
+
" 6 -1 1 641792 models.common.BottleneckCSP [256, 256, 3] \n",
|
369 |
+
" 7 -1 1 1180672 models.common.Conv [256, 512, 3, 2] \n",
|
370 |
+
" 8 -1 1 656896 models.common.SPP [512, 512, [5, 9, 13]] \n",
|
371 |
+
" 9 -1 1 1248768 models.common.BottleneckCSP [512, 512, 1, False] \n",
|
372 |
+
" 10 -1 1 131584 models.common.Conv [512, 256, 1, 1] \n",
|
373 |
+
" 11 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] \n",
|
374 |
+
" 12 [-1, 6] 1 0 models.common.Concat [1] \n",
|
375 |
+
" 13 -1 1 378624 models.common.BottleneckCSP [512, 256, 1, False] \n",
|
376 |
+
" 14 -1 1 33024 models.common.Conv [256, 128, 1, 1] \n",
|
377 |
+
" 15 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] \n",
|
378 |
+
" 16 [-1, 4] 1 0 models.common.Concat [1] \n",
|
379 |
+
" 17 -1 1 95104 models.common.BottleneckCSP [256, 128, 1, False] \n",
|
380 |
+
" 18 -1 1 32895 torch.nn.modules.conv.Conv2d [128, 255, 1, 1] \n",
|
381 |
+
" 19 -2 1 147712 models.common.Conv [128, 128, 3, 2] \n",
|
382 |
+
" 20 [-1, 14] 1 0 models.common.Concat [1] \n",
|
383 |
+
" 21 -1 1 313088 models.common.BottleneckCSP [256, 256, 1, False] \n",
|
384 |
+
" 22 -1 1 65535 torch.nn.modules.conv.Conv2d [256, 255, 1, 1] \n",
|
385 |
+
" 23 -2 1 590336 models.common.Conv [256, 256, 3, 2] \n",
|
386 |
+
" 24 [-1, 10] 1 0 models.common.Concat [1] \n",
|
387 |
+
" 25 -1 1 1248768 models.common.BottleneckCSP [512, 512, 1, False] \n",
|
388 |
+
" 26 -1 1 130815 torch.nn.modules.conv.Conv2d [512, 255, 1, 1] \n",
|
389 |
+
" 27 [-1, 22, 18] 1 0 models.yolo.Detect [80, [[116, 90, 156, 198, 373, 326], [30, 61, 62, 45, 59, 119], [10, 13, 16, 30, 33, 23]]]\n",
|
390 |
+
"Model Summary: 191 layers, 7.46816e+06 parameters, 7.46816e+06 gradients\n",
|
391 |
+
"\n",
|
392 |
+
"Optimizer groups: 62 .bias, 70 conv.weight, 59 other\n",
|
393 |
+
"/usr/local/lib/python3.6/dist-packages/torch/optim/lr_scheduler.py:123: UserWarning: Detected call of `lr_scheduler.step()` before `optimizer.step()`. In PyTorch 1.1.0 and later, you should call them in the opposite order: `optimizer.step()` before `lr_scheduler.step()`. Failure to do this will result in PyTorch skipping the first value of the learning rate schedule. See more details at https://pytorch.org/docs/stable/optim.html#how-to-adjust-learning-rate\n",
|
394 |
+
" \"https://pytorch.org/docs/stable/optim.html#how-to-adjust-learning-rate\", UserWarning)\n",
|
395 |
+
"Caching labels ../coco128/labels/train2017 (126 found, 0 missing, 2 empty, 0 duplicate, for 128 images): 100% 128/128 [00:00<00:00, 6135.81it/s]\n",
|
396 |
+
"Caching images (0.0GB): 100% 128/128 [00:00<00:00, 137.74it/s]\n",
|
397 |
+
"Caching labels ../coco128/labels/train2017 (126 found, 0 missing, 2 empty, 0 duplicate, for 128 images): 100% 128/128 [00:00<00:00, 5008.22it/s]\n",
|
398 |
+
"Caching images (0.0GB): 100% 128/128 [00:01<00:00, 127.06it/s]\n",
|
399 |
+
"\n",
|
400 |
+
"Analyzing anchors... Best Possible Recall (BPR) = 0.9828. Attempting to generate improved anchors, please wait...\n",
|
401 |
+
"WARNING: Extremely small objects found. 35 of 929 labels are < 3 pixels in width or height.\n",
|
402 |
+
"Running kmeans for 9 anchors on 927 points...\n",
|
403 |
+
"thr=0.25: 0.9720 best possible recall, 3.73 anchors past thr\n",
|
404 |
+
"n=9, img_size=320, metric_all=0.260/0.653-mean/best, past_thr=0.471-mean: 9,12, 32,20, 27,49, 74,43, 54,92, 77,164, 160,109, 182,240, 302,188\n",
|
405 |
+
"Evolving anchors with Genetic Algorithm: fitness = 0.6628: 100% 1000/1000 [00:00<00:00, 1204.58it/s]\n",
|
406 |
+
"thr=0.25: 0.9860 best possible recall, 3.83 anchors past thr\n",
|
407 |
+
"n=9, img_size=320, metric_all=0.265/0.664-mean/best, past_thr=0.471-mean: 8,10, 22,12, 19,34, 46,35, 54,74, 57,139, 144,110, 175,217, 317,206\n",
|
408 |
+
"Original anchors better than new anchors. Proceeding with original anchors.\n",
|
409 |
+
"\n",
|
410 |
+
"Image sizes 320 train, 320 test\n",
|
411 |
+
"Using 2 dataloader workers\n",
|
412 |
+
"Starting training for 5 epochs...\n",
|
413 |
+
"\n",
|
414 |
+
" Epoch gpu_mem GIoU obj cls total targets img_size\n",
|
415 |
+
" 3/4 2.69G 0.1136 0.07635 0.03795 0.2279 438 320: 100% 4/4 [00:05<00:00, 1.28s/it]\n",
|
416 |
+
" Class Images Targets P R [email protected] [email protected]:.95: 100% 4/4 [00:08<00:00, 2.09s/it]\n",
|
417 |
+
" all 128 929 0.13 0.644 0.463 0.247\n",
|
418 |
+
"\n",
|
419 |
+
" Epoch gpu_mem GIoU obj cls total targets img_size\n",
|
420 |
+
" 4/4 2.65G 0.1098 0.07842 0.03901 0.2273 406 320: 100% 4/4 [00:02<00:00, 1.73it/s]\n",
|
421 |
+
" Class Images Targets P R [email protected] [email protected]:.95: 100% 4/4 [00:04<00:00, 1.01s/it]\n",
|
422 |
+
" all 128 929 0.132 0.634 0.479 0.247\n",
|
423 |
+
"Optimizer stripped from runs/Jul07_16-16-11_7d20d25984catutorial/weights/last_tutorial.pt\n",
|
424 |
+
"Optimizer stripped from runs/Jul07_16-16-11_7d20d25984catutorial/weights/best_tutorial.pt\n",
|
425 |
+
"2 epochs completed in 0.006 hours.\n",
|
426 |
+
"\n"
|
427 |
+
],
|
428 |
+
"name": "stdout"
|
429 |
+
}
|
430 |
+
]
|
431 |
+
},
|
432 |
+
{
|
433 |
+
"cell_type": "markdown",
|
434 |
+
"metadata": {
|
435 |
+
"id": "whhMiil2EkQS",
|
436 |
+
"colab_type": "text"
|
437 |
+
},
|
438 |
+
"source": [
|
439 |
+
"**Resume from Specific Run**"
|
440 |
+
]
|
441 |
+
},
|
442 |
+
{
|
443 |
+
"cell_type": "code",
|
444 |
+
"metadata": {
|
445 |
+
"id": "RXYjwze6ECPf",
|
446 |
+
"colab_type": "code",
|
447 |
+
"colab": {
|
448 |
+
"base_uri": "https://localhost:8080/",
|
449 |
+
"height": 1000
|
450 |
+
},
|
451 |
+
"outputId": "7b0d4d72-96e7-4f79-c23c-a18211c30654"
|
452 |
+
},
|
453 |
+
"source": [
|
454 |
+
"!python train.py --img 320 --batch 32 --epochs 5 --data ./data/coco128.yaml --cfg ./models/yolov5s.yaml --name tutorial --cache --resume ./runs/Jul07_16-15-02_7d20d25984catutorial/weights/last.pt"
|
455 |
+
],
|
456 |
+
"execution_count": 20,
|
457 |
+
"outputs": [
|
458 |
+
{
|
459 |
+
"output_type": "stream",
|
460 |
+
"text": [
|
461 |
+
"Apex recommended for faster mixed precision training: https://github.com/NVIDIA/apex\n",
|
462 |
+
"Resuming training from ./runs/Jul07_16-15-02_7d20d25984catutorial/weights/last.pt\n",
|
463 |
+
"Namespace(batch_size=32, bucket='', cache_images=True, cfg='./models/yolov5s.yaml', data='./data/coco128.yaml', device='', epochs=5, evolve=False, hyp='', img_size=[320], multi_scale=False, name='tutorial', noautoanchor=False, nosave=False, notest=False, rect=False, resume='./runs/Jul07_16-15-02_7d20d25984catutorial/weights/last.pt', single_cls=False, weights='./runs/Jul07_16-15-02_7d20d25984catutorial/weights/last.pt')\n",
|
464 |
+
"Using CUDA device0 _CudaDeviceProperties(name='Tesla K80', total_memory=11441MB)\n",
|
465 |
+
"\n",
|
466 |
+
"2020-07-07 16:18:01.613770: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
|
467 |
+
"Beginning training with {'optimizer': 'SGD', 'lr0': 0.01, 'momentum': 0.937, 'weight_decay': 0.0005, 'giou': 0.05, 'cls': 0.58, '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.014, 'hsv_s': 0.68, 'hsv_v': 0.36, 'degrees': 0.0, 'translate': 0.0, 'scale': 0.5, 'shear': 0.0}\n",
|
468 |
+
"\n",
|
469 |
+
"\n",
|
470 |
+
"Start Tensorboard with \"tensorboard --logdir=runs\", view at http://localhost:6006/\n",
|
471 |
+
"\n",
|
472 |
+
" from n params module arguments \n",
|
473 |
+
" 0 -1 1 3520 models.common.Focus [3, 32, 3] \n",
|
474 |
+
" 1 -1 1 18560 models.common.Conv [32, 64, 3, 2] \n",
|
475 |
+
" 2 -1 1 19904 models.common.BottleneckCSP [64, 64, 1] \n",
|
476 |
+
" 3 -1 1 73984 models.common.Conv [64, 128, 3, 2] \n",
|
477 |
+
" 4 -1 1 161152 models.common.BottleneckCSP [128, 128, 3] \n",
|
478 |
+
" 5 -1 1 295424 models.common.Conv [128, 256, 3, 2] \n",
|
479 |
+
" 6 -1 1 641792 models.common.BottleneckCSP [256, 256, 3] \n",
|
480 |
+
" 7 -1 1 1180672 models.common.Conv [256, 512, 3, 2] \n",
|
481 |
+
" 8 -1 1 656896 models.common.SPP [512, 512, [5, 9, 13]] \n",
|
482 |
+
" 9 -1 1 1248768 models.common.BottleneckCSP [512, 512, 1, False] \n",
|
483 |
+
" 10 -1 1 131584 models.common.Conv [512, 256, 1, 1] \n",
|
484 |
+
" 11 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] \n",
|
485 |
+
" 12 [-1, 6] 1 0 models.common.Concat [1] \n",
|
486 |
+
" 13 -1 1 378624 models.common.BottleneckCSP [512, 256, 1, False] \n",
|
487 |
+
" 14 -1 1 33024 models.common.Conv [256, 128, 1, 1] \n",
|
488 |
+
" 15 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] \n",
|
489 |
+
" 16 [-1, 4] 1 0 models.common.Concat [1] \n",
|
490 |
+
" 17 -1 1 95104 models.common.BottleneckCSP [256, 128, 1, False] \n",
|
491 |
+
" 18 -1 1 32895 torch.nn.modules.conv.Conv2d [128, 255, 1, 1] \n",
|
492 |
+
" 19 -2 1 147712 models.common.Conv [128, 128, 3, 2] \n",
|
493 |
+
" 20 [-1, 14] 1 0 models.common.Concat [1] \n",
|
494 |
+
" 21 -1 1 313088 models.common.BottleneckCSP [256, 256, 1, False] \n",
|
495 |
+
" 22 -1 1 65535 torch.nn.modules.conv.Conv2d [256, 255, 1, 1] \n",
|
496 |
+
" 23 -2 1 590336 models.common.Conv [256, 256, 3, 2] \n",
|
497 |
+
" 24 [-1, 10] 1 0 models.common.Concat [1] \n",
|
498 |
+
" 25 -1 1 1248768 models.common.BottleneckCSP [512, 512, 1, False] \n",
|
499 |
+
" 26 -1 1 130815 torch.nn.modules.conv.Conv2d [512, 255, 1, 1] \n",
|
500 |
+
" 27 [-1, 22, 18] 1 0 models.yolo.Detect [80, [[116, 90, 156, 198, 373, 326], [30, 61, 62, 45, 59, 119], [10, 13, 16, 30, 33, 23]]]\n",
|
501 |
+
"Model Summary: 191 layers, 7.46816e+06 parameters, 7.46816e+06 gradients\n",
|
502 |
+
"\n",
|
503 |
+
"Optimizer groups: 62 .bias, 70 conv.weight, 59 other\n",
|
504 |
+
"/usr/local/lib/python3.6/dist-packages/torch/optim/lr_scheduler.py:123: UserWarning: Detected call of `lr_scheduler.step()` before `optimizer.step()`. In PyTorch 1.1.0 and later, you should call them in the opposite order: `optimizer.step()` before `lr_scheduler.step()`. Failure to do this will result in PyTorch skipping the first value of the learning rate schedule. See more details at https://pytorch.org/docs/stable/optim.html#how-to-adjust-learning-rate\n",
|
505 |
+
" \"https://pytorch.org/docs/stable/optim.html#how-to-adjust-learning-rate\", UserWarning)\n",
|
506 |
+
"Caching labels ../coco128/labels/train2017 (126 found, 0 missing, 2 empty, 0 duplicate, for 128 images): 100% 128/128 [00:00<00:00, 6058.81it/s]\n",
|
507 |
+
"Caching images (0.0GB): 100% 128/128 [00:00<00:00, 137.69it/s]\n",
|
508 |
+
"Caching labels ../coco128/labels/train2017 (126 found, 0 missing, 2 empty, 0 duplicate, for 128 images): 100% 128/128 [00:00<00:00, 6385.39it/s]\n",
|
509 |
+
"Caching images (0.0GB): 100% 128/128 [00:01<00:00, 125.02it/s]\n",
|
510 |
+
"\n",
|
511 |
+
"Analyzing anchors... Best Possible Recall (BPR) = 0.9828. Attempting to generate improved anchors, please wait...\n",
|
512 |
+
"WARNING: Extremely small objects found. 35 of 929 labels are < 3 pixels in width or height.\n",
|
513 |
+
"Running kmeans for 9 anchors on 927 points...\n",
|
514 |
+
"thr=0.25: 0.9720 best possible recall, 3.73 anchors past thr\n",
|
515 |
+
"n=9, img_size=320, metric_all=0.260/0.653-mean/best, past_thr=0.471-mean: 9,12, 32,20, 27,49, 74,43, 54,92, 77,164, 160,109, 182,240, 302,188\n",
|
516 |
+
"Evolving anchors with Genetic Algorithm: fitness = 0.6628: 100% 1000/1000 [00:00<00:00, 1213.98it/s]\n",
|
517 |
+
"thr=0.25: 0.9860 best possible recall, 3.83 anchors past thr\n",
|
518 |
+
"n=9, img_size=320, metric_all=0.265/0.664-mean/best, past_thr=0.471-mean: 8,10, 22,12, 19,34, 46,35, 54,74, 57,139, 144,110, 175,217, 317,206\n",
|
519 |
+
"Original anchors better than new anchors. Proceeding with original anchors.\n",
|
520 |
+
"\n",
|
521 |
+
"Image sizes 320 train, 320 test\n",
|
522 |
+
"Using 2 dataloader workers\n",
|
523 |
+
"Starting training for 5 epochs...\n",
|
524 |
+
"\n",
|
525 |
+
" Epoch gpu_mem GIoU obj cls total targets img_size\n",
|
526 |
+
" 3/4 2.69G 0.1136 0.07635 0.03795 0.2279 438 320: 100% 4/4 [00:05<00:00, 1.26s/it]\n",
|
527 |
+
" Class Images Targets P R [email protected] [email protected]:.95: 100% 4/4 [00:08<00:00, 2.13s/it]\n",
|
528 |
+
" all 128 929 0.13 0.644 0.463 0.246\n",
|
529 |
+
"\n",
|
530 |
+
" Epoch gpu_mem GIoU obj cls total targets img_size\n",
|
531 |
+
" 4/4 2.65G 0.1098 0.07842 0.03901 0.2273 406 320: 100% 4/4 [00:02<00:00, 1.80it/s]\n",
|
532 |
+
" Class Images Targets P R [email protected] [email protected]:.95: 100% 4/4 [00:04<00:00, 1.02s/it]\n",
|
533 |
+
" all 128 929 0.132 0.634 0.478 0.247\n",
|
534 |
+
"Optimizer stripped from runs/Jul07_16-18-01_7d20d25984catutorial/weights/last_tutorial.pt\n",
|
535 |
+
"Optimizer stripped from runs/Jul07_16-18-01_7d20d25984catutorial/weights/best_tutorial.pt\n",
|
536 |
+
"2 epochs completed in 0.006 hours.\n",
|
537 |
+
"\n"
|
538 |
+
],
|
539 |
+
"name": "stdout"
|
540 |
+
}
|
541 |
+
]
|
542 |
+
}
|
543 |
+
]
|
544 |
+
}
|