darknet icon indicating copy to clipboard operation
darknet copied to clipboard

YOL) compiles and runs, but no predictions

Open ramanpreet9 opened this issue 7 years ago • 21 comments

I compiled yolo with GPU, CUDA, and opencv on. It compiles correctly. it runs on the sample images like dog.jpg etc as described in wiki. However, I am not getting any predictions!

My output: Case 1 and 2 (GPU ON, CUDA ON/OFF, opencv on Loading weights from yolo.weights...Done! data/dog.jpg: Predicted in 0.056 seconds.

and it hangs here

case 3: GPU ON, CUDA, OPENCV OFF data/dog.jpg: Predicted in 0.17 seconds. Not compiled with OpenCV, saving to predictions.png instead

but the predictions have no BB.

One thing i noticed was that the link for yolo weights is ~200MB but the wiki page says its 1 GB.

ramanpreet9 avatar Feb 22 '18 13:02 ramanpreet9

I am having exactly the same problem and also the same observation about the file size.

Were you able to solve this problem meanwhile?

konbick avatar Mar 19 '18 08:03 konbick

The yolo wights have an issue as i mentioned in my post. If you use the small or tiny weights, it works fine. but, until the author responds, you cannot use the full weights.

ramanpreet9 avatar Mar 19 '18 08:03 ramanpreet9

Man, thanks a lot for your post! You saved me a lot of headache!

konbick avatar Mar 19 '18 08:03 konbick

Oh, no. It doesn't work for me even with the tiny weights...

konbick avatar Mar 19 '18 08:03 konbick

try both tiny and small. it worked for me.

ramanpreet9 avatar Mar 19 '18 08:03 ramanpreet9

Should I use a different cfg? Could you let me know your command when trying to infere a test image? Thanks

konbick avatar Mar 19 '18 08:03 konbick

./darknet yolo test cfg/yolov1/yolo-small.cfg /weights/yolo-small.weights data/dog.jpg -thresh 0.1

On Mon, Mar 19, 2018 at 5:00 PM, konbick [email protected] wrote:

Should I use a different cfg? Could you let me know your command when trying to infere a test image? Thanks

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pjreddie/darknet/issues/486#issuecomment-374142233, or mute the thread https://github.com/notifications/unsubscribe-auth/AMbPE_l0L7C6NdHqMWlBGVtIjjht4Ns6ks5tf3OSgaJpZM4SPV7y .

ramanpreet9 avatar Mar 19 '18 09:03 ramanpreet9

Yes, you need to use the relevant config file small.weights with small.cfg etc

ramanpreet9 avatar Mar 19 '18 09:03 ramanpreet9

If I use the following command, it works well for me, too

./darknet detect cfg/yolo.cfg weights/yolo.weights data/horses.jpg

konbick avatar Mar 20 '18 05:03 konbick

I had the same problem as u,I test the cmd “./darknet detect cfg/yolov3.cfg yolov3.weights data/dog.jpg” but no response。Then I changed to "./darknet detect cfg/yolov2.cfg yolo.weights data/dog.jpg" ,It's works。I'm wondering why!!!

kjcx100 avatar May 29 '18 08:05 kjcx100

I am having the same problem, except I cannot detect the dog for any combination of weights and architectures.

CUDA 8.0 K80 CUDNN 7.1 Nvidia drivers 375.66

GPU=1, CUDNN=1

csbrown avatar Jun 29 '18 17:06 csbrown

Upgraded my nvidia drivers and cuda. No better.

CUDA 9.1 K80 CUDNN 7.1 Nvidia drivers 390.67

GPU=1, CUDNN=1

csbrown avatar Jul 02 '18 19:07 csbrown

Lowered the -thresh option to 0.01, and it detects everything, everywhere at a confidence of 5%. This is weird, but I suppose this is because 0%s cause issues with cross-entropy loss, so the minimum confidence is 5%..... okay. If I set the -thresh option to 0.06, I detect like a gazillion people, one for each grid cell, it seems. Going to add a cli option for -hier_thresh and see what that does so I can get a handle on all this to dig deeper to debug.

csbrown avatar Jul 02 '18 19:07 csbrown

Turned off CUDNN and it seems to work. What version of CUDNN is everyone using?

csbrown avatar Jul 10 '18 13:07 csbrown

yeah! I have the same problem, and I turned off CUDNN, and it worked, but I don't know why, is the version of CUDNN wrong? CUDA -> 8.0 NVIDIA drive -> 375.26 (seem like I have two version of CUDNN, 5.1.10 and 7.2.1)

zhangyi6 avatar Aug 17 '18 07:08 zhangyi6

Any update?

I have the same issue with Cuda 10, if I disable CUDNN it works

grosmar avatar Nov 09 '18 10:11 grosmar

I encountered the same problem while working on GCP and I can confirm that it works every time while disabling cudnn but I also made it work with cudnn enabled just by creating a new IDENTICAL virtual machine with same cuda and cudnn, which is a bit weird. This may show that is not a problem with the weights.

danieltanasec avatar Jan 02 '19 12:01 danieltanasec

I encountered this problem using the NVIDIA GPU Cloud Image for Deep Learning, Data Science, and HPC image on GCP. Turns out, it was because I was using the NVIDIA Tesla V100 GPU. I wasnt having this issue on a new instance with the NVIDIA Tesla P100.

ministrudels avatar Jul 07 '19 19:07 ministrudels

opencv=1 cuda=1 cudnn=1

same error, please modify cfg/yolov3.cfg,

Testing

batch=1 subdivisions=1

Training

#batch=256 #subdivisions=64 then, detector result display ok

SirojbekSafarov avatar Mar 03 '20 08:03 SirojbekSafarov

i have the same issue ...

some update with this problem?

`Performing object detection: INPUT_IMGS----- tensor([[[[0., 0., 0., ..., 0., 0., 0.], [0., 0., 0., ..., 0., 0., 0.], [0., 0., 0., ..., 0., 0., 0.], ..., [0., 0., 0., ..., 0., 0., 0.], [0., 0., 0., ..., 0., 0., 0.], [0., 0., 0., ..., 0., 0., 0.]],

     [[0., 0., 0.,  ..., 0., 0., 0.],
      [0., 0., 0.,  ..., 0., 0., 0.],
      [0., 0., 0.,  ..., 0., 0., 0.],
      ...,
      [0., 0., 0.,  ..., 0., 0., 0.],
      [0., 0., 0.,  ..., 0., 0., 0.],
      [0., 0., 0.,  ..., 0., 0., 0.]],

     [[0., 0., 0.,  ..., 0., 0., 0.],
      [0., 0., 0.,  ..., 0., 0., 0.],
      [0., 0., 0.,  ..., 0., 0., 0.],
      ...,
      [0., 0., 0.,  ..., 0., 0., 0.],
      [0., 0., 0.,  ..., 0., 0., 0.],
      [0., 0., 0.,  ..., 0., 0., 0.]]],


    [[[0., 0., 0.,  ..., 0., 0., 0.],
      [0., 0., 0.,  ..., 0., 0., 0.],
      [0., 0., 0.,  ..., 0., 0., 0.],
      ...,
      [0., 0., 0.,  ..., 0., 0., 0.],
      [0., 0., 0.,  ..., 0., 0., 0.],
      [0., 0., 0.,  ..., 0., 0., 0.]],

     [[0., 0., 0.,  ..., 0., 0., 0.],
      [0., 0., 0.,  ..., 0., 0., 0.],
      [0., 0., 0.,  ..., 0., 0., 0.],
      ...,
      [0., 0., 0.,  ..., 0., 0., 0.],
      [0., 0., 0.,  ..., 0., 0., 0.],
      [0., 0., 0.,  ..., 0., 0., 0.]],

     [[0., 0., 0.,  ..., 0., 0., 0.],
      [0., 0., 0.,  ..., 0., 0., 0.],
      [0., 0., 0.,  ..., 0., 0., 0.],
      ...,
      [0., 0., 0.,  ..., 0., 0., 0.],
      [0., 0., 0.,  ..., 0., 0., 0.],
      [0., 0., 0.,  ..., 0., 0., 0.]]],


    [[[0., 0., 0.,  ..., 0., 0., 0.],
      [0., 0., 0.,  ..., 0., 0., 0.],
      [0., 0., 0.,  ..., 0., 0., 0.],
      ...,
      [0., 0., 0.,  ..., 0., 0., 0.],
      [0., 0., 0.,  ..., 0., 0., 0.],
      [0., 0., 0.,  ..., 0., 0., 0.]],

     [[0., 0., 0.,  ..., 0., 0., 0.],
      [0., 0., 0.,  ..., 0., 0., 0.],
      [0., 0., 0.,  ..., 0., 0., 0.],
      ...,
      [0., 0., 0.,  ..., 0., 0., 0.],
      [0., 0., 0.,  ..., 0., 0., 0.],
      [0., 0., 0.,  ..., 0., 0., 0.]],

     [[0., 0., 0.,  ..., 0., 0., 0.],
      [0., 0., 0.,  ..., 0., 0., 0.],
      [0., 0., 0.,  ..., 0., 0., 0.],
      ...,
      [0., 0., 0.,  ..., 0., 0., 0.],
      [0., 0., 0.,  ..., 0., 0., 0.],
      [0., 0., 0.,  ..., 0., 0., 0.]]],


    [[[0., 0., 0.,  ..., 0., 0., 0.],
      [0., 0., 0.,  ..., 0., 0., 0.],
      [0., 0., 0.,  ..., 0., 0., 0.],
      ...,
      [0., 0., 0.,  ..., 0., 0., 0.],
      [0., 0., 0.,  ..., 0., 0., 0.],
      [0., 0., 0.,  ..., 0., 0., 0.]],

     [[0., 0., 0.,  ..., 0., 0., 0.],
      [0., 0., 0.,  ..., 0., 0., 0.],
      [0., 0., 0.,  ..., 0., 0., 0.],
      ...,
      [0., 0., 0.,  ..., 0., 0., 0.],
      [0., 0., 0.,  ..., 0., 0., 0.],
      [0., 0., 0.,  ..., 0., 0., 0.]],

     [[0., 0., 0.,  ..., 0., 0., 0.],
      [0., 0., 0.,  ..., 0., 0., 0.],
      [0., 0., 0.,  ..., 0., 0., 0.],
      ...,
      [0., 0., 0.,  ..., 0., 0., 0.],
      [0., 0., 0.,  ..., 0., 0., 0.],
      [0., 0., 0.,  ..., 0., 0., 0.]]]])
+ Batch 0, Inference Time: 0:00:00.487818

Saving images: (0) Image: 'data/test/DZUY1ekX4AEiNgq.jpg' (1) Image: 'data/test/Metallic-Corrosion.jpg' (2) Image: 'data/test/corrosion002.jpg' (3) Image: 'data/test/istockphoto-1179527589-1024x1024.jpg' `

CheRaton avatar May 20 '21 21:05 CheRaton

I have same issue and I have Cuda - v11.7 and Cudnn-11 so give suggestions

AbhiNexgits avatar Aug 25 '22 12:08 AbhiNexgits