Giter Club home page Giter Club logo

seg-grad-cam's Introduction

SEG-GRAD-CAM

pytorch implementation of SEG-GRAD-CAM,which based on grad-cam.It also has 3D SEG-GRAD-CAM which is used for video. see the paper Towards Interpretable Semantic Segmentation via Gradient-weighted Class Activation Mapping

How to use

Dependencies

This tutorial depends on the following libraries:

  • pytorch
  • opencv-python

usage

gradcam.py:which is the formal implementation GRAD-CAM.My work is based on this work.

gradcam_unet.py:which is the implementation SEG-GRAD-CAM.We use the model deep smoke Segmentation(like Unet).

you can run gradcam_unet.py using model BaiDuyun with password "3d7c" or google drive

result/pic_1.jpg result/cam_1.jpg

gradcam_3d.py:which is the implementation SEG-GRAD-CAM based on 3dunet.It's used for video Activation Mapping. because the paper haven't been public.So the model will be release soon.But it is not important if you want to vis activation map based on your own model.

generate_gif.py: the input and output data of gradcam_3d.py is pic.If you want to compose a series of pic to gif,you can run generate_gif.py.

result/video_2.gif result/vis2.gif

##Question if you have any question about the code. Please email me [email protected]

seg-grad-cam's People

Contributors

linhaoqi027 avatar

Stargazers

394481125 avatar  avatar Quintin avatar Qiqi Xu avatar Minseo avatar Ciaran Bench avatar Zhicheng avatar Burak avatar Zhonggui Tong avatar  avatar Siobhan avatar  avatar gys avatar  avatar  avatar  avatar  avatar Roba Gamal avatar Soumitri Chattopadhyay avatar  avatar  avatar Tho avatar Sizhuo Chen avatar ziqiang avatar Rahul Rajasekaran avatar Yunheng WU avatar Zhongyang LU avatar Luca avatar carrie avatar Benyamin Ghahremani Nezhad avatar sohn avatar  avatar Rushirajsinh Parmar avatar Alex Shang avatar Keuntaek Lee avatar  avatar Pengcheng Shi avatar samy KHELIFI  avatar Snow avatar MadYe avatar Zhihua Liu avatar Bowen Weipeng avatar erichhhhho avatar 李开宇 avatar CyanZz avatar  avatar 几米 avatar McLaren avatar  avatar  avatar

Watchers

James Cloos avatar  avatar paper2code - bot avatar

seg-grad-cam's Issues

105_checkpoint.pth.tar downloading error

Hello,
I am facing a problem with 105_checkpoint.pth.tar file downloading. I try to create a new account on https://pan.baidu.com/ but they don't accept the overseas mobile number account.
I request you please upload file another platform or dropbox or drive. This is easy for everyone to download a file from there.

Error of a layer with multi input

I want to draw a heatmap for "Attention UNet", which has attention gate need two input. When code run the loop in class FeatureExtractor:

for name, module in self.model._modules.items():
      x = module(x)
      if name in self.target_layers:
          x.register_hook(self.save_gradient)
          outputs += [x]

when it run to attention gate:
TypeError: forward() missing 1 required positional argument: 'x'

Code of attunet is:

    def forward(self, x):
        e1 = self.inc(x)
        e2 = self.down1(e1)
        e3 = self.down2(e2)
        e4 = self.down3(e3)
        e5 = self.down4(e4)

        d4 = self.Up4(e5)
        x4 = self.Att4(g=d4, x=e4) #Error happened
        ……

How to make the code support this network?Hope your reply.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.