Preetham Ganesh
updated README.
f70b149
|
raw
history blame
3.23 kB
---
license: apache-2.0
tags:
- brain-mri
- classification
- medical-imaging
- deep-learning
- cnn
model-index:
- name: Brain MRI Classification - FLAIR Abnormality Classification
results:
- task:
type: image-classification
name: Image Classification
dataset:
name: LGG Segmentation Dataset
type: medical-imaging
link: https://www.kaggle.com/datasets/mateuszbuda/lgg-mri-segmentation
metrics:
- type: accuracy
value: 0.958
name: Accuracy
---
# 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](https://www.kaggle.com/datasets/mateuszbuda/lgg-mri-segmentation)
- **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.
```bash
# 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()
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.8 minutes over 20 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.
### Performance on test set
- **Accuracy:** 0.958
## Citation
If you use this model in your research, please cite the repository:
```bash
@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].