mmsegmentation icon indicating copy to clipboard operation
mmsegmentation copied to clipboard

vis_cam.py in mmsegmenation

Open yuanyuangoo opened this issue 3 years ago • 3 comments

Can we have a grad-cam-like tool to visualize feature maps, like in vis_cam.py in misclassification?

yuanyuangoo avatar Sep 07 '22 00:09 yuanyuangoo

of course, we have supported very powerful visualization tool in mmseg 1.0.0rc0, you can try it

reference https://github.com/open-mmlab/mmengine/blob/cfb884c180e97454b14b1dc12bac21bd376f82db/mmengine/visualization/visualizer.py#L119-L124 https://github.com/open-mmlab/mmsegmentation/blob/1.x/docs/en/user_guides/visualization.md

MeowZheng avatar Sep 08 '22 02:09 MeowZheng

Thanks for the response. How do I get a feat-map of a certain layer after I trained a model using mmsegmentation and got weights?

yuanyuangoo avatar Sep 08 '22 21:09 yuanyuangoo

Just save any tensor map like below as you want, then load it ant see it with the visualization tool.

https://github.com/open-mmlab/mmsegmentation/blob/b51670b61339e5b10c5ab6c277de6b6a387fdff0/mmseg/models/decode_heads/dpt_head.py#L287

MeowZheng avatar Sep 09 '22 03:09 MeowZheng

Just save any tensor map like below as you want, then load it ant see it with the visualization tool.

https://github.com/open-mmlab/mmsegmentation/blob/b51670b61339e5b10c5ab6c277de6b6a387fdff0/mmseg/models/decode_heads/dpt_head.py#L287

could you speak in details? I also want to know. please!

shigejiafeimao avatar Oct 06 '22 01:10 shigejiafeimao

Just save any tensor map like below as you want, then load it ant see it with the visualization tool.

https://github.com/open-mmlab/mmsegmentation/blob/b51670b61339e5b10c5ab6c277de6b6a387fdff0/mmseg/models/decode_heads/dpt_head.py#L287

if i use sep_aspp_head.py,how to get a feat-map?

shigejiafeimao avatar Oct 06 '22 01:10 shigejiafeimao

Can we have a grad-cam-like tool to visualize feature maps, like in vis_cam.py in misclassification?

Hi, have you solved it?

duduzai2019 avatar Nov 10 '22 08:11 duduzai2019

Hi, have you solved it?

Hi, can you solved it?

duduzai2019 avatar Nov 10 '22 08:11 duduzai2019

Have you found a suitable solution, I have a similar problem

shenxiangkei avatar Dec 29 '22 09:12 shenxiangkei