Giter Club home page Giter Club logo

brain-tumor-segmentation-unet's Introduction

Brain tumor segmentation in MRI images using U-Net

Here, I have implemented a U-Net from the paper "U-Net: Convolutional Networks for Biomedical Image Segmentation" to segment tumor in MRI images of brain.

There are 3 types of brain tumor:

  1. meningioma
  2. glioma
  3. pituitary tumor

Examples of predicted tumor segment by the current U-Net implementation.

meningioma glioma pituitary tumor

Getting Started

Here I will explain how to get the data and convert it into the usable form. You can run the train and run model using notebook.

Prerequisites

You will need Python 3.X.X with some packages which you can install direclty using requirements.txt.

pip install -r requirements.txt

Get the Dataset

I have used brain-tumor segment dataset which is available on the internet. You can run download_data.sh shell script to download all data. It contains 3064 MRI images and 3064 masks.

bash tumor-segmentation-unet/download_data.sh

After that run the following command to convert data in useable form.

python tumor-segmentation-unet/mat_to_numpy.py brain_tumor_dataset/

Model Architecture

I have used combination of multiple losses which includes binary crossentropy, dice loss with equal weightage. Also I have used Conv2D transpose layers for upsampling.

I have used the metric called IOU (Intersection over Union) metric to track progress of training and trained Unet with Adam optimizer for 40-60 epochs with decaying learning rate between 1e-3 to 1e-4. I have also performed only one Image augmentation i.e. horizontal flip. Train and test split was stratified using type of tumor.

Performance

Detailed architecure is given below. Unet Architecture

Possible Improvements

  1. Can use transfer learning to utilize state-of-the-art model like VGG, Inception, Resnet.
  2. We can use more types of image augmentation like vertical flip, brightness, zoom etc.
  3. Include lovasz loss with higher weightage.
  4. Learn and use Hypercolumns

Author:

To Read:

  1. U-Net: Convolutional Networks for Biomedical Image Segmentation
  2. Image Segmentation, ConvNet, FCN, Unet
  3. Up-sampling with Transposed Convolution
  4. Lovasz Loss
  5. Jaccard Index - Intesection over Union
  6. Understanding Dice Loss
  7. Another Image Segmentation Problem

brain-tumor-segmentation-unet's People

Contributors

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