Giter VIP home page Giter VIP logo

ddeep3m's Introduction

DDeep3m

A dockerized deep-learning model for image segmentation of MOST, based on CDeep3M. The model was verified for brain tumors segmentation in BraTS too.

Thanks for the great work from CDeep3M!

Quickstart

  1. fully tested with Ubunti 16.04 and Docker version 18.06.1-ce

  2. clone the repo to local directory

   git clone https://github.com/cakuba/DDeep3m.git
  1. to build the Docker image for cuda-9 and cudnn-7
   cd cuda-9.0-cudnn7-devel 
   docker build -t cuda9-cudnn7 .
  1. to build the DDeep3M image
   cd ../ddeep3m
   docker build -t ddeep3m .
  1. to check the DDeep3M image
   docker image ls
   REPOSITORY              TAG                 IMAGE ID            CREATED             SIZE
   ddeep3m                 latest              1dc19b05aa93        24 hours ago        4.4GB

NOTE:

(1) depending on the bandwidth of network connection, the building process might take up to ~30 mins. So a little patience is appreciated.

(2) if something goes wrong during building the image, the quickest solution is to remove the temporary container and image, and then, re-run the above command.

How to use the DDeep3M?

  1. run the DDeep3M image and obtain an interactive bash prompt in the container
   nvidia-docker run -it ddeep3m:latest bash
  1. enter the default working directory in the container
   cd /usr/local/src/cdeep3m-1.6.2
  1. obtain the MOST sample data
   wget 'https://1drv.ms/u/s!Av8_YAWBQpg7enAkjXEdJ8mw37Q'
   unzip ddeep3m_most_dataset.zip
  1. pre-process the training data of SOMA with augmentation
   ./PreprocessTrainingData.m ./most/soma/train/images ./most/soma/train/labels ./soma_augmented/ 
  1. run the model with training data
   ./runtraining.sh --numiterations 10 ./soma_augmented/ ./soma_trainout 
  1. predict the test data with trained model
   ./runprediction.sh ./soma_trainout ./most/soma/test/images ./soma_predictout/ 

To use the pre-trained model

  1. set up a new directory in the container
   cd /usr/local/src
   mkdir model
   cd model
  1. obtain the pre-trained model weight trained for SOMA in MOST
   wget 'https://1drv.ms/u/s!Av8_YAWBQpg7eZMDQ0OMwGG3qTk'

or the model weight trained for VESSEL in MOST

   wget 'https://1drv.ms/u/s!Av8_YAWBQpg7ePVrPZeUSB7RmPo'

or the model weight trained for brain tumors in BraTS19

  wget 'https://1drv.ms/u/s!Av8_YAWBQpg7gQDeF6w9_1lnaMZE'

or directly to download the model weight for soma, vessel and brain tumors.

  1. untar the model weight file
   tar -zxvf ddeep3m_MOST_soma_30k.tar.gz
  1. use the pre-trained model to predict the new data
   cd /usr/local/src
   ./runprediction.sh ./model/most_soma_30k ./most/soma/test/images ./soma_predictout/ 

To use your own data

In case you want to use DDeep3M with your own dataset, here are the steps you might want to follow:

  1. organize the directory of your own dataset as
   data/
       train/
            images/
                  x001.png
                  x002.png
                  ...
            labels/
                  x001.png
                  x002.png
                  ...
      valid/
            images/
                  x001.png
                  x002.png
                  ...
            labels/
                  x001.png
                  x002.png
                  ...           
  1. for image stack, use either ImageJ to generate a sequence of images with PNG format, or use IMOD program to extract images continously with "mrc2tif" command as suggested here:
   mkdir -p train/images
   mkdir train/labels

   mrc2tif -p train.tif train/images/x
   mrc2tif -p labels.tif train/labels/x
  1. to train the model with your own data
   cd /usr/local/src/cdeep3m-1.6.2
   ./PreprocessTrainingData.m ./data/train/images ./data/train/labels ./augmented/ 
   ./runtraining.sh --numiterations 10 ./augmented/ ./trainout 

Who are we?

DDeep3M is proposed and maintained by researchers from WIT/WTU and HUST.

License

See LICENSE for DDeep3M

ddeep3m's People

Contributors

cakuba avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ddeep3m's Issues

Ask for MetastasisPrediction_DeepLearning code

Dear cakuba, I just read your paper named 《Predicting Lymph Node Metastasis from Primary Breast Cancer US Images with Deep Learning4radiology.》. Good work, I am learning your method. Can you send me a copy of your code? Thanks!

How to configure label_class_selection.prototxt

Hi,

I got a question about the labelclassselection.prototxt

I see the parameter at train_val.prototxt.

image

and it refers to(I have changed some parameter but please don't mind it)

image

Is there any document about how to adjust the labelclassselection.prototxt?

I try to search for some information related to this file, and I got
cdeep3m which cite DeepEM3D and it also cite another project,that is Xiaomi2008/caffe_nd_sense_segmentation
but there isn't any description of it.

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.