|
---
|
|
license: apache-2.0
|
|
tags:
|
|
- brain-mri
|
|
- segmentation
|
|
- medical-imaging
|
|
- deep-learning
|
|
- unet
|
|
base_model: "tf-keras/imagenet-mobilenetv2"
|
|
model-index:
|
|
- name: Brain MRI Segmentation - FLAIR Abnormality Segmentation
|
|
results:
|
|
- task:
|
|
type: image-segmentation
|
|
name: Image Segmentation
|
|
dataset:
|
|
name: LGG Segmentation Dataset
|
|
type: medical-imaging
|
|
link: https://www.kaggle.com/datasets/mateuszbuda/lgg-mri-segmentation
|
|
metrics:
|
|
- type: dice
|
|
value: 0.77
|
|
name: Dice Coefficient
|
|
- type: iou
|
|
value: 0.62
|
|
name: Intersection over Union (IoU)
|
|
---
|
|
|
|
# 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](https://www.kaggle.com/datasets/mateuszbuda/lgg-mri-segmentation)
|
|
- **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.
|
|
|
|
```bash
|
|
# 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](https://www.kaggle.com/datasets/mateuszbuda/lgg-mri-segmentation), 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:
|
|
|
|
```bash
|
|
@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].
|
|
|