Grad-CAM.pytorch icon indicating copy to clipboard operation
Grad-CAM.pytorch copied to clipboard

Gradcam for semantic/ instance segmentation model

Open abhigoku10 opened this issue 5 years ago • 14 comments

@yizt Thanks for sharing your work . How can we use the current code to for segmentation models like deeplab . Can you share / suggest the modifications required

Thanks in advance

abhigoku10 avatar May 09 '20 02:05 abhigoku10

@abhigoku10 您好,语义分割已经是像素级别结果了,不需要生成CAM图像

yizt avatar May 09 '20 07:05 yizt

@abhigoku10 wokay for architectures like retina net how to obtain the CAM output or mask rcnn based architecture

abhigoku10 avatar May 09 '20 08:05 abhigoku10

@abhigoku10 您好,retina net完成了,通知您哈

yizt avatar May 09 '20 10:05 yizt

@yizt please do let me knw once done it

abhigoku10 avatar May 09 '20 10:05 abhigoku10

@yizt 在线等前辈的retinanet CAM,因为retinanet score和box是分开的,自己一直没有搞出来

wangzyon avatar May 12 '20 03:05 wangzyon

您好,我尽快,最迟这周末!

| | 易作天 | | 邮箱:[email protected] |

签名由 网易邮箱大师 定制

On 05/12/2020 11:03, wangzyon wrote:

@abhigoku10 您好,retina net完成了,通知您哈

@abhigoku10 您好,语义分割已经是像素级别结果了,不需要生成CAM图像

@yizt 在线等前辈的retinanet CAM,因为retinanet score和box是分开的,自己一直没有搞出来

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

yizt avatar May 12 '20 04:05 yizt

@abhigoku10 @wangzyon 已增加retinanet的Grad-CAM实现

yizt avatar May 17 '20 00:05 yizt

@yizt thanks for sharing the source code , in your codes both faster rcnn and retina net you have a variable called indices can you let me knw how to do it for custom architecture or for yolact

abhigoku10 avatar May 19 '20 08:05 abhigoku10

@abhigoku10 你好,a)个人认为跟indices没有关系,假如retinanet没有使用fpn,也就不需要indices了。对于目标检测网络由于是多输出,且网络结构都不同,没有固定的生成CAM的方法;b)另外yolact是实例分割网络,不需要生成CAM图了,分割结果就是最好的CAM图。c) 如果实在要生成yolact的CAM图,与retinanet应该是一样的,yolact是基于retinanet的

yizt avatar May 19 '20 12:05 yizt

@yizt hwo to get output like this from the above source code image image

abhigoku10 avatar Jun 02 '20 09:06 abhigoku10

@abhigoku10 您好,这就是原始图像与热图加权求和结果;如main.py中的

cam = heatmap + np.float32(image)
return norm_image(cam)

yizt avatar Jun 02 '20 13:06 yizt

@yizt i have following few queries

  1. how to obtain the heatmap for all the classes in a single image / all the objects of the same class in a single image
  2. what is the feature_level variable in the retinanet.py in singleinference() function

abhigoku10 avatar Jun 04 '20 05:06 abhigoku10

@abhigoku10 您好

  1. 对于retinanet,没有办方获取同一类别所有对象;不同的对象(object)可能来自不同的feature level
  2. retinanet使用了feature pyramid;feature level指的是对象对应的anchor来自feature pyramid中哪一层feature map;或者说预测该对象使用的是哪一层feature map

yizt avatar Jun 05 '20 01:06 yizt

@yizt i am trying to modify the code to run grad cam on the yolact++/yolact, i am stuck at the feature level function where i am not able to get generate the feature level values for this architecture, How to integrate with other architecture

abhigoku10 avatar Jun 08 '20 04:06 abhigoku10