GithubHelp home page GithubHelp logo

jdc08161063 / 3d-mri-brain-tumor-segmentation-using-autoencoder-regularization Goto Github PK

View Code? Open in Web Editor NEW

This project forked from iamsuyogjadhav/3d-mri-brain-tumor-segmentation-using-autoencoder-regularization

0.0 1.0 0.0 71 KB

Keras implementation of the paper "3D MRI brain tumor segmentation using autoencoder regularization" by Myronenko A. (https://arxiv.org/abs/1810.11654).

Python 35.24% Jupyter Notebook 64.76%

3d-mri-brain-tumor-segmentation-using-autoencoder-regularization's Introduction

3D MRI Brain Tumor Segmentation Using Autoencoder Regularization

PWC Keras

The model architecture

The Model Architecture
Source: https://arxiv.org/pdf/1810.11654.pdf

Keras implementation of the paper 3D MRI brain tumor segmentation using autoencoder regularization by Myronenko A. (https://arxiv.org/abs/1810.11654). The author (team name: NVDLMED) ranked #1 on the BraTS 2018 leaderboard using the model described in the paper.

This repository contains the model complete with the loss function, all implemented end-to-end in Keras. The usage is described in the next section.

Usage

  1. Download the file model.py and keep in the same folder as your project notebook/script.

  2. In your python script, import build_model function from model.py.

    from model import build_model

    It will automatically download an additional script needed for the implementation, group_norm.py, which contains keras implementation for the group normalization layer.

  3. Note that the input MRI scans you are going to feed need to have 4 dimensions, with channels-first format. i.e., the shape should look like (c, H, W, D), where:

  • c, the no.of channels are divisible by 4.
  • H, W, D, which are height, width and depth, respectively, are all divisible by 24, i.e., 16. This is to get correct output shape according to the model.
  1. Now to create the model, simply run:

    model = build_model(input_shape, output_channels)

    where, input_shape is a 4-tuple (channels, Height, Width, Depth) and output_channels is the no. of channels in the output of the model. The output of the model will be the segmentation map generated by the model with the shape (output_channels, Height, Width, Depth), where Height, Width and Depth will be same as that of the input.

Example on BraTS2018 dataset

Go through the Example_on_BRATS2018 notebook to see an example where this model is used on the BraTS2018 dataset.

You can also test-run the example on Google Colaboratory by clicking the following button.

Open In Colab

However, note that you will need to have access to the BraTS2018 dataset before running the example on Google Colaboratory. If you already have access to the dataset, You can simply upload the dataset to Google Drive and input the dataset path in the example notebook.

Issues

If you encounter any issue or have a feedback, please don't hesitate to raise an issue.

Updates

  • Added an example notebook showing how to run the model on the BraTS2018 dataset.
  • Added a minus term before loss_dice in the loss function. From discussion in #7 with @woodywff and @doc78.
  • Thanks to @doc78 , the NaN loss problem has been permanently fixed.
  • The NaN loss problem has now been fixed (clipping the activations for now).
  • Added an argument in the build_model function to allow for different no. of channels in the output.

3d-mri-brain-tumor-segmentation-using-autoencoder-regularization's People

Contributors

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