Brain MRI Segmentation - FLAIR Abnormality Segmentation v1.0.0
This repository hosts the trained model for FLAIR Abnormality Segmentation in Brain MRI scans. The model is a U-Net architecture with a MobileNetV2 encoder pretrained on ImageNet, designed to segment FLAIR abnormalities from MRI images effectively.
Model Details
- Architecture: U-Net with MobileNetV2 encoder and custom decoder layers.
- Dataset: LGG Segmentation Dataset
- Version: v1.0.0
- Task: Image Segmentation
- License: Apache 2.0
Usage
To use this model for inference, you can load it using the tensorflow
library.
# Clones the repository and install dependencies
!git clone https://huggingface.co/preethamganesh/bms-flair-abnormality-segmentation-v1.0.0
!pip install tensorflow
# Imports TensorFlow
import tensorflow as tf
# Loads the pre-trained model from the cloned directory
model_path = "bms-flair-abnormality-segmentation-v1.0.0"
exported_model = tf.saved_model.load(model_path)
# Retrieves the default serving function from the loaded model
model = exported_model.signatures["serving_default"]
# Prepares a dummy input tensor for inference (batch size: 1, height: 256, width: 256, channels: 3)
input_data = tf.ones((1, 256, 256, 3), dtype=tf.float32)
# Performs inference using the model. The output will be a dictionary, with the segmentation map in the key 'output_0'
output = model(input_data)["output_0"]
# Prints the shape of the output tensor for verification
print("Output shape:", output.shape)
Training Details
Compute
- The model was trained on a GeForce 4070Ti GPU with 16GB VRAM.
- Training completed in approximately 4.9 minutes over 24 epochs.
Dataset
- The model was trained on the LGG Segmentation Dataset, which includes Brain MRI images labeled for FLAIR abnormality segmentation.
- Only images with positive FLAIR abnormalities were selected for training.
Performance on test set
- Dice Coefficient: 0.77
- Intersection over Union (IoU): 0.62
Citation
If you use this model in your research, please cite the repository:
@misc{preethamganesh2024brainmri,
title={Brain MRI Segmentation - FLAIR Abnormality Segmentation},
author={Preetham Ganesh},
year={2025},
url={https://huggingface.co/preethamganesh/brain-mri-flair-abnormality-segmentation-v1.0.0},
note={Apache-2.0 License}
}
Contact
For any questions or support, please contact [email protected].
- Downloads last month
- 5
Inference Providers
NEW
This model is not currently available via any of the supported third-party Inference Providers, and
HF Inference API was unable to determine this model’s pipeline type.
Evaluation results
- Dice Coefficient on LGG Segmentation Datasetself-reported0.770
- Intersection over Union (IoU) on LGG Segmentation Datasetself-reported0.620