9
9
" <div align=\" center\" >\n " ,
10
10
" \n " ,
11
11
" <a href=\" https://ultralytics.com/yolov5\" target=\" _blank\" >\n " ,
12
- " <img width=\" 1024\" , src=\" https://github. com/ultralytics/assets/raw/ master/yolov5/v62/splash_readme .png\" ></a>\n " ,
12
+ " <img width=\" 1024\" , src=\" https://raw.githubusercontent. com/ultralytics/assets/master/yolov5/v70/splash .png\" ></a>\n " ,
13
13
" \n " ,
14
14
" \n " ,
15
15
" <br>\n " ,
36
36
},
37
37
{
38
38
"cell_type" : " code" ,
39
- "execution_count" : 1 ,
39
+ "execution_count" : null ,
40
40
"metadata" : {
41
41
"colab" : {
42
42
"base_uri" : " https://localhost:8080/"
43
43
},
44
44
"id" : " wbvMlHd_QwMG" ,
45
- "outputId" : " 43b2e1b5-78d9-4e1d-8530-ee9779bba160 "
45
+ "outputId" : " 0806e375-610d-4ec0-c867-763dbb518279 "
46
46
},
47
47
"outputs" : [
48
48
{
49
49
"output_type" : " stream" ,
50
50
"name" : " stderr" ,
51
51
"text" : [
52
- " YOLOv5 🚀 v6.2-258-g7fc7ed7 Python-3.7.15 torch-1.12.1+cu113 CUDA:0 (Tesla T4, 15110MiB)\n "
52
+ " YOLOv5 🚀 v7.0-3-g61ebf5e Python-3.7.15 torch-1.12.1+cu113 CUDA:0 (Tesla T4, 15110MiB)\n "
53
53
]
54
54
},
55
55
{
94
94
},
95
95
{
96
96
"cell_type" : " code" ,
97
- "execution_count" : 2 ,
97
+ "execution_count" : null ,
98
98
"metadata" : {
99
99
"colab" : {
100
100
"base_uri" : " https://localhost:8080/"
101
101
},
102
102
"id" : " zR9ZbuQCH7FX" ,
103
- "outputId" : " 1b610787-7cf7-4c33-aac2-aa50fbb84a94 "
103
+ "outputId" : " 50504ef7-aa3e-4281-a4e3-d0c7df3c0ffe "
104
104
},
105
105
"outputs" : [
106
106
{
107
107
"output_type" : " stream" ,
108
108
"name" : " stdout" ,
109
109
"text" : [
110
- " \u001b [34m\u001b [1mclassify/predict: \u001b [0mweights=['yolov5s-cls.pt'], source=data/images, data=data/coco128.yaml, imgsz=[224, 224], device=, view_img=False, save_txt=True , nosave=False, augment=False, visualize=False, update=False, project=runs/predict-cls, name=exp, exist_ok=False, half=False, dnn=False, vid_stride=1\n " ,
111
- " YOLOv5 🚀 v6.2-258-g7fc7ed7 Python-3.7.15 torch-1.12.1+cu113 CUDA:0 (Tesla T4, 15110MiB)\n " ,
110
+ " \u001b [34m\u001b [1mclassify/predict: \u001b [0mweights=['yolov5s-cls.pt'], source=data/images, data=data/coco128.yaml, imgsz=[224, 224], device=, view_img=False, save_txt=False , nosave=False, augment=False, visualize=False, update=False, project=runs/predict-cls, name=exp, exist_ok=False, half=False, dnn=False, vid_stride=1\n " ,
111
+ " YOLOv5 🚀 v7.0-3-g61ebf5e Python-3.7.15 torch-1.12.1+cu113 CUDA:0 (Tesla T4, 15110MiB)\n " ,
112
112
" \n " ,
113
- " Downloading https://github.com/ultralytics/yolov5/releases/download/v6.2 /yolov5s-cls.pt to yolov5s-cls.pt...\n " ,
114
- " 100% 10.5M/10.5M [00:03 <00:00, 2.94MB /s]\n " ,
113
+ " Downloading https://github.com/ultralytics/yolov5/releases/download/v7.0 /yolov5s-cls.pt to yolov5s-cls.pt...\n " ,
114
+ " 100% 10.5M/10.5M [00:00 <00:00, 12.3MB /s]\n " ,
115
115
" \n " ,
116
116
" Fusing layers... \n " ,
117
117
" Model summary: 117 layers, 5447688 parameters, 0 gradients, 11.4 GFLOPs\n " ,
118
118
" image 1/2 /content/yolov5/data/images/bus.jpg: 224x224 minibus 0.39, police van 0.24, amphibious vehicle 0.05, recreational vehicle 0.04, trolleybus 0.03, 3.9ms\n " ,
119
- " image 2/2 /content/yolov5/data/images/zidane.jpg: 224x224 suit 0.38, bow tie 0.19, bridegroom 0.18, rugby ball 0.04, stage 0.02, 4.1ms \n " ,
120
- " Speed: 0.3ms pre-process, 4.0ms inference, 1.5ms NMS per image at shape (1, 3, 224, 224)\n " ,
119
+ " image 2/2 /content/yolov5/data/images/zidane.jpg: 224x224 suit 0.38, bow tie 0.19, bridegroom 0.18, rugby ball 0.04, stage 0.02, 4.6ms \n " ,
120
+ " Speed: 0.3ms pre-process, 4.3ms inference, 1.5ms NMS per image at shape (1, 3, 224, 224)\n " ,
121
121
" Results saved to \u001b [1mruns/predict-cls/exp\u001b [0m\n "
122
122
]
123
123
}
149
149
},
150
150
{
151
151
"cell_type" : " code" ,
152
- "execution_count" : 3 ,
152
+ "execution_count" : null ,
153
153
"metadata" : {
154
154
"colab" : {
155
155
"base_uri" : " https://localhost:8080/"
156
156
},
157
157
"id" : " WQPtK1QYVaD_" ,
158
- "outputId" : " 92de5f34-cf41-49e7-b679-41db94e995ac "
158
+ "outputId" : " 20fc0630-141e-4a90-ea06-342cbd7ce496 "
159
159
},
160
160
"outputs" : [
161
161
{
162
162
"output_type" : " stream" ,
163
163
"name" : " stdout" ,
164
164
"text" : [
165
- " --2022-11-18 21:48:38 -- https://image-net.org/data/ILSVRC/2012/ILSVRC2012_img_val.tar\n " ,
165
+ " --2022-11-22 19:53:40 -- https://image-net.org/data/ILSVRC/2012/ILSVRC2012_img_val.tar\n " ,
166
166
" Resolving image-net.org (image-net.org)... 171.64.68.16\n " ,
167
167
" Connecting to image-net.org (image-net.org)|171.64.68.16|:443... connected.\n " ,
168
168
" HTTP request sent, awaiting response... 200 OK\n " ,
169
169
" Length: 6744924160 (6.3G) [application/x-tar]\n " ,
170
170
" Saving to: ‘ILSVRC2012_img_val.tar’\n " ,
171
171
" \n " ,
172
- " ILSVRC2012_img_val. 100%[===================>] 6.28G 7.15MB /s in 11m 13s \n " ,
172
+ " ILSVRC2012_img_val. 100%[===================>] 6.28G 16.1MB /s in 10m 52s \n " ,
173
173
" \n " ,
174
- " 2022-11-18 21:59:52 (9.55 MB/s) - ‘ILSVRC2012_img_val.tar’ saved [6744924160/6744924160]\n " ,
174
+ " 2022-11-22 20:04:32 (9.87 MB/s) - ‘ILSVRC2012_img_val.tar’ saved [6744924160/6744924160]\n " ,
175
175
" \n "
176
176
]
177
177
}
183
183
},
184
184
{
185
185
"cell_type" : " code" ,
186
- "execution_count" : 4 ,
186
+ "execution_count" : null ,
187
187
"metadata" : {
188
188
"colab" : {
189
189
"base_uri" : " https://localhost:8080/"
190
190
},
191
191
"id" : " X58w8JLpMnjH" ,
192
- "outputId" : " 9961ad87-d639-4489-b578-0a0578fefaab "
192
+ "outputId" : " 41843132-98e2-4c25-d474-4cd7b246fb8e "
193
193
},
194
194
"outputs" : [
195
195
{
196
196
"output_type" : " stream" ,
197
197
"name" : " stdout" ,
198
198
"text" : [
199
199
" \u001b [34m\u001b [1mclassify/val: \u001b [0mdata=../datasets/imagenet, weights=['yolov5s-cls.pt'], batch_size=128, imgsz=224, device=, workers=8, verbose=True, project=runs/val-cls, name=exp, exist_ok=False, half=True, dnn=False\n " ,
200
- " YOLOv5 🚀 v6.2-258-g7fc7ed7 Python-3.7.15 torch-1.12.1+cu113 CUDA:0 (Tesla T4, 15110MiB)\n " ,
200
+ " YOLOv5 🚀 v7.0-3-g61ebf5e Python-3.7.15 torch-1.12.1+cu113 CUDA:0 (Tesla T4, 15110MiB)\n " ,
201
201
" \n " ,
202
202
" Fusing layers... \n " ,
203
203
" Model summary: 117 layers, 5447688 parameters, 0 gradients, 11.4 GFLOPs\n " ,
204
- " validating: 100% 391/391 [04:48 <00:00, 1.35it /s]\n " ,
204
+ " validating: 100% 391/391 [04:57 <00:00, 1.31it /s]\n " ,
205
205
" Class Images top1_acc top5_acc\n " ,
206
206
" all 50000 0.715 0.902\n " ,
207
207
" tench 50 0.94 0.98\n " ,
1269
1269
},
1270
1270
{
1271
1271
"cell_type" : " code" ,
1272
- "execution_count" : 5 ,
1272
+ "execution_count" : null ,
1273
1273
"metadata" : {
1274
1274
"colab" : {
1275
1275
"base_uri" : " https://localhost:8080/"
1276
1276
},
1277
1277
"id" : " 1NcFxRcFdJ_O" ,
1278
- "outputId" : " 638c55b1-dc45-4eee-cabc-4921dc61faf5 "
1278
+ "outputId" : " 77c8d487-16db-4073-b3ea-06cabf2e7766 "
1279
1279
},
1280
1280
"outputs" : [
1281
1281
{
1282
1282
"output_type" : " stream" ,
1283
1283
"name" : " stdout" ,
1284
1284
"text" : [
1285
- " \u001b [34m\u001b [1mclassify/train: \u001b [0mmodel=yolov5s-cls.pt, data=imagenette160, epochs=3 , batch_size=16 , imgsz=224, nosave=False, cache=ram, device=, workers=8, project=runs/train-cls, name=exp, exist_ok=False, pretrained=True, optimizer=Adam, lr0=0.001, decay=5e-05, label_smoothing=0.1, cutoff=None, dropout=None, verbose=False, seed=0, local_rank=-1\n " ,
1285
+ " \u001b [34m\u001b [1mclassify/train: \u001b [0mmodel=yolov5s-cls.pt, data=imagenette160, epochs=5 , batch_size=64 , imgsz=224, nosave=False, cache=ram, device=, workers=8, project=runs/train-cls, name=exp, exist_ok=False, pretrained=True, optimizer=Adam, lr0=0.001, decay=5e-05, label_smoothing=0.1, cutoff=None, dropout=None, verbose=False, seed=0, local_rank=-1\n " ,
1286
1286
" \u001b [34m\u001b [1mgithub: \u001b [0mup to date with https://github.com/ultralytics/yolov5 ✅\n " ,
1287
- " YOLOv5 🚀 v6.2-258-g7fc7ed7 Python-3.7.15 torch-1.12.1+cu113 CUDA:0 (Tesla T4, 15110MiB)\n " ,
1287
+ " YOLOv5 🚀 v7.0-3-g61ebf5e Python-3.7.15 torch-1.12.1+cu113 CUDA:0 (Tesla T4, 15110MiB)\n " ,
1288
1288
" \n " ,
1289
1289
" \u001b [34m\u001b [1mTensorBoard: \u001b [0mStart with 'tensorboard --logdir runs/train-cls', view at http://localhost:6006/\n " ,
1290
1290
" \n " ,
1291
1291
" Dataset not found ⚠️, missing path /content/datasets/imagenette160, attempting download...\n " ,
1292
1292
" Downloading https://github.com/ultralytics/yolov5/releases/download/v1.0/imagenette160.zip to /content/datasets/imagenette160.zip...\n " ,
1293
- " 100% 103M/103M [00:09 <00:00, 11.1MB /s]\n " ,
1293
+ " 100% 103M/103M [00:00 <00:00, 347MB /s] \n " ,
1294
1294
" Unzipping /content/datasets/imagenette160.zip...\n " ,
1295
- " Dataset download success ✅ (13.2s ), saved to \u001b [1m/content/datasets/imagenette160\u001b [0m\n " ,
1295
+ " Dataset download success ✅ (3.3s ), saved to \u001b [1m/content/datasets/imagenette160\u001b [0m\n " ,
1296
1296
" \n " ,
1297
1297
" \u001b [34m\u001b [1malbumentations: \u001b [0mRandomResizedCrop(p=1.0, height=224, width=224, scale=(0.08, 1.0), ratio=(0.75, 1.3333333333333333), interpolation=1), HorizontalFlip(p=0.5), ColorJitter(p=0.5, brightness=[0.6, 1.4], contrast=[0.6, 1.4], saturation=[0.6, 1.4], hue=[0, 0]), Normalize(p=1.0, mean=(0.485, 0.456, 0.406), std=(0.229, 0.224, 0.225), max_pixel_value=255.0), ToTensorV2(always_apply=True, p=1.0, transpose_mask=False)\n " ,
1298
1298
" Model summary: 149 layers, 4185290 parameters, 4185290 gradients, 10.5 GFLOPs\n " ,
1299
1299
" \u001b [34m\u001b [1moptimizer:\u001b [0m Adam(lr=0.001) with parameter groups 32 weight(decay=0.0), 33 weight(decay=5e-05), 33 bias\n " ,
1300
1300
" Image sizes 224 train, 224 test\n " ,
1301
1301
" Using 1 dataloader workers\n " ,
1302
1302
" Logging results to \u001b [1mruns/train-cls/exp\u001b [0m\n " ,
1303
- " Starting yolov5s-cls.pt training on imagenette160 dataset with 10 classes for 3 epochs...\n " ,
1303
+ " Starting yolov5s-cls.pt training on imagenette160 dataset with 10 classes for 5 epochs...\n " ,
1304
1304
" \n " ,
1305
1305
" Epoch GPU_mem train_loss val_loss top1_acc top5_acc\n " ,
1306
- " 1/3 0.348G 1.31 1.09 0.794 0.979: 100% 592/592 [01:02<00:00, 9.47it/s]\n " ,
1307
- " 2/3 0.415G 1.09 0.852 0.883 0.99: 100% 592/592 [00:59<00:00, 10.00it/s]\n " ,
1308
- " 3/3 0.415G 0.954 0.776 0.907 0.994: 100% 592/592 [00:59<00:00, 9.89it/s]\n " ,
1306
+ " 1/5 1.47G 1.05 0.974 0.828 0.975: 100% 148/148 [00:38<00:00, 3.82it/s]\n " ,
1307
+ " 2/5 1.73G 0.895 0.766 0.911 0.994: 100% 148/148 [00:36<00:00, 4.03it/s]\n " ,
1308
+ " 3/5 1.73G 0.82 0.704 0.934 0.996: 100% 148/148 [00:35<00:00, 4.20it/s]\n " ,
1309
+ " 4/5 1.73G 0.766 0.664 0.951 0.998: 100% 148/148 [00:36<00:00, 4.05it/s]\n " ,
1310
+ " 5/5 1.73G 0.724 0.634 0.959 0.997: 100% 148/148 [00:37<00:00, 3.94it/s]\n " ,
1309
1311
" \n " ,
1310
- " Training complete (0.051 hours)\n " ,
1312
+ " Training complete (0.052 hours)\n " ,
1311
1313
" Results saved to \u001b [1mruns/train-cls/exp\u001b [0m\n " ,
1312
1314
" Predict: python classify/predict.py --weights runs/train-cls/exp/weights/best.pt --source im.jpg\n " ,
1313
1315
" Validate: python classify/val.py --weights runs/train-cls/exp/weights/best.pt --data /content/datasets/imagenette160\n " ,
1320
1322
],
1321
1323
"source" : [
1322
1324
" # Train YOLOv5s Classification on Imagenette160 for 3 epochs\n " ,
1323
- " !python classify/train.py --img 224 --batch 16 --epochs 3 --data imagenette160 --model yolov5s-cls.pt --cache"
1325
+ " !python classify/train.py --model yolov5s-cls.pt --data imagenette160 --epochs 5 --img 224 --cache"
1324
1326
]
1325
1327
},
1326
1328
{
1339
1341
},
1340
1342
"source" : [
1341
1343
" ## Comet Logging and Visualization 🌟 NEW\n " ,
1342
- " [Comet](https://bit.ly/yolov5-readme-comet) is now fully integrated with YOLOv5. Track and visualize model metrics in real time, save your hyperparameters, datasets, and model checkpoints, and visualize your model predictions with [Comet Custom Panels](https://bit.ly/yolov5-colab-comet-panels)! Comet makes sure you never lose track of your work and makes it easy to share results and collaborate across teams of all sizes! \n " ,
1344
+ " \n " ,
1345
+ " [Comet](https://www.comet.com/site/lp/yolov5-with-comet/?utm_source=yolov5&utm_medium=partner&utm_campaign=partner_yolov5_2022&utm_content=yolov5_colab) is now fully integrated with YOLOv5. Track and visualize model metrics in real time, save your hyperparameters, datasets, and model checkpoints, and visualize your model predictions with [Comet Custom Panels](https://www.comet.com/docs/v2/guides/comet-dashboard/code-panels/about-panels/?utm_source=yolov5&utm_medium=partner&utm_campaign=partner_yolov5_2022&utm_content=yolov5_colab)! Comet makes sure you never lose track of your work and makes it easy to share results and collaborate across teams of all sizes!\n " ,
1343
1346
" \n " ,
1344
1347
" Getting started is easy:\n " ,
1345
1348
" ```shell\n " ,
1346
1349
" pip install comet_ml # 1. install\n " ,
1347
1350
" export COMET_API_KEY=<Your API Key> # 2. paste API key\n " ,
1348
1351
" python train.py --img 640 --epochs 3 --data coco128.yaml --weights yolov5s.pt # 3. train\n " ,
1349
1352
" ```\n " ,
1350
- " \n " ,
1351
- " To learn more about all of the supported Comet features for this integration, check out the [Comet Tutorial](https://github.com/ultralytics/yolov5/tree/master/utils/loggers/comet). If you'd like to learn more about Comet, head over to our [documentation](https://bit.ly/yolov5-colab-comet-docs). Get started by trying out the Comet Colab Notebook:\n " ,
1353
+ " To learn more about all of the supported Comet features for this integration, check out the [Comet Tutorial](https://github.com/ultralytics/yolov5/tree/master/utils/loggers/comet). If you'd like to learn more about Comet, head over to our [documentation](https://www.comet.com/docs/v2/?utm_source=yolov5&utm_medium=partner&utm_campaign=partner_yolov5_2022&utm_content=yolov5_colab). Get started by trying out the Comet Colab Notebook:\n " ,
1352
1354
" [](https://colab.research.google.com/drive/1RG0WOQyxlDlo5Km8GogJpIEJlg_5lyYO?usp=sharing)\n " ,
1353
1355
" \n " ,
1354
- " <img width=\" 1920\" alt=\" yolo-ui\" src=\" https://user-images.githubusercontent.com/26833433/202851203-164e94e1-2238-46dd-91f8-de020e9d6b41.png\" >"
1356
+ " <a href=\" https://bit.ly/yolov5-readme-comet2\" >\n " ,
1357
+ " <img alt=\" Comet Dashboard\" src=\" https://user-images.githubusercontent.com/26833433/202851203-164e94e1-2238-46dd-91f8-de020e9d6b41.png\" width=\" 1280\" /></a>"
1355
1358
]
1356
1359
},
1357
1360
{
1474
1477
},
1475
1478
"nbformat" : 4 ,
1476
1479
"nbformat_minor" : 0
1477
- }
1480
+ }
0 commit comments