meituan / YOLOv6

YOLOv6: a single-stage object detection framework dedicated to industrial applications.
GNU General Public License v3.0
5.72k stars 1.03k forks source link

yolov6的训练速度是不是比yolov5慢 #123

Closed yutao007 closed 2 years ago

yutao007 commented 2 years ago

我这边同样的数据集在yolov5下10多分钟一个epoch,但是在yolov6下目前跑出来的半小时多了一个epoch Epoch iou_loss l1_loss obj_loss cls_loss 1/399 2.364 1.948 4.324 1.474: 100%|██████████| 69/69 [14:52<00:00, 12.94s/it]

 Epoch  iou_loss   l1_loss  obj_loss  cls_loss
 2/399     2.303     1.705     3.515     1.266: 100%|██████████| 69/69 [20:52<00:00, 18.16s/it]                                                                                                      

 Epoch  iou_loss   l1_loss  obj_loss  cls_loss
 3/399     2.203     1.554     3.033     1.135: 100%|██████████| 69/69 [28:38<00:00, 24.91s/it]                                                                                                      

 Epoch  iou_loss   l1_loss  obj_loss  cls_loss
 4/399     2.104     1.429     2.662     1.045: 100%|██████████| 69/69 [32:17<00:00, 28.07s/it]                                                                                                      

 Epoch  iou_loss   l1_loss  obj_loss  cls_loss
 5/399     1.994      1.32     2.369    0.9772: 100%|██████████| 69/69 [29:53<00:00, 25.99s/it]                                                                                                      

 Epoch  iou_loss   l1_loss  obj_loss  cls_loss
 6/399     1.908     1.231     2.107    0.9201: 100%|██████████| 69/69 [33:16<00:00, 28.94s/it]                                                                                                      

 Epoch  iou_loss   l1_loss  obj_loss  cls_loss
 7/399     1.835     1.157     1.884     0.874: 100%|██████████| 69/69 [37:14<00:00, 32.38s/it]                                                                                                      

 Epoch  iou_loss   l1_loss  obj_loss  cls_loss
 8/399     1.765     1.089     1.717    0.8379: 100%|██████████| 69/69 [35:40<00:00, 31.03s/it]                                                                                                      

 Epoch  iou_loss   l1_loss  obj_loss  cls_loss
 9/399     1.691     1.027     1.541    0.8007: 100%|██████████| 69/69 [31:12<00:00, 27.13s/it]                                                                                                      

 Epoch  iou_loss   l1_loss  obj_loss  cls_loss
10/399     1.627    0.9711     1.389    0.7675: 100%|██████████| 69/69 [28:42<00:00, 24.96s/it]                                                                                                      

 Epoch  iou_loss   l1_loss  obj_loss  cls_loss
11/399      1.56    0.9192     1.273    0.7382: 100%|██████████| 69/69 [45:51<00:00, 39.87s/it]                                                                                                      

 Epoch  iou_loss   l1_loss  obj_loss  cls_loss
12/399     1.498    0.8759     1.165    0.7129: 100%|██████████| 69/69 [54:24<00:00, 47.31s/it]                                                                                                      

 Epoch  iou_loss   l1_loss  obj_loss  cls_loss
13/399     1.428    0.8296     1.057     0.687: 100%|██████████| 69/69 [50:13<00:00, 43.68s/it]                                                                                                      

 Epoch  iou_loss   l1_loss  obj_loss  cls_loss
14/399     1.377    0.7918    0.9788    0.6679: 100%|██████████| 69/69 [52:35<00:00, 45.73s/it]                                                                                                      

 Epoch  iou_loss   l1_loss  obj_loss  cls_loss
15/399     1.313    0.7504    0.8997     0.643: 100%|██████████| 69/69 [47:14<00:00, 41.09s/it]                                                                                                      

 Epoch  iou_loss   l1_loss  obj_loss  cls_loss
16/399     1.277    0.7215    0.8577    0.6288: 100%|██████████| 69/69 [46:38<00:00, 40.56s/it]                                                                                                      

 Epoch  iou_loss   l1_loss  obj_loss  cls_loss
17/399      1.23    0.6928    0.8084    0.6083: 100%|██████████| 69/69 [38:03<00:00, 33.09s/it]                                                                                                      

 Epoch  iou_loss   l1_loss  obj_loss  cls_loss
18/399     1.206    0.6734    0.7813    0.5994: 100%|██████████| 69/69 [46:41<00:00, 40.60s/it]                                                                                                      

 Epoch  iou_loss   l1_loss  obj_loss  cls_loss
19/399     1.173    0.6516    0.7541    0.5866: 100%|██████████| 69/69 [38:04<00:00, 33.11s/it]                                                                                                      

 Epoch  iou_loss   l1_loss  obj_loss  cls_loss
20/399      1.15    0.6359    0.7231    0.5761: 100%|██████████| 69/69 [39:58<00:00, 34.76s/it] 
Zephyr69 commented 2 years ago

Differences in model scaling could be part of the reason. Like, v6s has significantly higher flops than v5s.

yutao007 commented 2 years ago

目前yolov6s(其中的尺寸512,激活函数全部relu)训练到160epoth时候训练时间下降到20分钟左右,确实会比同尺寸yolov5s训练时间长一些。 Epoch iou_loss l1_loss obj_loss cls_loss 151/399 0.7007 0.3427 0.3506 0.3874: 100%|██████████| 69/69 [18:14<00:00, 15.86s/it]

 Epoch  iou_loss   l1_loss  obj_loss  cls_loss

152/399 0.7041 0.3417 0.3491 0.3877: 100%|██████████| 69/69 [18:04<00:00, 15.71s/it]

 Epoch  iou_loss   l1_loss  obj_loss  cls_loss

153/399 0.6964 0.3385 0.3442 0.3848: 100%|██████████| 69/69 [21:04<00:00, 18.33s/it]

 Epoch  iou_loss   l1_loss  obj_loss  cls_loss

154/399 0.696 0.3402 0.3445 0.3845: 100%|██████████| 69/69 [18:22<00:00, 15.98s/it]

 Epoch  iou_loss   l1_loss  obj_loss  cls_loss

155/399 0.6904 0.3372 0.346 0.383: 100%|██████████| 69/69 [18:04<00:00, 15.71s/it]

 Epoch  iou_loss   l1_loss  obj_loss  cls_loss

156/399 0.6948 0.3353 0.3413 0.3842: 65%|██████▌ | 45/69 [10:55<05:11, 12.98s/it]

starsky68 commented 2 years ago

我这边也是同样的问题,请问有优化方案吗