AlbinZhu/yolov7-polygon-detection

Cannot trainning in multi-gpu

Juddd opened this issue · 3 comments

Juddd commented

If I use two or more GPU to trainning, it will get stuck in this state:

CUDA_VISIBLE_DEVICES=0,1 python train_polygon.py --data data/polygon_dir4.yaml --weights "" --cfg cfg/training/yolov7-tiny-polygon-dir4.yaml --hyp data/hyp.dir4.yaml --img-size 640 --epochs 350 --batch-size 200 --noautoanchor --polygon --adam --workers 16 --device 0,1

image
ps:XinzeLee/PolygonObjectDetection have a same situation

Unfortunately, I haven't solved this problem either. I recommend you to use yolov8-pose as an alternative

Juddd commented

谢谢你的建议,可能有些打扰,但我确实有些困惑,所以还是想最后再请教您一下,我用XinzeLee/PolygonObjectDetection训练的时候效果很不错,精度非常高(99%),这是训练时候的曲线:
image
但麻烦的是cpu上运行需要1.6s才能处理一张图片,所以我才想着用您这个yolov7再训练一次,现在有几个问题想请教您一下:

  • 精度有时候会掉到非常低、甚至为0然后再回升,我头一次遇到这情况,而且metrics/mAP_0.5:0.95最高的时候也只有0.9

  • 比XinzeLee/PolygonObjectDetection慢了很多很多,同一个GPU,XinzeLee的2个钟头能跑300 epoch,但您这个版本好像要跑2~3天

  • 我用的是yolov7-tiny-polygon-dir4.yaml,但断点导出的模型高达70M,原来的只有14M
    但我使用的都是同一个数据集来训练的

我没有做太多的测试,所以无法回答这个问题。理论上只是换了backbone 可能是一些算子的影响。