WongKinYiu / PyTorch_YOLOv4

PyTorch implementation of YOLOv4
1.88k stars 585 forks source link

Question on Loss function used compare to Darknet #213

Open LeoSouquet opened 3 years ago

LeoSouquet commented 3 years ago

Hi Guys,

Thanks a lot for your amazing work. I have read your paper and you do not mention the loss function used. I would assume you use the same as yolov4.

However when looking into. the. code you use the same loss function as Ultralytics (which your code is based on) which is different from the original yolov4.

As your work has been implemented in AlexeyAB's darknet, I was wondering if the function you use has also been implemented in darknet? And as this function has more hyperparameters, how can they be configured in darknet as well?

Thanks a lot. in advance,

Regards,

Léo

WongKinYiu commented 3 years ago

https://github.com/AlexeyAB/darknet/blob/master/cfg/yolov4-csp.cfg

LeoSouquet commented 3 years ago

Hi @WongKinYiu Thanks for your answer. However, I looked into the files and some parameters are in your implementation and not in this file, i.e. :

So I am wondering if darknet implements the same loss function as you (i.e. the one used unltralytics)

My Issue is that I train both darknet and yours (using yolov3 cfg) and I get radically different results.

Thanks in advance for your reply,

akashAD98 commented 3 years ago

is it possible to change loss function & optimization in custom yolov4-csp ??? in .cfg file I'm not getting where exactly we can change loss