GithubHelp home page GithubHelp logo

ilidar / segnetcmr Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mshunshin/segnetcmr

0.0 3.0 0.0 32.87 MB

A Tensorflow implementation of SegNet for cardiac MRI segmentation

License: MIT License

Python 99.98% HTML 0.02%

segnetcmr's Introduction

SegNetCMR

A Tensorflow implementation of SegNet to segments CMR images

Aims

  1. A demonstration of a more complete Tensorflow program including saving state and resuming.
  2. Provide an ready-to-go example of medical segmentation with sufficient training and validation data, in a usable format (PNGs).

Requirements

  1. Python 3.5: Best to use the Conda distribution
  2. Tensorflow 0.12

Todo

  1. Add code to run on your own data (currently there is only the training code present)

Running

Make sure you have conda and tensorflow installed

conda install tensorflow
python
Python 3.5.2 | packaged by conda-forge | (default, Sep  8 2016, 14:36:38)

The git clone this repository

git clone https://

And start the training from the folder

cd /path/to/SegNetCMR
python train.py

And in another terminal window start tensorboard

tensorboard --logdir ./Output

Then in your webbrowser go to http://localhost:6006

Training and test data

Many thanks to the Sunnybrook Health Sciences Centre for providing a set of CMR data with associated contours. Unfortunately, in the latest release the filenames have become a little mangled, and don't match up with the contours. I have gone through the files and matched them up; exported the DICOMS as PNGs and converted the list of coordinates of the contours to PNGs as well.

The first two sets of CMRs are included as training data, the last set as test data.

With thanks to

andreaazzini/segnet: A Tensorflow SegNet translation

pydicom: A pure python dicom library

StackOverflow Tensorflow batch_norm thread

GitHub Tensorflow unpool thread

Issues and annoyances

  1. The original SegNet uses max_pool_with_argmax, and requires an unpool_with_argmax. Unfortunately, Tensorflow does not provide an unpool_with_argmax. Fortunately there is code in the github thread above to make your own.
  2. This version of unpool_with_argmax runs on the CPU not GPU so is a little slower.
  3. Tensorflow does not provide a CPU version of max_pool_with_argmax, so if you don't have a GPU you are stuck using the maxpool version.
  4. Tensorflow forgot to include a function for gradients for maxpoolwithargmax, so it is included at the bottom of train.py
  5. The name mangling of the Sunnybrook CMR data.

License

SegNetCMR: MIT license

SunnyBrook Cardiac Data: Public Domain

pydicom: MIT license

segnetcmr's People

Contributors

mshunshin avatar

Watchers

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