Spaces:
Build error
Build error
Update description in app.py and try examples again
Browse files- app.py +8 -13
- examples/log.csv +2 -0
app.py
CHANGED
|
@@ -21,11 +21,6 @@ description = """
|
|
| 21 |
## Brain Tumor Segmentation π§
|
| 22 |
A pre-trained model for volumetric (3D) segmentation of brain tumor subregions from multimodal MRIs based on BraTS 2018 data.
|
| 23 |
|
| 24 |
-
The model is trained to segment 3 nested subregions of primary brain tumors (gliomas): the "enhancing tumor" (ET), the "tumor core" (TC), the "whole tumor" (WT) based on 4 aligned input MRI scans (T1c, T1, T2, FLAIR).
|
| 25 |
-
- The ET is described by areas that show hyper intensity in T1c when compared to T1, but also when compared to "healthy" white matter in T1c.
|
| 26 |
-
- The TC describes the bulk of the tumor, which is what is typically resected. The TC entails the ET, as well as the necrotic (fluid-filled) and the non-enhancing (solid) parts of the tumor.
|
| 27 |
-
- The WT describes the complete extent of the disease, as it entails the TC and the peritumoral edema (ED), which is typically depicted by hyper-intense signal in FLAIR.
|
| 28 |
-
|
| 29 |
## To run π
|
| 30 |
|
| 31 |
Upload a image file in the format: 4 channel MRI (4 aligned MRIs T1c, T1, T2, FLAIR at 1x1x1 mm)
|
|
@@ -36,9 +31,9 @@ This is an example, not to be used for diagnostic purposes.
|
|
| 36 |
|
| 37 |
## References π
|
| 38 |
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
"""
|
| 43 |
|
| 44 |
#examples = 'examples/'
|
|
@@ -94,19 +89,19 @@ def predict(input_file, z_axis, model=model, device=device):
|
|
| 94 |
#pred_et_image = pred_image[0, 1, :, :, z_axis]
|
| 95 |
#pred_wt_image = pred_image[0, 2, :, :, z_axis]
|
| 96 |
|
| 97 |
-
return input_t1c_image, pred_tc_image,
|
| 98 |
|
| 99 |
|
| 100 |
iface = gr.Interface(
|
| 101 |
fn=predict,
|
| 102 |
inputs=[
|
| 103 |
-
gr.File(label='
|
| 104 |
gr.Slider(0, 200, label='z-axis', value=100)
|
| 105 |
],
|
| 106 |
outputs=[
|
| 107 |
-
gr.Image(label='
|
| 108 |
-
gr.Image(label='
|
| 109 |
-
|
| 110 |
title=title,
|
| 111 |
description=description,
|
| 112 |
#examples=examples,
|
|
|
|
| 21 |
## Brain Tumor Segmentation π§
|
| 22 |
A pre-trained model for volumetric (3D) segmentation of brain tumor subregions from multimodal MRIs based on BraTS 2018 data.
|
| 23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
## To run π
|
| 25 |
|
| 26 |
Upload a image file in the format: 4 channel MRI (4 aligned MRIs T1c, T1, T2, FLAIR at 1x1x1 mm)
|
|
|
|
| 31 |
|
| 32 |
## References π
|
| 33 |
|
| 34 |
+
1. Myronenko, Andriy. "3D MRI brain tumor segmentation using autoencoder regularization." International MICCAI Brainlesion Workshop. Springer, Cham, 2018. https://arxiv.org/abs/1810.11654.
|
| 35 |
+
2. Menze BH, et al. "The Multimodal Brain Tumor Image Segmentation Benchmark (BRATS)", IEEE Transactions on Medical Imaging 34(10), 1993-2024 (2015) DOI: 10.1109/TMI.2014.2377694
|
| 36 |
+
3. Bakas S, et al. "Advancing The Cancer Genome Atlas glioma MRI collections with expert segmentation labels and radiomic features", Nature Scientific Data, 4:170117 (2017) DOI:10.1038/sdata.2017.117
|
| 37 |
"""
|
| 38 |
|
| 39 |
#examples = 'examples/'
|
|
|
|
| 89 |
#pred_et_image = pred_image[0, 1, :, :, z_axis]
|
| 90 |
#pred_wt_image = pred_image[0, 2, :, :, z_axis]
|
| 91 |
|
| 92 |
+
return input_t1c_image, pred_tc_image,
|
| 93 |
|
| 94 |
|
| 95 |
iface = gr.Interface(
|
| 96 |
fn=predict,
|
| 97 |
inputs=[
|
| 98 |
+
gr.File(label='Input file'),
|
| 99 |
gr.Slider(0, 200, label='z-axis', value=100)
|
| 100 |
],
|
| 101 |
outputs=[
|
| 102 |
+
gr.Image(label='T1C image'),
|
| 103 |
+
gr.Image(label='Segmentation'),
|
| 104 |
+
],
|
| 105 |
title=title,
|
| 106 |
description=description,
|
| 107 |
#examples=examples,
|
examples/log.csv
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
input_file
|
| 2 |
+
BRATS_485.nii.gz
|