Git Product home page Git Product logo

fast-symmetric-diffeomorphic-image-registration-with-convolutional-neural-networks's Introduction

Fast Symmetric Diffeomorphic Image Registration with Convolutional Neural Networks

This is the official Pytorch implementation of "Fast Symmetric Diffeomorphic Image Registration with Convolutional Neural Networks" (CVPR 2020), written by Tony C. W. Mok and Albert C. S. Chung.

** Please also check out our new deep learning-based image registration framework (LapIRN - MICCAI2020) at https://github.com/cwmok/LapIRN, which achieved promising registration performance in large deformation settings. **

Prerequisites

  • Python 3.5.2+
  • Pytorch 1.3.0
  • NumPy
  • NiBabel

This code has been tested with Pytorch and GTX1080TI GPU.

Inference

python Test_SYMNet.py

Training

If you want to train a new model using your own dataset, please define your own data generator for train_SYMNet.py and perform the following script.

python train_sym_onepass.py

(Example) Training on the preprocessed OASIS dataset

If you want to train on the preprocessed OASIS dataset in https://github.com/adalca/medical-datasets/blob/master/neurite-oasis.md. We have an example showing how to train on this dataset.

  1. Download the preprocessed OASIS dataset, unzip it and put it in "Data/OASIS".
  2. To train a new SyMNet, python Train_sym_neurite_oasis.py will create a SyMNet model trained on the first 255 cases in the dataset.
  3. To test the model, python Test_SYMNet_neurite_oasis.py --modelpath {{pretrained_model_path}} --fixed ../Data/image_A_full_size.nii.gz --moving ../Data/image_B_full_size.nii.gz will load the assigned model and register the image "image_A_full_size.nii.gz" and "image_B_full_size.nii.gz".

A pretrained model and its log file are available in "Model/SYMNet_neurite_oasis_55000.pth" and "Log/SYMNet_neurite_oasis.txt", respectively.

Publication

If you find this repository useful, please cite:

Notes on this repository

We found that estimating the time 1 solution instead of 0.5 solution tends to produce a smoother result in our later experiments. If you want to switch back to 0.5 solution, please replace the "self.time_step" with "self.time_step-1" at line 165 in Models.py and train a new model from scratch.

Acknowledgment

Some codes in this repository are modified from IC-Net and VoxelMorph.

Keywords

Keywords: Diffeomorphic Image Registration, convolutional neural networks, alignment, Symmetric Image Registration

fast-symmetric-diffeomorphic-image-registration-with-convolutional-neural-networks's People

Contributors

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