• Stars
    star
    503
  • Rank 87,705 (Top 2 %)
  • Language
    Python
  • Created over 7 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

U-Net Brain Tumor Segmentation

U-Net Brain Tumor Segmentation

🚀:Feb 2019 the data processing implementation in this repo is not the fastest way (code need update, contribution is welcome), you can use TensorFlow dataset API instead.

This repo show you how to train a U-Net for brain tumor segmentation. By default, you need to download the training set of BRATS 2017 dataset, which have 210 HGG and 75 LGG volumes, and put the data folder along with all scripts.

data
  -- Brats17TrainingData
  -- train_dev_all
model.py
train.py
...

About the data

Note that according to the license, user have to apply the dataset from BRAST, please do NOT contact me for the dataset. Many thanks.


Fig 1: Brain Image
  • Each volume have 4 scanning images: FLAIR、T1、T1c and T2.
  • Each volume have 4 segmentation labels:
Label 0: background
Label 1: necrotic and non-enhancing tumor
Label 2: edema 
Label 4: enhancing tumor

The prepare_data_with_valid.py split the training set into 2 folds for training and validating. By default, it will use only half of the data for the sake of training speed, if you want to use all data, just change DATA_SIZE = 'half' to all.

About the method


Fig 2: Data augmentation

Start training

We train HGG and LGG together, as one network only have one task, set the task to all, necrotic, edema or enhance, "all" means learn to segment all tumors.

python train.py --task=all

Note that, if the loss stick on 1 at the beginning, it means the network doesn't converge to near-perfect accuracy, please try restart it.

Citation

If you find this project useful, we would be grateful if you cite the TensorLayer paper:

@article{tensorlayer2017,
author = {Dong, Hao and Supratak, Akara and Mai, Luo and Liu, Fangde and Oehmichen, Axel and Yu, Simiao and Guo, Yike},
journal = {ACM Multimedia},
title = {{TensorLayer: A Versatile Library for Efficient Deep Learning Development}},
url = {http://tensorlayer.org},
year = {2017}
}

More Repositories

1

text-to-image

Generative Adversarial Text to Image Synthesis / Please Star -->
Python
598
star
2

deep-learning-book

《Deep Learning》《深度学习》 by Ian Goodfellow, Yoshua Bengio and Aaron Courville
557
star
3

research-and-coding

研究资源列表 A curated list of research resources
168
star
4

Image-Captioning

TensorFlow (TensorLayer) Implementation of Image Captioning
Python
115
star
5

Unsup-Im2Im

Unsupervised Image to Image Translation with Generative Adversarial Networks
Python
73
star
6

Imitation-Learning-Dagger-Torcs

A Simple Example for Imitation Learning with Dataset Aggregation (DAGGER) on Torcs Env
Python
71
star
7

Spatial-Transformer-Nets

Spatial Transformer Nets in TensorFlow/ TensorLayer
Python
36
star
8

im2txt2im

I2T2I: Text-to-Image Synthesis with textual data augmentation
Python
30
star
9

deep-learning-note

Slides and codes
Python
20
star
10

U-Net

U-Net: Convolutional Networks for Image Segmentation by TensorFlow
Python
19
star
11

ChatServerTCP

保密型聊天软件服务器 /Private Chat Server
Python
17
star
12

EmotivEPOC

Emotiv EPOC 脑电仪代码 / Code for Emotiv EPOC
C++
14
star
13

pybluez

How to use pybluez
Python
12
star
14

zsdonghao.github.io

Click this --> https://zsdonghao.github.io
HTML
8
star
15

stackednet

轻量、易于修改、可组层训练的神经网络 / Lightweight Greedy Layer-Wise Training Neural Network
Python
7
star
16

practice-lesson

6
star
17

ImageMosaic

手动图像拼接工具 / Manual Image Mosaic Tool
MATLAB
6
star
18

lego-zoo

LEGO MOC DIY COLLECTION
3
star
19

DL-course

Python
2
star
20

DropNeuron

DropNeuron (DropFilter) : Simplify Convolutional Neural Network
Python
2
star
21

pix2pix

Python
2
star
22

hdmlp

几乎集成所有功能的多层神经网络 / A powerful and easy-to-use Multi-Layer Perceptron (MLP)
2
star
23

pyedfreader

Read EDF and EDF+ File by using Python
Python
1
star
24

oldwatch

古典电子手表表:进入21世纪10年代,电子工业发展迅猛;2010年后,智能手表更是迎来飞速的发展,这唤起了作者对八九十年代传统电子工程的怀恋,于是作者决定使用最老的单片机之一 “MCU-51” 来手工制作一款万年历电子表。
C
1
star
25

python_with_other_language

How to use Python and Other languages together
C
1
star