EfficientNet-V2-S
~21M Parameters
97% Accuracy

Detecting Brain Tumors
with Neural Precision

An end-to-end AI pipeline engineered to classify brain MRI scans across 4 categories using a fine-tuned EfficientNet-V2-S architecture with Fused-MBConv blocks, Mixup augmentation, and Cosine Annealing scheduling — achieving 95.75% test accuracy.

0
Tumor Classes
0M
Parameters
0px
Input Size
0%
Val Accuracy
0%
Test Accuracy
0
Stages
Process

How It Works

Three simple steps from image upload to AI-powered diagnosis.

01

Upload MRI Scan

Drag & drop or select a brain MRI scan in JPG or PNG format. Supports axial, coronal, and sagittal views.

02

AI Analysis

Our fine-tuned EfficientNet-V2-S model resizes to 224×224, normalizes the tensor, and runs inference through Fused-MBConv and MBConv layers.

03

Get Results

Receive instant classification with Softmax confidence scores across all 4 categories — Glioma, Meningioma, Pituitary, or No Tumor — downloadable as a report.

Classification

What We Detect

Our model classifies brain MRI scans into 4 distinct categories with an overall 95.75% test accuracy and weighted F1-score of 0.96.

Glioma

High Severity

Arises from glial cells — the supportive tissue of the brain. Most common primary brain tumors, ranging from low-grade to highly malignant glioblastoma (GBM).

Origin
Glial Cells
Growth
Infiltrative
Prevalence
~30% of brain tumors
F1 Score
0.99

Meningioma

Moderate Severity

Develops from the meninges — protective membranes surrounding the brain and spinal cord. Typically slow-growing and often benign, but may compress adjacent structures.

Origin
Meninges
Growth
Slow-growing
Prevalence
~37% of brain tumors
F1 Score
0.95

Pituitary Tumor

Moderate Severity

Grows in the pituitary gland at the base of the brain. Often affects hormone production, potentially causing vision problems and endocrine system disruption.

Origin
Pituitary Gland
Growth
Variable
Prevalence
~15% of brain tumors
F1 Score
0.98

No Tumor

No Concern

Healthy brain scan with no anomalous growths detected. The neural network identifies normal brain tissue patterns and confirms the absence of pathological formations.

Status
Healthy
Action
Routine follow-up
Precision
100%
F1 Score
0.91
Architecture

Under the Hood

A deep dive into the EfficientNet-V2-S model powering NeuralScan.AI — pre-trained on ImageNet-1K and fine-tuned with advanced training techniques.

Transfer Learning

Pre-trained on ImageNet-1K (IMAGENET1K_V1), then fine-tuned on brain MRI scans. 91.3% of the model (~19.1M parameters) is trainable with layer-wise learning rates for optimal feature adaptation.

Robust Dataset

Trained on 5,712 MRI scans across Glioma, Meningioma, Pituitary, and No Tumor classes from the Kaggle Brain Tumor MRI Dataset, validated on 800 samples.

Fused-MBConv Blocks

Early stages use Fused-MBConv that merges depthwise and pointwise convolutions into a single 3×3 conv — enabling faster training on modern GPU accelerators like Tesla T4.

Smart Preprocessing

Images are resized to 224×224, normalized with ImageNet mean [0.485, 0.456, 0.406] & std [0.229, 0.224, 0.225] to match the model's training distribution for optimal inference.

Squeeze-and-Excitation

MBConv blocks integrate SE attention modules that learn channel-wise feature importance, focusing the network on the most discriminative features in MRI scans.

Mixup Augmentation

Training uses Mixup data augmentation 50% of the time (α=0.4), blending image pairs and their labels to improve generalization and reduce overfitting on medical data.

Preprocessing Pipeline

All uploaded scans are resized to 224×224, converted to PyTorch Tensors, and normalized using ImageNet mean[0.485, 0.456, 0.406] and std[0.229, 0.224, 0.225] to match the training distribution.

Training

How the Model Learns

Advanced training techniques that help our model achieve 97% validation accuracy in just 60 epochs — explained for everyone.

AdamW Optimizer

Simple: A smart learning algorithm that adjusts how much each part of the model changes during training.

Technical: AdamW with layer-wise learning rates: features.5 at 0.05× base, features.6 at 0.2×, features.7 at 0.5×, classifier head at full 2e-4 base LR. Weight decay: 2e-4.

Cosine Annealing Scheduler

Simple: Gradually reduces the learning speed in waves, helping the model settle into better solutions.

Technical: CosineAnnealingWarmRestarts with T_0=10, T_mult=2, eta_min=1e-7. Periodic warm restarts prevent stagnation and help escape local minima.

Label Smoothing

Simple: Makes the model less overconfident by softening the target labels slightly.

Technical: CrossEntropyLoss with label_smoothing=0.1. Instead of hard 0/1 targets, uses 0.025/0.925 distribution, reducing overconfidence and improving calibration.

Heavy Augmentation Pipeline

Simple: Applies random transformations (flips, rotations, color changes) to training images so the model learns to handle real-world variations.

Technical: RandomCrop(224), HorizontalFlip, VerticalFlip(p=0.2), Rotation(20°), ColorJitter, RandomAffine(shear=8), Grayscale(p=0.1), RandAugment(ops=2, mag=9), RandomErasing(p=0.25).

Training Summary

The model was trained for 60 epochs on an NVIDIA Tesla T4 GPU with batch size 32 and early stopping patience of 20 epochs. The best model checkpoint was saved at epoch 49 with 97.00% validation accuracy. Gradient clipping (max_norm=1.0) was used to stabilize training.

Results

Model Performance

Detailed per-class metrics from the test set of 800 MRI scans — showing precision, recall, and F1-score for each tumor category.

Class
Precision
Recall
F1-Score
Samples
Pituitary
0.96
1.00
0.98
196
No Tumor
1.00
0.84
0.91
202
Meningioma
0.90
1.00
0.95
214
Glioma
0.99
0.99
0.99
188
Overall
0.96
0.96
0.96
800

What is Precision?

Out of all scans the AI labeled as a certain tumor type, how many were actually correct. Higher = fewer false alarms.

What is Recall?

Out of all actual cases of a tumor type, how many did the AI successfully find. Higher = fewer missed tumors.

What is F1-Score?

A balanced combination of Precision and Recall. Ranges from 0 to 1 — our model scores 0.96 overall, meaning excellent performance.

Pipeline

Stage-by-Stage Architecture

Visualize the EfficientNet-V2-S inference pipeline — from 224×224 input convolution through Fused-MBConv and MBConv stages to final 4-class classification.

Fused-MBConv
MBConv + SE
Convolution
Head
Conv3×3
24ch · 1L
Stem convolution, stride 2
Fused-MBConv1
24ch · 2L
Expansion ratio 1, 3×3 filters
Fused-MBConv4
48ch · 4L
Expansion ratio 4, stride 2
Fused-MBConv4
64ch · 4L
Expansion ratio 4, 3×3 filters
MBConv4+SE
128ch · 6L
Squeeze-and-Excitation, stride 2
MBConv6+SE
160ch · 9L
Expansion ratio 6, SE attention
MBConv6+SE
256ch · 15L
Expansion ratio 6, stride 2
Conv1×1
1280ch · 1L
Head convolution
Pooling→FC
4ch · 1L
Global avg pool → 4-class output

Only 3×3 Filters

No 5×5 convolutions — faster on modern GPU accelerators like NVIDIA Tesla T4

Training-Aware NAS

Architecture discovered via neural architecture search optimizing both accuracy and training speed

91.3% Trainable

Fine-tuned ~19.1M of ~21M total parameters, with lower layers frozen to preserve ImageNet features

Research Paper

EfficientNetV2: Smaller Models and Faster Training

Mingxing Tan & Quoc V. Le — Google Research, Brain Team

Published at ICML 2021. Introduces training-aware NAS, and the Fused-MBConv block — achieving state-of-the-art accuracy on ImageNet while training up to 11× faster than previous models. Our implementation uses the EfficientNet-V2-S variant with custom classifier head for 4-class brain tumor detection.

Important

Clinical Disclaimers

Not a Substitute for Medical Advice

NeuralScan.AI is an experimental research tool. Predictions should NEVER be the sole basis for clinical diagnosis. Always consult a qualified radiologist.

False Positives & Negatives: ML models are probabilistic. The model may predict a tumor where none exists, or fail to detect one. The test accuracy is 95.75% — not perfect.
Image Quality Dependency: Accuracy depends on clarity, angle, and modality. Blurry or non-MRI images produce unpredictable results. Best results with axial brain MRI scans.
Data Shift: The model was trained on the Kaggle Brain Tumor MRI Dataset. Rare tumor types, different scanner equipment, or imaging artifacts not in the training data may misguide predictions.
No Tumor Class Recall: The 'No Tumor' class has 84% recall — meaning 16% of healthy scans may be incorrectly flagged as having a tumor. Always verify with a specialist.

Ready to Analyze?

Upload your brain MRI scan and let our fine-tuned EfficientNet-V2-S model provide instant classification results with confidence scores.

Launch Analyzer