Coder Social home page Coder Social logo

ca-net's Introduction

CA-Net: Comprehensive Attention Convolutional Neural Networks for Explainable Medical Image Segmentation

This repository provides the code for "CA-Net: Comprehensive attention Convolutional Neural Networks for Explainable Medical Image Segmentation". Our work now is available on Arxiv. Our work is accepted by TMI.

mg_net Fig. 1. Structure of CA-Net.

uncertainty Fig. 2. Skin lesion segmentation.

refinement

Fig. 3. Placenta and fetal brain segmentation.

Requirementss

Some important required packages include:

  • Pytorch version >=0.4.1.
  • Visdom
  • Python == 3.7
  • Some basic python packages such as Numpy.

Follow official guidance to install Pytorch.

Usages

For skin lesion segmentation

  1. First, you can download the dataset at ISIC 2018. We only used ISIC 2018 task1 training dataset, To preprocess the dataset and save as ".npy", run:
python isic_preprocess.py 
  1. For conducting 5-fold cross-validation, split the preprocessed data into 5 fold and save their filenames. run:
python create_folder.py 
  1. To train CA-Net in ISIC 2018 (taking 1st-fold validation for example), run:
python main.py --data ISIC2018 --val_folder folder1 --id Comp_Atten_Unet
  1. To evaluate the trained model in ISIC 2018 (we added a test data in folder0, testing the 0th-fold validation for example), run:
python validation.py --data ISIC2018 --val_folder folder0 --id Comp_Atten_Unet

Our experimental results are shown in the table: refinement

  1. You can save the attention weight map in the middle step of the network to '/result' folder. Visualizing the attention weight above the original images, run:
python show_fused_heatmap.py

Visualzation of spatial attention weight map: refinement

Visualzation of scale attention weight map: refinement

Citation

If you find our work is helpful for your research, please consider to cite:

@article{gu2020net,
  title={CA-Net: Comprehensive Attention Convolutional Neural Networks for Explainable Medical Image Segmentation},
  author={Gu, Ran and Wang, Guotai and Song, Tao and Huang, Rui and Aertsen, Michael and Deprest, Jan and Ourselin, S{\'e}bastien and Vercauteren, Tom and Zhang, Shaoting},
  journal={IEEE Transactions on Medical Imaging},
  year={2020},
  publisher={IEEE}
}

Acknowledgement

Part of the code is revised from Attention-Gate-Networks.

ca-net's People

Stargazers

 avatar

Watchers

 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.