Preetham Ganesh commited on
Commit
3a6cfb3
·
1 Parent(s): 5778cea

added README.

Browse files
Files changed (1) hide show
  1. README.md +95 -0
README.md CHANGED
@@ -1,3 +1,98 @@
1
  ---
2
  license: apache-2.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
+ tags:
4
+ - brain-mri
5
+ - classification
6
+ - medical-imaging
7
+ - deep-learning
8
+ - cnn
9
+ model-index:
10
+ - name: Brain MRI Classification - FLAIR Abnormality Classification
11
+ results:
12
+ - task:
13
+ type: image-classification
14
+ name: Image Classification
15
+ dataset:
16
+ name: LGG Segmentation Dataset
17
+ type: medical-imaging
18
+ link: https://www.kaggle.com/datasets/mateuszbuda/lgg-mri-segmentation
19
+ metrics:
20
+ - type: accuracy
21
+ value: 0.958
22
+ name: Accuracy
23
  ---
24
+
25
+ # Brain MRI Classification - FLAIR Abnormality Classification v1.0.0
26
+
27
+ 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).
28
+
29
+ ## Model Details
30
+
31
+ - **Architecture:** A CNN model that classifies whether a given Brain MRI image has abnormality.
32
+ - **Dataset:** [LGG Segmentation Dataset](https://www.kaggle.com/datasets/mateuszbuda/lgg-mri-segmentation)
33
+ - **Version:** v1.0.0
34
+ - **Task:** Image Classification
35
+ - **License:** Apache 2.0
36
+
37
+ ## Usage
38
+
39
+ To use this model for inference, you can load it using the `tensorflow` library.
40
+
41
+ ```bash
42
+ # Clones the repository and installs dependencies
43
+ !git clone https://huggingface.co/preethamganesh/bms-flair-abnormality-classification-v1.2.0
44
+ !pip install tensorflow
45
+
46
+ # Imports TensorFlow
47
+ import tensorflow as tf
48
+
49
+ # Loads the pre-trained model from the cloned directory
50
+ model_path = "bms-flair-abnormality-classification-v1.2.0"
51
+ exported_model = tf.saved_model.load(model_path)
52
+
53
+ # Retrieves the default serving function from the loaded model
54
+ model = exported_model.signatures["serving_default"]
55
+
56
+ # Prepares a dummy input tensor for inference (batch size: 1, height: 256, width: 256, channels: 3)
57
+ input_data = tf.ones((1, 256, 256, 3), dtype=tf.float32)
58
+
59
+ # Performs inference using the model. The output will be a dictionary, with the classification logits in the key 'output_0'
60
+ output = model(input_data)["output_0"]
61
+
62
+ # Prints the predicted class (e.g., 0 for normal, 1 for abnormal)
63
+ predicted_class = tf.argmax(output, axis=-1).numpy()
64
+ print("Predicted class: ", predicted_class)
65
+ ```
66
+
67
+ ## Training Details
68
+
69
+ ### Compute
70
+
71
+ - The model was trained on a GeForce 4070Ti GPU with 16GB VRAM.
72
+ - Training completed in approximately 1.8 minutes over 20 epochs.
73
+
74
+ ### Dataset
75
+
76
+ - 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.
77
+
78
+ ### Performance on test set
79
+
80
+ - **Accuracy:** 0.958
81
+
82
+ ## Citation
83
+
84
+ If you use this model in your research, please cite the repository:
85
+
86
+ ```bash
87
+ @misc{preethamganesh2024brainmri,
88
+ title={Brain MRI Segmentation - FLAIR Abnormality Classification},
89
+ author={Preetham Ganesh},
90
+ year={2025},
91
+ url={https://huggingface.co/preethamganesh/brain-mri-flair-abnormality-classification-v1.2.0},
92
+ note={Apache-2.0 License}
93
+ }
94
+ ```
95
+
96
+ ## Contact
97
+
98
+ For any questions or support, please contact [email protected].