Code Monkey home page Code Monkey logo

cam-dmri's Introduction

CAM-dMRI

This repository uses Class Activation Mapping on diffusion MRI data, implemented in PyTorch.

Class Activation Mapping (CAM)

Paper and Archiecture: Learning Deep Features for Discriminative Localization

Paper Author Implementation: metalbubble/CAM

Class activation maps could be used to intepret the prediction decision made by the CNN. The left image below shows the class activation map of top 5 predictions respectively, you can see that the CNN is triggered by different semantic regions of the image for different predictions. The right image below shows the CNN learns to localize the common visual patterns for the same object class.

Code Description

Dependancies: pytorch-gpu, dipy.

Usage: first, set parameters in 'utils.py' accordingly.

Then, run

python3 main.py

Network: VGG, GoogLeNet, AlexNet, Inception V3

Data: HCP life span dataset.

  • Download the zipped files and upzip them.
  • Preprocess using 'data.py', to create slices.
  • Divde the total dataset into train group and test group. As you do that, [images must be arranged in this way][4]:
    ../DATA/HCP/16x3_slice/train/old/*.png
    ../DATA/HCP/16x3_slice/test/young/*.png
    

Checkpoint

  • Checkpoint will be created in the checkpoint folder every ten epoch.
  • By setting RESUME = #, you can resume from checkpoint/$ModelN$#.pt.

Visualization run tensorboard --logdir runs/ to visualize in browser.

cam-dmri's People

Contributors

zhiyunl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

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.