Switch to unified view

a/README.md b/README.md
1
# Fully automatic Brain tumor segmentation
1
# Fully automatic Brain tumor segmentation
2
2
3
### Brief overview
3
### Brief overview
4
4
5
This repository provides source code for a deep convolutional neural network architecture designed for brain tumor segmentation with BraTS2017 dataset. 
5
This repository provides source code for a deep convolutional neural network architecture designed for brain tumor segmentation with BraTS2017 dataset. 
6
The architecture is fully convolutional network (FCN) built upon the well-known U-net model and it makes use of residual units instead of plain units to speedup training and convergence.
6
The architecture is fully convolutional network (FCN) built upon the well-known U-net model and it makes use of residual units instead of plain units to speedup training and convergence.
7
The Brain tumor segmentation problem exhibits severe class imbalance where the healthy voxels comprise 98% of total voxels,0.18% belongs to necrosis ,1.1% to edema and non-enhanced and 0.38% to enhanced tumor. 
7
The Brain tumor segmentation problem exhibits severe class imbalance where the healthy voxels comprise 98% of total voxels,0.18% belongs to necrosis ,1.1% to edema and non-enhanced and 0.38% to enhanced tumor. 
8
The issue is addressed by: 1) adopting a patch-based training approach; 2) using a custom loss function that accounts for the imbalance. 
8
The issue is addressed by: 1) adopting a patch-based training approach; 2) using a custom loss function that accounts for the imbalance. 
9
During training, 2D patches of size 128x128 from the axial plane are randomly sampled. And by doing so it allows to dismiss patches from pixels with zero intensity and therefore it helps a bit to alleviate the problem.
9
During training, 2D patches of size 128x128 from the axial plane are randomly sampled. And by doing so it allows to dismiss patches from pixels with zero intensity and therefore it helps a bit to alleviate the problem.
10
10
11
The implementation is based on keras and tested on both Theano and Tensorflow backends.
11
The implementation is based on keras and tested on both Theano and Tensorflow backends.
12
12
13
Here are some results predicted by a model trained for 2 epochs :
13
Here are some results predicted by a model trained for 2 epochs :
14
14
15
*   **HGG cases** :
15
*   **HGG cases** :
16
16
17
![Optional Text](../master/docs/images/HGG-Brats17_2013_7_1-111.png)
17
![Optional Text](https://github.com/Issam28/Brain-tumor-segmentation/blob/master/docs/images/HGG-Brats17_2013_7_1-111.png?raw=true)
18
![Optional Text](../master/docs/images/HGG-Brats17_CBICA_ASV_1-88.png)
18
![Optional Text](https://github.com/Issam28/Brain-tumor-segmentation/blob/master/docs/images/HGG-Brats17_CBICA_ASV_1-88.png?raw=true)
19
![Optional Text](../master/docs/images/HGG-Brats17_TCIA_186_1-90.png)
19
![Optional Text](https://github.com/Issam28/Brain-tumor-segmentation/blob/master/docs/images/HGG-Brats17_TCIA_186_1-90.png?raw=true)
20
20
21
*   **LGG cases** :
21
*   **LGG cases** :
22
22
23
![Optional Text](../master/docs/images/LGG-Brats17_TCIA_202_1-70.png)
23
![Optional Text](https://github.com/Issam28/Brain-tumor-segmentation/blob/master/docs/images/LGG-Brats17_TCIA_202_1-70.png?raw=true)
24
![Optional Text](../master/docs/images/LGG-Brats17_2013_24_1-91.png)
24
![Optional Text](https://github.com/Issam28/Brain-tumor-segmentation/blob/master/docs/images/LGG-Brats17_2013_24_1-91.png?raw=true)
25
![Optional Text](../master/docs/images/LGG-Brats17_TCIA_462_1-97.png)
25
![Optional Text](https://github.com/Issam28/Brain-tumor-segmentation/blob/master/docs/images/LGG-Brats17_TCIA_462_1-97.png?raw=true)
26
26
27
### Requirements
27
### Requirements
28
28
29
To run the code, you first need to install the following prerequisites: 
29
To run the code, you first need to install the following prerequisites: 
30
30
31
* Python 3.5 or above
31
* Python 3.5 or above
32
* numpy
32
* numpy
33
* keras
33
* keras
34
* scipy
34
* scipy
35
* SimpleITK
35
* SimpleITK
36
36
37
### How to run
37
### How to run
38
38
39
1. Execute first `extract_patches.py` to prepare the training and validation datasets.
39
1. Execute first `extract_patches.py` to prepare the training and validation datasets.
40
2. then `train.py` to train the model.
40
2. then `train.py` to train the model.
41
3. `predict.py` to make final predictions.
41
3. `predict.py` to make final predictions.
42
42
43
```
43
```
44
python extract_patches.py
44
python extract_patches.py
45
python train.py
45
python train.py
46
python predict.py
46
python predict.py
47
```
47
```
48
### How to cite 
48
### How to cite 
49
49
50
This code is an implementation of [this paper](https://link.springer.com/chapter/10.1007/978-3-030-11726-9_4). If you find this code useful in your research, please consider citing: 
50
This code is an implementation of [this paper](https://link.springer.com/chapter/10.1007/978-3-030-11726-9_4). If you find this code useful in your research, please consider citing: 
51
51
52
```
52
```
53
@inproceedings{kermi2018deep,
53
@inproceedings{kermi2018deep,
54
  title={Deep Convolutional Neural Networks Using U-Net for Automatic Brain Tumor Segmentation in Multimodal MRI Volumes},
54
  title={Deep Convolutional Neural Networks Using U-Net for Automatic Brain Tumor Segmentation in Multimodal MRI Volumes},
55
  author={Kermi, Adel and Mahmoudi, Issam and Khadir, Mohamed Tarek},
55
  author={Kermi, Adel and Mahmoudi, Issam and Khadir, Mohamed Tarek},
56
  booktitle={International MICCAI Brainlesion Workshop},
56
  booktitle={International MICCAI Brainlesion Workshop},
57
  pages={37--48},
57
  pages={37--48},
58
  year={2018},
58
  year={2018},
59
  organization={Springer}
59
  organization={Springer}
60
}
60
}
61
```
61
```