WongKinYiu / PyTorch_YOLOv4

PyTorch implementation of YOLOv4
1.86k stars 585 forks source link

pretrained csp_darknet #70

Open xiexie123 opened 3 years ago

xiexie123 commented 3 years ago

hi, if I want to train from scratch, set --weights ''.and I check the code, set --weights '' means not use any pretrain models to initialize any part of yolo. As far as i know, to train yolo from scratch always use pretrained csp_darknet in the backbone. am I right? or do I miss something.

zhangkuncsdn commented 3 years ago

hi, 请问你成功安装了mish-cuda嘛?

xiexie123 commented 3 years ago

hi, 请问你成功安装了mish-cuda嘛?

可以。我的是 cuda10 ,torch1.2.0,mish-cuda 0.0.2 (pip -v install git+https://github.com/thomasbrandon/mish-cuda@nasty-hack) 然后utils/utils.py的代码里有的地方改一下(可能还有要改动的,要是运行报错就debug一下,一般都是很小的问题) tbox.append(torch.cat((gxy - gij, gwh), 1)) to tbox.append(torch.cat((gxy - gij.float(), gwh), 1))

zhangkuncsdn commented 3 years ago

hi, 请问你成功安装了mish-cuda嘛?

可以。我的是 cuda10 ,torch1.2.0,mish-cuda 0.0.2 (pip -v install git+https://github.com/thomasbrandon/mish-cuda@nasty-hack) 然后utils/utils.py的代码里有的地方改一下(可能还有要改动的,要是运行报错就debug一下,一般都是很小的问题) tbox.append(torch.cat((gxy - gij, gwh), 1)) to tbox.append(torch.cat((gxy - gij.float(), gwh), 1)) 谢谢 然后你是用的linux系统吗 另外torch1.2.0可以跑作者最新更新后的代码嘛

xiexie123 commented 3 years ago

hi, 请问你成功安装了mish-cuda嘛?

可以。我的是 cuda10 ,torch1.2.0,mish-cuda 0.0.2 (pip -v install git+https://github.com/thomasbrandon/mish-cuda@nasty-hack) 然后utils/utils.py的代码里有的地方改一下(可能还有要改动的,要是运行报错就debug一下,一般都是很小的问题) tbox.append(torch.cat((gxy - gij, gwh), 1)) to tbox.append(torch.cat((gxy - gij.float(), gwh), 1)) 谢谢 然后你是用的linux系统吗 另外torch1.2.0可以跑作者最新更新后的代码嘛

是linux, torch1.2.0可以跑作者最新更新后的代码,但是需要微调一下,就像我上面说的,有一些数据类型报错,但是很容易修复来适应torch版本

zhangkuncsdn commented 3 years ago

hi, 请问你成功安装了mish-cuda嘛?

可以。我的是 cuda10 ,torch1.2.0,mish-cuda 0.0.2 (pip -v install git+https://github.com/thomasbrandon/mish-cuda@nasty-hack) 然后utils/utils.py的代码里有的地方改一下(可能还有要改动的,要是运行报错就debug一下,一般都是很小的问题) tbox.append(torch.cat((gxy - gij, gwh), 1)) to tbox.append(torch.cat((gxy - gij.float(), gwh), 1)) 谢谢 然后你是用的linux系统吗 另外torch1.2.0可以跑作者最新更新后的代码嘛

是linux, torch1.2.0可以跑作者最新更新后的代码,但是需要微调一下,就像我上面说的,有一些数据类型报错,但是很容易修复来适应torch版本

嗯嗯,好的,非常感谢!!!!

WongKinYiu commented 3 years ago

all models in this repo are trained from scratch.

xiexie123 commented 3 years ago

all models in this repo are trained from scratch.

trained from scratch and without pre-trained backbone. Interesting. I will try it. Thanks

sunshine-zkf commented 3 years ago

all models in this repo are trained from scratch.

trained from scratch and without pre-trained backbone. Interesting. I will try it. Thanks

作者的意思是他这个repo从头训练不需要CSPDarknet53的预训练权重是吗。我从头训练 set --weights '',精度比作者低两个点。

xiexie123 commented 3 years ago

all models in this repo are trained from scratch.

trained from scratch and without pre-trained backbone. Interesting. I will try it. Thanks

作者的意思是他这个repo从头训练不需要CSPDarknet53的预训练权重是吗。我从头训练 set --weights '',精度比作者低两个点。

对,作者是从头训练的,但是我训练自己的数据的时候,是预加载的作者的checkpoint。收敛快