AlexeyAB / darknet

YOLOv4 / Scaled-YOLOv4 / YOLO - Neural Networks for Object Detection (Windows and Linux version of Darknet )
http://pjreddie.com/darknet/
Other
21.66k stars 7.96k forks source link

Couldn't find activation function mish, going with ReLU #6071

Open francismontalbo opened 4 years ago

francismontalbo commented 4 years ago

Couldn't find activation function mish, going with ReLU

I've been getting this error whenever I try to run the new YoloV4

yassinesefrioui commented 4 years ago

i have the some error

francismontalbo commented 4 years ago

It works with yolov4-tiny I managed to train my own dataset. It only uses LeakyReLU

However, I'm having problem with the 'mish' activation.

imaami commented 4 years ago

I have a patch for this in a branch but I haven't made a pull request, I'll try to do that today.

francismontalbo commented 4 years ago

Hoping for an update on this soon. Thank you, guys!

imaami commented 4 years ago

A quick heads-up: I didn't have enough oomph left last night after a hot day and household chores to make the pull request happen. I'll do it in a couple hours as soon as I get another cup of coffee going and the air conditioning set up...

Edit: Still didn't have time, bah...

francismontalbo commented 4 years ago

Hello, was this fixed? Is mish now working? Thank you!

francismontalbo commented 4 years ago

Still getting the same error

"Couldn't find activation function mish, going with ReLU"

imaami commented 4 years ago

Still getting the same error

"Couldn't find activation function mish, going with ReLU"

No, sorry, I haven't had time for it yet. I'll let you know ASAP.

francismontalbo commented 4 years ago

Thank you my friend. Be safe.

imaami commented 4 years ago

@francismontalbo You know what, I don't know why you're seeing that error. I thought one of my bugfix branches deals with what you described, but I misremembered. The current unmodified master branch should be able to parse "activation=mish" in cfg files just fine.

I ran YOLOv4 inference on my computer, both with GPU enabled and without it, and I don't see the error at all. And looking at the source code I don't see any reason why it shouldn't work, either. The function get_activation() in src/activations.c - the only place that prints the error message you're getting - has recognized the word "mish" since commit bf8ea4183 in November 2019.

So either you're accidentally running an old build, or there's a bug in the parsing code that I'm not hitting, or maybe you have some local changes in the cfg file.

Can you please triple-check everything and give details about where you got the binary, any possible local changes you have, etc.

imaami commented 4 years ago

Thank you my friend. Be safe.

You too, thank you for the kind words!

francismontalbo commented 4 years ago

Thank you for the quick response my good friend. This helps me a lot. Btw is there a way for me to download an updated build of the darknet.exe? I previously used the one I found before, which works perfectly with yolov4-tiny but not with yolov4 due to the mish function. Would be helpful if I could find an updated build just like before. Thank you!

francismontalbo commented 4 years ago

Sorry for bothering.

imaami commented 4 years ago

Thank you for the quick response my good friend. This helps me a lot. Btw is there a way for me to download an updated build of the darknet.exe? I previously used the one I found before, which works perfectly with yolov4-tiny but not with yolov4 due to the mish function. Would be helpful if I could find an updated build just like before. Thank you!

I'm building a bugfix branch right now, I assume you're on Windows? I'll post a download link as soon as I can.

imaami commented 4 years ago

@francismontalbo Try this: https://github.com/imaami/darknet/suites/859871252/artifacts/9898103

Maioy97 commented 3 years ago

I got the same error in the now latest version of darknet, I pulled it on April 28th

any updates ?