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

differences between dll and exe detection (detect vs network_predict) #6036

Open tomerBarkai opened 4 years ago

tomerBarkai commented 4 years ago

Hi @AlexeyAB ,

We use cpp on windows.

We trained the network on our own data and it works great with the test line ("darknet.exe detector. test .." , but when using the dll we get bad predictions (the network detects "garbage" boxes randomly - i.e. false positives and almost none true positives) due to the different detect functions.

We used the same pictures on the same cfg files and same threshold.

here are two examples: detection using the network_predict (cmd line): WhatsApp Image 2020-06-15 at 13 39 14

detection using the dll detect function: WhatsApp Image 2020-06-15 at 13 39 13

while training we achieved 93% map so we believe it works great.

Is there any way to use the network_predict function in the dll instead of the detector.detect function?

Many thanks for your work! you made using a NN a very easy and intuitive task.

ShaneHsieh commented 4 years ago

What do you use command when you detect using the network_predict?

I remember that detector thread default is 0.25 so detection using the network_predict is not any bound box. But detection using the dll detect function thread default is 0.20.

tomerBarkai commented 4 years ago

i use the same threshold (0.25 for both).

we even get false positive with prob values of 0.3-0.4 so it is not about threshold i think.

we use "network_predict" to test the network on our data, and "detect" in real-time uses on our system.

we need to change the detection function in the dll from: detect, to: network_predict,

by the way we use gtx2080ti.