Alturos.Yolo icon indicating copy to clipboard operation
Alturos.Yolo copied to clipboard

Yolov4?

Open BergChristian opened this issue 4 years ago • 10 comments

Hi!

Are there any plans to support yolov4 which just came out?

All the best!

BergChristian avatar May 15 '20 21:05 BergChristian

I would also love to use yolo-V4

tarnow74 avatar May 18 '20 07:05 tarnow74

Good question. Any plans to move to the new tech? V4 seems to be quite an improvement.

asverlov avatar Jul 03 '20 21:07 asverlov

Is there any confirmation if this repo works for Yolo v4 from AlexeyAB?

robotaiguy avatar Oct 12 '20 23:10 robotaiguy

I can say that it did not work for a yolov4-custom.cfg network trained with my yolo-V4 build from https://github.com/AlexeyAB/darknet.git 25.05.2020 Commit hash e6469eb071521a4ff5be8c0e9cceb524d0a65a95: detection takes some time, but nothing is detected. Also on this commit it does not work out of the box to build a new yolo_cpp_dll_cpu.dll and yolo_cpp_dll_gpu.dll, which would be the first step (but not the last) to update this framework. But it looks doable.

AxelWS avatar Oct 14 '20 10:10 AxelWS

I can say that it did not work for a yolov4-custom.cfg network trained with my yolo-V4 build from https://github.com/AlexeyAB/darknet.git 25.05.2020 Commit hash e6469eb071521a4ff5be8c0e9cceb524d0a65a95: detection takes some time, but nothing is detected. Also on this commit it does not work out of the box to build a new yolo_cpp_dll_cpu.dll and yolo_cpp_dll_gpu.dll, which would be the first step (but not the last) to update this framework. But it looks doable.

I was also looking at compile „yolo_cpp_dll_gpu.dll“ from latest darknet build... can you confirm, that this is not working @ the moment? Or should i give it a try?

LueTheShoe avatar Oct 25 '20 23:10 LueTheShoe

Yolo v4 pretrained dataset works for me without problems out of the box! No need to compile yolo_cpp_dll_gpu.dll from darknet

LueTheShoe avatar Oct 27 '20 15:10 LueTheShoe

YOLOv4 is 1x slower than V3 on my test.

https://github.com/AlexeyAB/darknet/issues/6630 https://github.com/AlexeyAB/darknet/issues/6630#issuecomment-691101182

12343954 avatar Nov 11 '20 03:11 12343954

V4 default network size is 608, v3 default network size was 416. If you don't change the network size in the cfg file, that will definitely cause inferencing to require more time.

robotaiguy avatar Nov 11 '20 10:11 robotaiguy

@LueTheShoe Can you share some more details what you did to make it work? Did you see any improvements from v3?

Best Christian

BergChristian avatar Nov 11 '20 10:11 BergChristian

I can say that it did not work for a yolov4-custom.cfg network trained with my yolo-V4 build from https://github.com/AlexeyAB/darknet.git 25.05.2020 Commit hash e6469eb071521a4ff5be8c0e9cceb524d0a65a95: detection takes some time, but nothing is detected. Also on this commit it does not work out of the box to build a new yolo_cpp_dll_cpu.dll and yolo_cpp_dll_gpu.dll, which would be the first step (but not the last) to update this framework. But it looks doable.

@LueTheShoe some networks seem to be backwards compatible and work fine, some don't.

Here are some notes what I did; the darknet patches should be applicable to https://github.com/AlexeyAB/darknet; the Alturos.Yolo changes should be straight forward enough to do manually. There probably are better ways to do it, but it seems to do the trick for me and I hope it helps. Adjust-Alturos.Yolo-wrapper-for-YoloV4.zip

For trouble-shooting it was extremely useful to be able to debug into yolo_cpp_dll_cpu.dll etc, so I suggest to store .pdb files along with the .dll files.

Finally an observation: compiling with CUDA 10.1, cuDNN 8 and OpenCV 4.5.0 resulted in significantly lower performance. Detection was about three times slower on a net of size 256x192. Reverting back to cuDNN 7 DLL solved this.

AxelWS avatar Nov 20 '20 10:11 AxelWS