Zing Forum

Reading

Multi-layer CNN-based Automatic Classification System for Brain Tumor MRI: Achieving 99.14% Diagnostic Accuracy

This article introduces an end-to-end deep learning project that uses an optimized convolutional neural network to automatically classify brain MRI scan images into four categories—glioma, meningioma, pituitary tumor, and healthy brain tissue—achieving a classification accuracy of 99.14% on the test set.

深度学习卷积神经网络CNN医学影像脑肿瘤MRITensorFlowKeras计算机辅助诊断神经网络
Published 2026-06-15 03:44Recent activity 2026-06-15 03:48Estimated read 7 min
Multi-layer CNN-based Automatic Classification System for Brain Tumor MRI: Achieving 99.14% Diagnostic Accuracy
1

Section 01

Guide to the Multi-layer CNN-based Automatic Classification System for Brain Tumor MRI

This article introduces an end-to-end deep learning project that uses an optimized convolutional neural network (CNN) to automatically classify brain MRI scan images into four categories: glioma, meningioma, pituitary tumor, and healthy brain tissue, achieving a classification accuracy of 99.14% on the test set. The project is built on the TensorFlow/Keras framework, and its code is open-sourced on GitHub, providing an efficient solution for computer-aided diagnosis of brain tumors.

2

Section 02

Project Background and Clinical Significance

In the fields of neurosurgery and oncology, timely and accurate diagnosis of brain tumors is crucial for patient prognosis. Traditional MRI image diagnosis relies on the experience of radiologists, which has issues such as long diagnosis time, strong subjectivity, and uneven distribution of expert resources. With the rapid growth of medical imaging data, developing an automated, high-precision computer-aided diagnosis system has become an urgent need. This project addresses this pain point by building an end-to-end brain tumor classification system to provide reliable auxiliary diagnostic references for clinicians.

3

Section 03

Dataset Composition and Preprocessing Strategy

Dataset Composition

The project uses 7023 human brain MRI scan images, covering four categories: glioma (1621 images), meningioma (1645 images), pituitary tumor (1757 images), and no tumor (2000 images). The data is divided as follows:

Diagnosis Category Training Set Test Set Total
Glioma 1321 images 300 images 1621 images
Meningioma 1339 images 306 images 1645 images
Pituitary Tumor 1457 images 300 images 1757 images
No Tumor 1595 images 405 images 2000 images
Total 5712 images 1311 images 7023 images

Preprocessing and Augmentation

  • Standardization: Unify the size to 150×150 RGB, normalize pixels to [0.0, 1.0].
  • Data Augmentation: During training, strategies such as rotation (±10 degrees), translation (±10%), shearing (0.1 radians), scaling (0.9-1.1 times), and flipping are used to improve the model's generalization ability.
4

Section 04

Model Architecture Design and Training Optimization

Optimized Multi-layer CNN Architecture

Input layer → 5 feature extraction layers (Conv2D + Batch Normalization + MaxPooling2D + Dropout) → Classification head (Flatten → Dense → Dropout → Softmax output). The channel depth gradually expands from 32 to 256; batch normalization accelerates convergence, and dropout prevents overfitting.

Training Configuration

  • Optimizer: Adam adaptive moment estimation.
  • Loss Function: Categorical cross-entropy.
  • Callbacks: Dynamic learning rate adjustment (ReduceLROnPlateau), model checkpointing, and early stopping mechanism (EarlyStopping).
5

Section 05

Experimental Results and Performance Evaluation

On the 1311-image test set, the model achieved an overall classification accuracy of 99.14%. The metrics for each category are as follows:

Diagnosis Category Precision Recall F1 Score
Glioma High High Balanced
Meningioma High High Balanced
Pituitary Tumor High High Balanced
No Tumor High High Balanced
The model performs excellently in precision and recall, with balanced F1 scores and no category bias.
6

Section 06

Clinical Value and Application Scenarios

The system's accuracy meets the clinical practical threshold, with potential applications including:

  • Primary Medical Support: Provide initial screening references for primary hospitals lacking senior radiologists.
  • Diagnosis Efficiency Improvement: Automatically analyze large volumes of MRI scans to reduce waiting time.
  • Teaching and Training: Serve as an auxiliary tool for medical students to learn the imaging features of brain tumors.
  • Quality Control: Act as a "second pair of eyes" for radiologists to reduce omissions.
7

Section 07

Limitations and Future Improvement Directions

Limitations

  • The dataset size is moderate; larger multi-center datasets are needed to improve generalization.
  • There are slightly more healthy control samples; category balance needs optimization.
  • The model is a black box with insufficient interpretability.

Future Directions

  • Integrate visualization techniques like Grad-CAM to enhance interpretability.
  • Fuse information from multi-modal MRI sequences such as T1, T2, and FLAIR.
  • Optimize sampling strategies to improve category balance.