a b/README.md
1
# Brain segmentation
2
3
This is a source code for the deep learning segmentation used in the paper [Association of genomic subtypes of lower-grade gliomas with shape features automatically extracted by a deep learning algorithm.](https://doi.org/10.1016/j.compbiomed.2019.05.002)
4
It employs a U-Net like network for skull stripping and FLAIR abnormality segmentation.
5
This repository contains a set of functions for data preprocessing (MatLab), training and inference (Python).
6
Weights for trained models are provided and can be used for deep learning based skull stripping or fine-tuning on a different dataset.
7
If you use our model or weights, please cite:
8
9
```
10
@article{buda2019association,
11
  title={Association of genomic subtypes of lower-grade gliomas with shape features automatically extracted by a deep learning algorithm},
12
  author={Buda, Mateusz and Saha, Ashirbani and Mazurowski, Maciej A},
13
  journal={Computers in Biology and Medicine},
14
  volume={109},
15
  year={2019},
16
  publisher={Elsevier},
17
  doi={10.1016/j.compbiomed.2019.05.002}
18
}
19
```
20
21
Developed by [mateuszbuda](https://github.com/mateuszbuda).
22
23
The repository is divided into two folders.
24
One for skull stripping and one for FLAIR abnormality segmentation.
25
They are based on the same model architecture but can be used separately.
26
27
## Prerequisites
28
29
- MatLab 2016b for pre-processing
30
- Python 2 with dependencies listed in the `requirements.txt` file
31
```
32
sudo pip install -r requirements.txt
33
```
34
35
## Results
36
37
Below we show qualitative results for the average and median case.
38
Blue outline corresponds to ground truth and red to the final automatic segmentation output.
39
Images show FLAIR modality after preprocessing and skull stripping.
40
41
| Average Case | Median Case |
42
|:----------:|:---------:|
43
|![Average case](CS_6669.gif)|![Median case](HT_7473.gif)|
44
45
The distribution of Dice similarity coefficient (DSC) for the whole dataset of 110 cases used in our study.
46
47
![DSC distribution](DSC_distribution.png)
48
49
The red vertical line corresponds to mean DSC (83.60%) and the green one to median DSC (87.33%).
50
51
## Trained weights
52
53
To download trained weights use `download_weights.sh` script located in both skull stripping or flair segmentation folder.
54
It downloads *.h5 file with weights corresponding to training log shown in each task specific folder and responsible for the results reported there.
55
56
## U-Net architecture
57
58
The figure below shows a U-Net architecture implemented in this repository.
59
60
![unet](unet.png)
61
62
## Data
63
64
![brain-mri-lgg](brain-mri-lgg.png)
65
66
[kaggle.com/mateuszbuda/lgg-mri-segmentation](https://www.kaggle.com/mateuszbuda/lgg-mri-segmentation)