voldemortX / pytorch-auto-drive

PytorchAutoDrive: Segmentation models (ERFNet, ENet, DeepLab, FCN...) and Lane detection models (SCNN, RESA, LSTR, LaneATT, BézierLaneNet...) based on PyTorch with fast training, visualization, benchmarking & deployment help
BSD 3-Clause "New" or "Revised" License
837 stars 137 forks source link

heat-map question #107

Closed username97q34 closed 1 year ago

username97q34 commented 2 years ago

请问论文中第四页Figure 4,使用Grad-CAM画图是怎么做的呢,如何可以得到如此清晰准确的结果图呢

voldemortX commented 2 years ago

@username97q34 grad cam画的是分类的heat map,所以我是对应画的每条线的classification branch映射到接分割branch位置的feature(没记错的话应该是backbone.layer3.5.relu)的可视化,需要通过一些技巧选图,比如画confidence比较低但正确的线,它接受了其他线feature的可能性就更大(绝大部分可视化并没有文中选的那两张那么显著,这与flip模块本身的limitation和gradcam的不精确性都有一些关系)。当时基本是从这个库改的: https://github.com/yizt/Grad-CAM.pytorch

username97q34 commented 2 years ago

@username97q34 grad cam画的是分类的heat map,所以我是对应画的每条线的classification branch映射到接分割branch位置的feature(没记错的话应该是backbone.layer3.5.relu)的可视化,需要通过一些技巧选图,比如画confidence比较低但正确的线,它接受了其他线feature的可能性就更大(绝大部分可视化并没有文中选的那两张那么显著,这与flip模块本身的limitation和gradcam的不精确性都有一些关系)。当时基本是从这个库改的: https://github.com/yizt/Grad-CAM.pytorch

感谢感谢!!

voldemortX commented 1 year ago

This issue seems to be addressed. I'll close it for now. Feel free to continue commenting for reopen/open a new one.