Model Card created
Browse files
README.md
ADDED
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: mit
|
3 |
+
datasets:
|
4 |
+
- brain-mri-dataset
|
5 |
+
metrics:
|
6 |
+
- accuracy
|
7 |
+
- auc
|
8 |
+
model-index:
|
9 |
+
- name: CNN Brain Tumor Classifier
|
10 |
+
results:
|
11 |
+
- task:
|
12 |
+
type: image-classification
|
13 |
+
dataset:
|
14 |
+
name: Brain MRI Dataset
|
15 |
+
type: brain-mri-dataset
|
16 |
+
metrics:
|
17 |
+
- name: Accuracy
|
18 |
+
type: accuracy
|
19 |
+
value: 0.90
|
20 |
+
- name: AUC
|
21 |
+
type: auc
|
22 |
+
value: 0.90
|
23 |
+
---
|
24 |
+
|
25 |
+
# 🧠 CNN Brain Tumor Classifier
|
26 |
+
|
27 |
+
## Model Description
|
28 |
+
This repository contains a Convolutional Neural Network (CNN) built with **TensorFlow/Keras** for classifying brain MRI scans.
|
29 |
+
The model can distinguish between three types of brain tumors and healthy scans.
|
30 |
+
|
31 |
+
⚠️ **Disclaimer**: This model is provided for **educational and research purposes only**.
|
32 |
+
It is **not a medical diagnostic tool** and should not be used in clinical practice.
|
33 |
+
|
34 |
+
---
|
35 |
+
|
36 |
+
## Classes
|
37 |
+
The model predicts one of the following four categories:
|
38 |
+
- **Glioma**
|
39 |
+
- **Meningioma**
|
40 |
+
- **Pituitary tumor**
|
41 |
+
- **No tumor** (healthy)
|
42 |
+
|
43 |
+
---
|
44 |
+
|
45 |
+
## Training Details
|
46 |
+
- **Framework**: TensorFlow / Keras
|
47 |
+
- **Architecture**: Custom CNN
|
48 |
+
- **Input size**: 224 × 224 RGB MRI images
|
49 |
+
- **Loss function**: `categorical_crossentropy`
|
50 |
+
- **Optimizer**: `Adam`
|
51 |
+
- **Epochs**: 10
|
52 |
+
- **Metrics**: Accuracy, AUC
|
53 |
+
|
54 |
+
---
|
55 |
+
|
56 |
+
## Dataset
|
57 |
+
- **Source**: Public brain MRI dataset (glioma, meningioma, pituitary, no tumor)
|
58 |
+
- **Preprocessing**:
|
59 |
+
- Images resized to 224 × 224
|
60 |
+
- Normalized to [0, 1] range
|
61 |
+
- Augmentation (rotation, flipping, zoom) applied during training
|
62 |
+
|
63 |
+
---
|
64 |
+
|
65 |
+
## Evaluation Results
|
66 |
+
| Metric | Value |
|
67 |
+
|---------------------|-----------|
|
68 |
+
| Training Accuracy | ~96% |
|
69 |
+
| Validation Accuracy | ~85–90% |
|
70 |
+
| AUC (training) | ~0.90 |
|
71 |
+
|
72 |
+
*(values may vary depending on train/validation split)*
|
73 |
+
|
74 |
+
---
|
75 |
+
|
76 |
+
## Usage
|
77 |
+
|
78 |
+
### Installation
|
79 |
+
```bash
|
80 |
+
pip install tensorflow huggingface_hub
|