Coder Social home page Coder Social logo

juampamuc / unsupervised-medical-image-segmentation Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lihaoliu-cambridge/unsupervised-medical-image-segmentation

0.0 1.0 0.0 2.49 MB

Code for "Contrastive Registration for Unsupervised Medical Image Segmentation".

Python 100.00%

unsupervised-medical-image-segmentation's Introduction

Unsupervised Medical Image Segmentation

by Lihao Liu, Angelica I Aviles-Rivero, and Carola-Bibiane Schönlieb.

Introduction

In this repository, we provide the PyTorch implementation for Contrastive Registration for Unsupervised Medical Image Segmentation.

Requirement

torch 1.5.0
torchvision 0.4.2
SimpleITK 1.2.4
opencv-python 4.2.0.32

Usage

  1. Clone the repository:

    git clone https://github.com/lihaoliu-cambridge/unsupervised-medical-image-segmentation.git
    cd unsupervised-medical-image-segmentation
  2. Download the images and segmentation masks for LPBA40 dataset:

    LPBA40 Images: LPBA40_rigidly_registered_pairs.tar.gz
    LPBA40 Labels: LPBA40_rigidly_registered_label_pairs.tar.gz

  3. Unzip them in folder datasets/LPBA40:

    datasets/LPBA40/LPBA40_rigidly_registered_pairs
    datasets/LPBA40/LPBA40_rigidly_registered_label_pairs

  4. Pre-process the LPBA40 dataset:

    cd scripts
    python preprocessing_lpba40.py

    output results:

    datasets/LPBA40/LPBA40_rigidly_registered_pairs_histogram_standardization_small
    datasets/LPBA40/LPBA40_rigidly_registered_label_pairs_small

    This step aims to standardize the distribute of all images in a similar range:

  5. Train the model:

    cd ..
    python train.py  --no_html  --dataroot ./datasets/LPBA40/LPBA40_rigidly_registered_pairs_histogram_standardization_small  --dataset_mode lpba40_contrastive_learning  --batchSize 8  --lr 0.003  --model registration_model_contrastive_learning  --name lpba40_contrastive_learning
    
  6. Test the saved model:

    python test_dice.py  --no_html  --dataroot ./datasets/LPBA40/LPBA40_rigidly_registered_pairs_histogram_standardization_small  --dataset_mode lpba40_contrastive_learning  --batchSize 1  --model registration_model_contrastive_learning  --name lpba40_contrastive_learning
    
    

Citation

If you use our code for your research, please cite our paper:

@article{liu2020contrastive,
  title={Contrastive Registration for Unsupervised Medical Image Segmentation},
  author={Liu, Lihao and Aviles-Rivero, Angelica I and Sch{\"o}nlieb, Carola-Bibiane},
  journal={arXiv preprint arXiv:2011.08894},
  year={2020}
}

Question

Please open an issue or email [email protected] for any questions.

unsupervised-medical-image-segmentation's People

Contributors

lihaoliu-cambridge avatar

Watchers

James Cloos 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.