grad-cam-formula-student icon indicating copy to clipboard operation
grad-cam-formula-student copied to clipboard

Interpretation of output

Open piseabhijeet opened this issue 4 years ago • 1 comments

Hi @Sibozhu

I am using a custom trained Tiny YOLOv3 model with 5 classes for GradCAM.

I noticed the following: image

The output of my model is 13 x 13 x 3 x (5+5) + 26 x 26 x 3 x (5+5) thus giving the output shape in your code as: 2535 x 10

However the variable 'probs[0]' and 'idx[0]' each contain 10 elements with different bboxes than the original Darknet I am getting 4 bboxes with confidence as 1 and in this code i am getting 2 boxes with confidence 1.

Are 'probs[0]' and 'idx[0]' the right inputs for gradcam or am i missing something?

piseabhijeet avatar Feb 02 '21 07:02 piseabhijeet

@piseabhijeet did you figure out the reason, has it something to do with that originally YOLOv3 uses sigmoid for class loss, and not soft-max ? I'm also confused from this line here : link , not able to relate it to original paper. Please clarify if you know the reason.

In simpler terms, I think, it's the loss calculation I am confused about.

Thanks.

adityag6994 avatar Jun 02 '21 01:06 adityag6994