Giter Site home page Giter Site logo

atlas-istn's Introduction

Atlas-ISTN: Joint segmentation, registration and atlas construction with image-and-spatial transformer networks

When using this code, please cite the following paper:

M. Sinclair, A. Schuh, K. Hahn, K. Petersen, Y. Bai, J. Batten, M. Schaap, B. Glocker. Atlas-ISTN: Joint segmentation, registration and atlas construction with image-and-spatial transformer networks. 2022. Medical Image Analysis, Vol. 78

Code

For running the code, we recommend setting up a dedicated Python environment.

Setup Python environment using conda

Create and activate a Python 3.8 conda environment:

conda create -n pyatlas python=3.8
conda activate pyatlas

Install PyTorch using conda (for CUDA Toolkit 11.3):

conda install pytorch torchvision cudatoolkit=11.3 -c pytorch

Setup Python environment using virtualenv

Create and activate a Python 3.8 virtual environment:

virtualenv -p python3 <path_to_envs>/pyatlas
source <path_to_envs>/pyatlas/bin/activate

Install PyTorch using pip:

pip install torch torchvision

Install additional Python packages:

pip install matplotlib jupyter pandas seaborn scikit-learn SimpleITK==1.2.4 tensorboard tensorboardX attrdict tqdm pyyaml pytorch-lightning torchio

Usage

Two example use-cases are provided:

Example 1: 2D Synthetic Letter B

To run training and test-set evaluation with the 2D synthetic letter B dataset:

python atlas-istn-letter-b.py

Tensorboard can be used to monitor training with:

tensorboard --logdir=output/synth2d/full-stn/

Example 2: 3D Synthetic Cardiac Dataset

While the CCTA dataset used in the paper is not public, a synthetic 3D dataset is provided, which can be downloaded from here. Unzip the data under data/synth3d.

To run training and test-set evaluation with a synthetic 3D cardiac dataset:

python atlas-istn-synth-cardiac.py

Tensorboard can be used to monitor training with:

tensorboard --logdir=output/synth3d/full-stn/

License

This project is licensed under the Apache License 2.0.

atlas-istn's People

Contributors

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