# 3D MRI Brain Tumor Segmentation Using Autoencoder Regularization
[![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/3d-mri-brain-tumor-segmentation-using/brain-tumor-segmentation-on-brats-2018)](https://paperswithcode.com/sota/brain-tumor-segmentation-on-brats-2018?p=3d-mri-brain-tumor-segmentation-using)
![Keras](https://img.shields.io/badge/Implemented%20in-Keras-red.svg)
## *[No longer under active development since 2020!]*
![The model architecture](https://www.suyogjadhav.com/images/misc/brats2018_sota_model.png)
<center><b>The Model Architecture</b></center><br /><center>Source: https://arxiv.org/pdf/1810.11654.pdf</center>
<br /><br />
Keras implementation of the paper <b>3D MRI brain tumor segmentation using autoencoder regularization</b> by Myronenko A. (https://arxiv.org/abs/1810.11654). The author (team name: <b>NVDLMED</b>) ranked #1 on the <a href="https://www.med.upenn.edu/sbia/brats2018/" target="_blank">BraTS 2018</a> 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`](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`.
```python
from model import build_model
```
It will automatically download an additional script needed for the implementation, namely [`group_norm.py`](https://github.com/titu1994/Keras-Group-Normalization/blob/master/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 <b>channels-first</b> 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 2<sup>4</sup>, i.e., 16.
This is to get correct output shape according to the model.
4. Now to create the model, simply run:
```python
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](Example_on_BRATS2018.ipynb) 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](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/IAmSuyogJadhav/3d-mri-brain-tumor-segmentation-using-autoencoder-regularization/blob/master/Example_on_BRATS2018.ipynb)
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](https://github.com/IAmSuyogJadhav/3d-mri-brain-tumor-segmentation-using-autoencoder-regularization/issues/new).
# Updates
- Thanks to [@Crispy13](https://github.com/Crispy13), issues #29 and #24 are now fixed. VAE branch output was earlier not being included in the model's output. The current format model gives out two outputs: the segmentation map and the VAE output. The VAE branch weights were not being trained for some reason. The issue should be fixed now. Dice score calculation is slightly modified to work for any batch size. SpatialDropout3D is now used instead of Dropout, as specified in the paper.
- Added an [example notebook](Example_on_BRATS2018.ipynb) 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](https://github.com/woodywff) and [@doc78](https://github.com/doc78).
- Thanks to [@doc78](https://github.com/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.
没有合适的资源?快使用搜索试试~ 我知道了~
MyronenkoA.(httpsarxiv.orgabs1810.11654)论文“使用自动编码器正则化进行3DMRI.zip
共6个文件
py:2个
gitignore:1个
ipynb:1个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 201 浏览量
2023-04-30
23:58:18
上传
评论
收藏 29KB ZIP 举报
温馨提示
MyronenkoA.(httpsarxiv.orgabs1810.11654)论文“使用自动编码器正则化进行3DMRI.zip
资源推荐
资源详情
资源评论
收起资源包目录
MyronenkoA.(httpsarxiv.orgabs1810.11654)论文“使用自动编码器正则化进行3DMRI.zip (6个子文件)
3d-mri-brain-tumor-segmentation-using-autoencoder-regularization-master
Example_on_BRATS2018.ipynb 43KB
LICENSE 1KB
model.py 16KB
group_norm.py 8KB
.gitignore 1KB
README.md 4KB
共 6 条
- 1
资源评论
快撑死的鱼
- 粉丝: 1w+
- 资源: 9154
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功