The Latest AIs, every day
AIs with the most favorites on Toolify
AIs with the highest website traffic (monthly visits)
AI Tools by Apps
Discover the Discord of AI
AI Tools by browser extensions
GPTs from GPT Store
Discover The Best Model For AI
Top AI lists by month and monthly visits.
Top AI lists by category and monthly visits.
Top AI lists by region and monthly visits.
Top AI lists by source and monthly visits.
Top AI lists by revenue and real traffic.
Cancer remains one of the major global health challenges, and the increasing availability of medical imaging has created opportunities to support clinicians through computer-aided image analysis. In oncology, medical imaging plays an important role in the detection, characterization, treatment planning, and follow-up of tumors.
Brain MRI is particularly important in the assessment of brain tumors because MRI provides detailed soft-tissue contrast without exposing the patient to ionizing radiation. However, interpretation of large numbers of medical images can be time-consuming and requires considerable clinical expertise.
This project explores the use of deep learning for automated brain MRI tumor classification , combining concepts from medical imaging, artificial intelligence, machine learning, and deep learning .
The objective was not simply to train a CNN and report its accuracy, but to investigate how different pretrained deep-learning architectures perform on brain MRI data and how transfer learning, layer selection, fine-tuning, optimization, and regularization affect classification performance.
The project uses brain MRI images representing four classification categories:
Gliomas, meningiomas, and pituitary tumors represent three major tumor categories considered in this classification task, while the No Tumor class provides a non-tumor reference category.
The dataset was organized as a four-class image-classification problem with a balanced test set of 1,600 images (400 per class) .
A consistent preprocessing and augmentation pipeline was maintained across the different architectures to make the model comparison more meaningful.
Input image size:
128 × 128 × 3
The main objective was to investigate whether transfer-learning-based CNN architectures could effectively learn discriminative features from brain MRI images and determine which architecture provided the most reliable classification performance.
Rather than relying on a single neural network, multiple established architectures were evaluated:
The models were first evaluated using their pretrained ImageNet features and subsequently investigated through domain-specific fine-tuning .
The project also examined how changing the classification head, trainable layers, learning rate, optimizer, regularization, and fine-tuning strategy affected performance.
All models used ImageNet-pretrained convolutional backbones . The original classification layers were removed and replaced with task-specific classification heads.
The general workflow was:
Brain MRI Dataset
↓
Preprocessing & Augmentation
↓
Train / Validation / Test Split
↓
ImageNet-Pretrained CNN
↓
Custom Classification Head
↓
Initial Transfer Learning
↓
Layer Unfreezing & Fine-Tuning
↓
Performance Evaluation
↓
Model Comparison
For the classification heads, architectures using:
GlobalAveragePooling2D
↓
Dense Layers
↓
Batch Normalization
↓
Dropout
↓
4-Class Softmax
were investigated.
Fine-tuning was performed by selectively unfreezing deeper convolutional layers while keeping earlier feature-extraction layers frozen. Lower learning rates were used during fine-tuning to avoid excessively changing useful pretrained features.
The four architectures showed substantially different behavior on the brain MRI classification task.
| Model | Initial Accuracy | Fine-Tuned Accuracy | Final Status |
|---|---|---|---|
| VGG16 | 83.44% | 91.50% | ⭐ Selected |
| DenseNet121 | 83.00% | 83.00% | Strong baseline |
| ResNet50 | 68.00% | 81.00% | Baseline |
| EfficientNetB0 | 33.00% | 35.00% | Not selected |
Fine-tuned VGG16
Fine-tuning improved VGG16 from 83.44% to 91.50% , an improvement of 8.06 percentage points .
VGG16 was the strongest architecture evaluated in this project.
VGG16 (ImageNet pretrained)
↓
GlobalAveragePooling2D
↓
Dense(256) + BatchNorm + Dropout(0.4)
↓
Dense(128) + BatchNorm + Dropout(0.3)
↓
Dense(4, Softmax)
The initial VGG16 experiment used the pretrained backbone with a custom classification head.
The classification head was subsequently improved by replacing
Flatten()
with
GlobalAveragePooling2D
, reducing the number of parameters and helping control overfitting.
The final convolutional block was unfrozen while earlier layers remained frozen.
Training used:
1 × 10⁻⁴
1 × 10⁻⁵
| Class | Precision | Recall | F1 |
|---|---|---|---|
| Glioma | 0.95 | 0.98 | 0.97 |
| Meningioma | 0.92 | 1.00 | 0.96 |
| No Tumor | 0.84 | 0.93 | 0.88 |
| Pituitary | 0.97 | 0.75 | 0.84 |
Final accuracy: 91.50%
The strong performance across the tumor classes made VGG16 the selected architecture for subsequent stages of the project.
ResNet50 was evaluated as an alternative deep residual architecture.
ResNet50 (ImageNet pretrained)
↓
GlobalAveragePooling2D
↓
Dense(256) + BatchNorm + Dropout(0.4)
↓
Dense(128) + BatchNorm + Dropout(0.3)
↓
Dense(4, Softmax)
The backbone was initially frozen and the classification head was trained. The final convolutional section was subsequently unfrozen for domain-specific fine-tuning.
| Class | Precision | Recall | F1 |
|---|---|---|---|
| Glioma | 0.89 | 0.91 | 0.90 |
| Meningioma | 0.78 | 0.99 | 0.87 |
| No Tumor | 0.78 | 0.66 | 0.72 |
| Pituitary | 0.77 | 0.68 | 0.72 |
Initial accuracy: 68.00%
Fine-tuned accuracy: 81.00%
Fine-tuning produced a substantial improvement of approximately 13 percentage points , demonstrating that adaptation of pretrained features to the MRI domain was beneficial.
However, ResNet50 remained below the performance of fine-tuned VGG16.
DenseNet121 was included because dense feature reuse and hierarchical feature propagation make it an important architecture for medical-image classification.
DenseNet121 (ImageNet pretrained)
↓
GlobalAveragePooling2D
↓
Dense(256) + BatchNorm + Dropout(0.4)
↓
Dense(128) + BatchNorm + Dropout(0.3)
↓
Dense(4, Softmax)
The initial fine-tuning strategy reduced performance from:
83% → 79%
A more conservative DenseNet-specific strategy was then investigated:
3 × 10⁻⁶
1 × 10⁻⁴
The optimized configuration recovered the performance to 83% , but did not provide a meaningful overall improvement over the original frozen-backbone configuration.
| Class | Precision | Recall | F1 |
|---|---|---|---|
| Glioma | 0.85 | 0.96 | 0.90 |
| Meningioma | 0.83 | 0.97 | 0.90 |
| No Tumor | 0.77 | 0.72 | 0.74 |
| Pituitary | 0.88 | 0.66 | 0.76 |
Accuracy: 83.00%
Macro F1: 0.82
DenseNet121 therefore provided a strong baseline but did not outperform the fine-tuned VGG16.
EfficientNetB0 was evaluated using the same dataset and general transfer-learning framework.
EfficientNetB0 (ImageNet pretrained)
↓
GlobalAveragePooling2D
↓
Dense(256) + BatchNorm + Dropout(0.4)
↓
Dense(128) + BatchNorm + Dropout(0.3)
↓
Dense(4, Softmax)
The backbone was initially frozen and subsequently partially fine-tuned.
Initial accuracy: 33%
Fine-tuned accuracy: 35%
The model exhibited severe class-collapse behavior and failed to reliably identify some of the tumor categories.
Therefore, EfficientNetB0 was not selected for further development within this project.
The experiments demonstrated that architecture selection and fine-tuning strategy have a major effect on medical-image classification performance .
The results were:
| Architecture | Initial | Fine-Tuned | Improvement |
|---|---|---|---|
| VGG16 | 83.44% | 91.50% | +8.06 pp |
| ResNet50 | 68.00% | 81.00% | +13.00 pp |
| DenseNet121 | 83.00% | 83.00% | 0 pp |
| EfficientNetB0 | 33.00% | 35.00% | +2.00 pp |
An important observation was that fine-tuning did not improve every architecture equally .
This demonstrates that pretrained architectures cannot simply be treated as interchangeable models; their layer structure, feature representations, and fine-tuning behavior need to be considered when applying deep learning to medical images.
Based on the comparative evaluation, fine-tuned VGG16 was selected as the best-performing model.
91.50% Test Accuracy
0.91 Macro F1
| Class | F1-score |
|---|---|
| Glioma | 0.97 |
| Meningioma | 0.96 |
| No Tumor | 0.88 |
| Pituitary | 0.84 |
The model demonstrated particularly strong recognition of Glioma and Meningioma, while Pituitary tumor classification remained the more challenging category because of its lower recall.
This project was developed at the intersection of medical imaging, deep learning, and quantitative analysis , with relevance to the growing role of computational methods in modern medical physics.
The current model should be considered a research/educational classification system rather than a clinical diagnostic tool . High classification accuracy alone is not sufficient for clinical deployment.
The next stage of the project focuses on:
Grad-CAM and error analysis are particularly important because they can help investigate whether the CNN is responding to medically meaningful regions of the MRI rather than irrelevant image characteristics.
This project demonstrated the application of transfer learning and deep convolutional neural networks to brain MRI tumor classification .
Four architectures were systematically evaluated under a consistent experimental framework. While DenseNet121 and ResNet50 provided useful comparative baselines, fine-tuned VGG16 achieved the best performance with 91.50% test accuracy and a 0.91 macro F1-score .
The project also demonstrated that successful medical-image deep learning requires more than selecting a powerful CNN. Preprocessing, architecture selection, classification-head design, layer freezing, fine-tuning depth, learning rate, optimization and regularization all influence model performance.
The final stage will focus on model interpretability and clinically relevant evaluation , moving the project beyond simple accuracy-based classification toward a more complete medical-imaging research workflow.
Tumor_Classification huggingface.co is an AI model on huggingface.co that provides Tumor_Classification's model effect (), which can be used instantly with this abink Tumor_Classification model. huggingface.co supports a free trial of the Tumor_Classification model, and also provides paid use of the Tumor_Classification. Support call Tumor_Classification model through api, including Node.js, Python, http.
Tumor_Classification huggingface.co is an online trial and call api platform, which integrates Tumor_Classification's modeling effects, including api services, and provides a free online trial of Tumor_Classification, you can try Tumor_Classification online for free by clicking the link below.
Tumor_Classification is an open source model from GitHub that offers a free installation service, and any user can find Tumor_Classification on GitHub to install. At the same time, huggingface.co provides the effect of Tumor_Classification install, users can directly use Tumor_Classification installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

