Brain MRI Classification - FLAIR Abnormality Classification v1.2.0
This repository hosts the trained model for FLAIR Abnormality Classification in Brain MRI scans. The model is a CNN-based architecture designed to classify Brain MRI images as normal or abnormal (FLAIR abnormality).
Model Details
- Architecture: A CNN model that classifies whether a given Brain MRI image has abnormality.
- Dataset: LGG Segmentation Dataset
- Version: v1.2.0
- Task: Image Classification
- License: Apache 2.0
Usage
To use this model for inference, you can load it using the tensorflow
library.
# Clones the repository and installs dependencies
!git clone https://huggingface.co/preethamganesh/bms-flair-abnormality-classification-v1.2.0
!pip install tensorflow
# Imports TensorFlow
import tensorflow as tf
# Loads the pre-trained model from the cloned directory
model_path = "bms-flair-abnormality-classification-v1.2.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 classification logits in the key 'output_0'
output = model(input_data)["output_0"]
# Prints the predicted class (e.g., 0 for normal, 1 for abnormal)
predicted_class = tf.argmax(output, axis=-1).numpy()[0]
print("Predicted class: ", predicted_class)
Training Details
Compute
- The model was trained on a GeForce 4070Ti GPU with 16GB VRAM.
- Training completed in approximately 1.6 minutes over 17 epochs.
Dataset
- The model was trained on the LGG Segmentation Dataset, which includes Brain MRI images labeled for FLAIR abnormality segmentation.
Performance on test set
- Accuracy: 0.953
Citation
If you use this model in your research, please cite the repository:
@misc{preethamganesh2024brainmri,
title={Brain MRI Segmentation - FLAIR Abnormality Classification},
author={Preetham Ganesh},
year={2025},
url={https://huggingface.co/preethamganesh/brain-mri-flair-abnormality-classification-v1.2.0},
note={Apache-2.0 License}
}
Contact
For any questions or support, please contact [email protected].
- Downloads last month
- 4
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
- Accuracy on LGG Segmentation Datasetself-reported0.953