GithubHelp home page GithubHelp logo

ame-cam's Introduction

AME-CAM: Attentive Multiple-Exit CAM for Weakly Supervised Segmentation on MRI Brain Tumor (AME-CAM) [MICCAI 23']

Official code implementation for the AME-CAM paper accepted by MICCAI 2023.

Dataset

RSNA-ASNR-MICCAI Brain Tumor Segmentation (BraTS) Challenge 2021

Download the official BraTS 2021 Dataset Task 1.

Split the official training set into training and validation with the ratio 9:1. (The case id for training and validation set are shown in dataset.txt.)

Preprocess the dataset from 3D volume data into 2D slide with the following script.

cd ./src/
python3 gen_dataset.py -m t1 -d training/validate

Folder Structures for Dataset

DATASET_NAME
|-- flair
|   |-- training
|   |   |-- normal
|   |   |   |-- NORMAL_1.png
|   |   |   |-- ...
|   |   |-- seg
|   |   |   |-- TUMOR_1.png
|   |   |   |-- ...
|   |   |-- tumor
|   |   |   |-- TUMOR_1.jpg
|   |   |   |-- ...
|   |-- validate
|   |   |-- normal
|   |   |   |-- NORMAL_1.png
|   |   |   |-- ...
|   |   |-- seg
|   |   |   |-- TUMOR_1.png
|   |   |   |-- ...
|   |   |-- tumor
|   |   |   |-- TUMOR_1.jpg
|   |   |   |-- ...
|-- t1
|-- t1ce
|-- t2

Encoder Pretrain with Self-supervised Methods

cd ./src/encoder_phase/
python3 pretrain_clnet.py -m t1 --model_type Res18

Train and Test Multi-exit Classifier with Pretrained Encoder

cd ./src/encoder_phase/
python3 train_cnet.py -b 256 -m t1 --encoder_pretrained_path SimCLR/Res18_t1_ep100_b512
python3 test_cnet.py -m t1 --pretrained_path Res18_t1_ep10_b256.ME

Train and Test the Activation Aggregation Network with the Contrastive Loss

cd ./src/attention_aggregation_network/
python3 train_cnet.py -b 256 -m t1 --encoder_pretrained_path Res18_t1_ep10_b256.ME
python3 test_cnet.py -m t1 --pretrained_path Res18_t1_ep10_b256.AME-CAM

Run the Inference stage of AME-CAM

cd ./src/AME-CAM_inference/
python3 main.py --pretrained_path Res18_t1_ep10_b256.AME-CAM -m t1

Citation

If you use the code or results in your research, please use the following BibTeX entry.

ame-cam's People

Contributors

windstormer 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.