captum icon indicating copy to clipboard operation
captum copied to clipboard

How can i compute Integrated Gradients for object detection(Yolov5) ?

Open akashlp27 opened this issue 3 years ago • 3 comments

Hey, how can I compute IG for object detection models such as yolov5 wherein the model's output will usually be (class, bboxes, score), where as certain classification models give prediction probability for all classes, any suggestions would help a lot...

akashlp27 avatar Jun 24 '22 06:06 akashlp27

Hi @akashlp27 Thank you for the question - you could try wrapping your original model to produce predictions for a pre-specified bbox. This way the wrapped model produces the output that IG expects. You'll need to make a new wrapped model for each bbox.

99warriors avatar Jul 02 '22 14:07 99warriors

Thanks for the reply, will try it out

akashlp27 avatar Jul 05 '22 06:07 akashlp27

Hi @akashlp27 - were you able to do this? I have the exact same problem and I’m not sure how to pre specify bounding boxes in yolov5

mshergad avatar Aug 10 '23 23:08 mshergad