Image Classification
Keras
English
tensorflow
medical-imaging
brain-tumor
cnn
computer-vision
healthcare
mri-scans
Instructions to use supakornn/Brain-Tumor-Classification with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use supakornn/Brain-Tumor-Classification with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://supakornn/Brain-Tumor-Classification") - Notebooks
- Google Colab
- Kaggle
Brain Tumor Classification
CNN-based classification of brain tumor types from MRI scans.
Dataset
Source: Brain Tumor MRI Dataset (Kaggle)
4 classes: glioma, meningioma, notumor, pituitary โ each split into Training/ and Testing/.
Model Architecture
SimpleCNN with 10.7M parameters:
- 3 Convolutional blocks (32, 64, 128 filters)
- Batch Normalization + Dropout
- 2 Dense layers (256, 128 neurons)
- Softmax output (4 classes)
Results
| Configuration | Accuracy | Loss | Change |
|---|---|---|---|
| Baseline | 42.39% | 3.2599 | - |
| Fine-tuned | 46.70% | 2.8472 | +4.31% |
Fine-tuned hyperparameters: LR=0.0005, Batch=16, Epochs=40
Per-Class Performance (Fine-tuned)
| Class | Precision | Recall | F1-Score |
|---|---|---|---|
| Glioma | 1.00 | 0.14 | 0.24 |
| Meningioma | 1.00 | 0.21 | 0.35 |
| No Tumor | 0.37 | 0.92 | 0.53 |
| Pituitary | 0.54 | 0.66 | 0.59 |
Usage
from tensorflow import keras
model = keras.models.load_model("model/SimpleCNN_best.h5")
GitHub
Limitations
- Low accuracy (46.70%) insufficient for clinical use
- Poor glioma detection (14% recall)
- Simple architecture inadequate for medical imaging
License
MIT License โ Educational and research purposes.



