Coder Social home page Coder Social logo

xiaochengcike / prostate_and_pz_dl_segmentation_code Goto Github PK

View Code? Open in Web Editor NEW

This project forked from olmozavala/prostate_and_pz_dl_segmentation_code

0.0 2.0 0.0 53.01 MB

This code contains a test case of a 3D CNN used for Prostate and Peripheral Zone segmentation

License: Academic Free License v3.0

Python 100.00%

prostate_and_pz_dl_segmentation_code's Introduction

Segmentation of prostate and prostate zones using Deep Learning: a multi-MRI vendor analysis

This repository contains a test case for one of our recent projects which consist of an automatic segmentation algorithm for the prostate and its peripheral zone (PZ) using a 3D Convolutional Neural Network (CNN).

The details of our algorithm will soon be published and we will add a link in here.

With this program six different CNN models can be tested in two sample datasets. The two datasets contain MR images from different vendors: Siemens and GE. And the models are split in 3 for prostate segmentation and 3 for PZ segmentation. The difference between the models is the training dataset used to build them, not the CNN architecture.

The architecture used to train our models is the following: alt text

Install

Important!! This code uses f-strings, which are available since Python 3.6. If you are using an older version please reformat the print statements.

Conda

conda install -c anaconda tensorflow-gpu 
conda install -c simpleitk simpleitk 
conda install -c simpleitk/label/dev simpleitk
conda install -c conda-forge keras 

Conda from requirements.txt file (linux)

while read requirement; do conda install --yes $requirement || pip install $requirement; done < requirementsT.txt

Data

The test data is freely available and can be downloaded from this link data. In order to edit the configuration file as little as possible, I suggest you to copy the data folder at the root folder of this repository.

Run Test

The organization of the folders is the one below, and its content is self explanatory. The file to run the test is inside the code folder and is MakeSegmentation.py. To configure the run you must edit the file MainConfig.py inside code/config. The configuration file is well documented and there is not need to re-explain it here. Just mention that in that file you can configure your input and output folders, which model to test, in which dataset, etc.

To test any of the models, first edit the configuration file and then run it with:

cd code
python MakeSegmentation.py

This program will make a segmentation with the proposed CNN and it will create images showing the ground truth contour and the predicted contour. It will also compute the Dice Coefficient of the segmentation and it will save it in a CSV file. Some of the images you should be able to generate with this test case are:

Prostate Segmentation PZ Segmentation
alt text alt text

prostate_and_pz_dl_segmentation_code's People

Contributors

olmozavala avatar

Watchers

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