YOLOv3-Torch2TRT icon indicating copy to clipboard operation
YOLOv3-Torch2TRT copied to clipboard

No detections output from the model

Open baheytharwat opened this issue 4 years ago • 2 comments

The model doesn't detect any object! I printed the detections tensor before and after the Non Maximum Suppression and here are the outputs:

Before
tensor([[[ 0.,  0.,  0.,  ...,  0.,  0.,  0.],
         [32.,  0.,  0.,  ...,  0.,  0.,  0.],
         [64.,  0.,  0.,  ...,  0.,  0.,  0.],
         ...,
         [nan, nan, nan,  ..., nan, nan, nan],
         [nan, nan, nan,  ..., nan, nan, nan],
         [nan, nan, nan,  ..., nan, nan, nan]]])
After
[None]

This issue appears when I use the TensorRT model. when I use TensorRT = False, There are some issues with the detections as well. The model doesn't detect all objects.

I want to use YOLOv3-TRT with its good accuracy, How can I solve this issue?

baheytharwat avatar Jun 27 '20 18:06 baheytharwat

Hi @baheytharwat Sorry for long time no reply,I have been busy with other work in the past half a year and rarely check this repo. For your problem,you should check items as follow:

  1. pretrained weights
  2. image folder
  3. you can let half flag = false and delete model.eval() to test code

If it is still wrong, then maybe I wrote the wrong code in some place, you need to check my code by yourself.

DocF avatar Jun 29 '20 18:06 DocF

Hi @DocF Thanks for your response, I checked what you have said: pretrained weights and Image folder and both of them are fine. When I use half = false , I get an error in NMS function. So, before I start checking your code. I want you to check on your pc if the code works and detects the objects well - If you have free time -

baheytharwat avatar Jun 29 '20 19:06 baheytharwat