This repo is for segmentation of T2 hyp regions in gliomas.

By downloading the model from here you can use it to segment your T2w images of gliomas. Our model is independent from the input image size.

We reached 89.88% of dice score on the traning set and 82.9% dice score on the validation set. The results we show in the following are from the test set.

Red channel represents the dilated output. We used (5,5,2) kernel to dilate the image. Hence, it is possible to see more slices segmented as t2 hyper regions. Green channel is the output of the model after post-processing. Blue channel is the ground-truth segmentation.

Briefly we can conclude that white regions on right hand side in the following GIFs are the places that the model hit the ground truth. We added 1 very good, 1 average and 1 bad examples.

Very good one!




Bad one


For inference;

git clone https://github.com/Computational-Imaging-LAB/T2-Hyp-Segmentor/

cd T2-Hyp-Segmentor

pip install -r requirements.txt

If you want to test the output then use,

python inference.py --model <model_path> --input <input_nii_path> --output <output_path> --seg <seg_nii_path>

If you want to use the model to segment

python inference.py --model <model_path> --input <input_nii_path> --output <output_path>

GitHub - Computational-Imaging-LAB/T2-Hyp-Segmentor at pythonawesome.com
This repo is for segmentation of T2 hyp regions in gliomas. - GitHub - Computational-Imaging-LAB/T2-Hyp-Segmentor at pythonawesome.com