Giter Site home page Giter Site logo

rog's Introduction

Towards Robust General Medical Image Segmentation

This repository provides a PyTorch implementation of the Benchmark and baseline method presented in Towards Robust General Medical Image Segmentation (MICCAI 2021). In this work, we propose a new benchmark to evaluate robustness in the context of the Medical Segmentation Decathlon (MSD) by extending the recent AutoAttack natural image classification framework to the domain of volumetric data segmentation, and we present a novel lattice architecture for RObust Generic medical image segmentation (ROG).

For mor information, please visit our project website

Paper

Towards Robust General Medical Image Segmentation,
Laura Daza1, Juan C. Pérez1,2, Pablo Arbeláez1*
MICCAI 2021.

1 Center for Research and Formation in Artificial Intelligence (CINFONIA), Universidad de Los Andes.
2 King Abdullah University of Science and Technology (KAUST).

Installation

Requirements

  • Python
  • Pytorch >= 1.6.0
  • Numpy
  • Pandas
  • Scipy
  • Matplotlib
  • Nibabel
  • batchgenerators 0.23

Cloning the repository

$ git clone [email protected]:BCV-Uniandes/ROG.git
$ cd ROG

Dataset Preparation

  1. Download the Medical Segmentation Decathlon (MSD) Dataset from here. Each task will be organized with the following structure:
TaskXX_TaskName
|_ imagesTr
|_ |_ *.nii.gz
|_ imagesTs
|_ |_ *.nii.gz
|_ labelsTr
|_ |_ *.nii.gz
|_ dataset.json
  1. Set the data_root, out_directory and num_workers variables in the file data_preprocessing.py and run the following commands:
cd lib/preprocessing
python data_preprocessing.py

If you want to use ROG for a different dataset you can store it in the same data_root folder, making sure that it follows the same name formating and organization as the MSD tasks.

Training and evaluating the models

We train ROG on clean images and then fine-tune the models using Free AT:

# For the standard training
python main.py --task TASK_ID --gpu GPU_IDs --batch BATCH_SIZE --name OUTPUT_DIR

# For the Free AT fine tuning
python main.py --task TASK_ID --gpu GPU_IDs --batch BATCH_SIZE --name OUTPUT_DIR_FREE_AT --ft --pretrained OUTPUT_DIR --AT

Evaluating the models:

# Standard inference
python main.py --task TASK_ID --gpu GPU_IDs --batch BATCH_SIZE --name OUTPUT_DIR --test

# AutoAttack
python main.py --task TASK_ID --gpu GPU_IDs --batch BATCH_SIZE --name OUTPUT_DIR --test --adv

You can change the strength of the attacks by adjusting the magnitude (--eps) and number of iterations (--adv_iters).

Citation

If you find our paper useful, please use the following BibTeX entry for citation:

@inproceedings{daza2021towards,
  title={Towards Robust General Medical Image Segmentation},
  author={Daza, Laura and P{\'e}rez, Juan C and Arbel{\'a}ez, Pablo},
  booktitle={MICCAI},
  year={2021}
}

rog's People

Contributors

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