DOI : 10.5281/zenodo.23311560
- Open Access

- Authors : Poojitha G S, Priya G P, Priya S C, Tejashwini C M, Afreen Fathima
- Paper ID : IJERTV15IS100154
- Volume & Issue : Volume 15, Issue 10 , October – 2026
- Published (First Online): 12-10-2026
- ISSN (Online) : 2278-0181
- Publisher Name : IJERT
- License:
This work is licensed under a Creative Commons Attribution 4.0 International License
Brain Tumor Detection using Image Classification
Poojitha G S (1), Priya G P (2), Priya S C (3), Tejashwini C M (4), Afreen Fathima (5)
(1) Asst Professor, Department of Computer Science & Engineering Mysuru Royal Institute of Technology, Mandya, Karnataka, India.
(2,3,4,5) Student, Department of Computer Science & Engineering, Mysuru Royal Institute of Technology, Mandya, Karnataka, India.
Abstract- This project uses the DenseNet201 CNN model to analyze MRI images and identify patterns that help categorize them into four groups: Glioma, Meningioma, No Tumor, and Pituitary Tumor. The model uses transfer learning, where a model that has already learned general image features is further trained to understand brain MRI images. For training and testing, the project uses the Brain Tumor MRI Dataset, which contains 7,200 MRI images. The images are divided into training, validation, and testing sets. The model is trained using the training images, improved using the validation images, and finally tested using separate test images that were not used during training. After the model is trained, its performance is measured using different evaluation methods such as accuracy, precision, recall, F1-score, and a confusion matrix.
-
INTRODUCTION
A brain tumor is an abnormal mass of cells growing within or around the brain. Magnetic Resonance Imaging (MRI) is the standard non invasive imaging modality used to visualize soft tissue structures of the brain, because it offers strong contrast between healthy and abnormal tissue without ionizing radiation. Radiologists examine MRI scans slice by slice to identify the presence, type, and extent of a tumor. Among the most commonly studied tumor types in MRI-based classification research are:- Glioma tumors arising from glial cells within the brain or spinal cord.- Meningioma tumors arising from the meninges, the membranes surrounding the brain and spinal cord. Pituitary tumor tumors
arising in or near the pituitary gland.- No Tumor MRI scans showing no visible tumor, used as the negative class.
Objectives
-
Prepare a training/validation/test split of the Brain Tumor MRI Dataset suitable for supervised four-class classification.
-
Build a DenseNet201-based transfer-learning model with a custom pooling and dense classification head.
-
Train the model in two phases a frozen- backbone phase and a selective fine-tuning phase using early stopping and learning- rate reduction.
-
Evaluate the trained model on a completely untouched test set and report accuracy, per- class precision, recall, F1-score, and a confusion matrix
-
-
METHODOLOGY
The proposed methodology integrates deep learning and full-stack software development into a single end- to end system. A publicly available four-class brain MRI dataset is first prepared and divided into training, validation, and test subsets. Dense Net 201 is then used as a transfer-learning backbone, followed by custom classification layers. The model is trained through a frozen-backbone phase and a selective fine-tuning phase, with early stopping and learning-rate reduction used to control training. The final model is evaluated on an untouched test set using accuracy, precision, recall, F1-score, and a confusion matrix. A separate model-reconstruction and comparison step is
performed before selecting the deployment model. The selected model is integrated into a Flask application that performs inference on uploaded MRI images and stores classification results in an SQLite database.
The application also provides model-analysis, history, and report-generation, functionality.
Figure 1: Flowchart of the proposed Brain-Tumor Detection
The proposed system follows an end-to-end pipeline for classifying brain MRI images into four categories: Glioma, Meningioma, No Tumor, and Pituitary Tumor.
-
MODELING AND ANALYSIS
The modelling and analysis stage is the core part of the project, where the DenseNet201 deep learning model is created, trained, and tested for brain tumor MRI classification. The model employs transfer learning, which involves adapting a pre-trained DenseNet201 network to recognize patterns in brain MRI images. During the modeling process, the MRI dataset is prepared and split into training, validation, and testing sets. Initially, the model is trained with the DenseNet201 backbone frozen, and then certain layers are fine-tuned to enhance learning for the four target classes: Glioma, Meningioma, No Tumor, and Pituitary Tumor. Following the training phase, the model is assessed using an unseen test dataset. Performance is measured using various metrics such as accuracy, precision, recall, F1-score, and a confusion matrix. The confusion matrix is particularly
helpful in identifying which tumor classes are being confused with one another. Before deploying the model, the project also includes a model comparison step.
Figure 2: AI-Assistant Brain Tumor MRI Classification
Table 1: System Modules and Their Functions
The Brain Tumor MRI Classification System is composed of interconnected modules that collectively offer a complete process for classifying brain MRI images.
The system begins with data collection and preprocessing, where MRI images are gathered, categorized into four classesGlioma, Meningioma, No Tumor, and Pituitary Tumorand prepared for model training. The DenseNet201 model development and training module utilizes transfer learning to extract key patterns from MRI images and improve classification performance.
After the training stage, the model testing and evaluation module evaluates the model using unseen test images and measures its performance through accuracy, precision, recall, F1-score, and a confusion matrix. The model selection module compares the results of the available models and determines which one is best suited for deployment.
The selected model is integrated into a Flask web application, allowing users to upload an MRI image and view the predicted class and model confidence. The SQLite database module stores patient details, scan information, classification results, and reports. The report generation module creates a structured report containing the classification result and confidence value. The user interface module provides simple web pages for uploading images, viewing predictions, checking model information, and accessing previous reports.
-
PROPOSED SYSTEM
The proposed system automates the classification step using a trained CNN, and wraps it in a web application that a user can operate without needing to run any machine learning code directly. The high-level data path is:
MRI image
-
upload through Flask web interface (detector page)
-
server-side validation (file presence, extension)
-
image saved to local disk (uploads/MRI scans)
-
image preprocessing (resize to 300×300, DenseNet201 preprocessing)
-
DenseNet201 model inference
-
four-class probability vector
-
predicted class (argmax) + confidence (max probability)
-
result stored in SQLite (scans table)
-
(optional) patient details entered -> report generated and stored (repots table)
-
report retrievable via report history/view pages
-
-
EXISTING SYSTEM
In conventional clinical practice, brain tumor MRI interpretation follows a manual.
Workflow:
-
A radiologist or neuro-radiologist visually reviews the MRI series slice by slice.
-
The reviewer identifies whether an abnormal mass is present and estimates its type, location, and extent based on visual characteristics and clinical experience.
-
Findings are documented in a written radiology report, often after cross-referencing with other imaging sequences or prior scans.
Table 2: Comparison Between Existing and Proposed System
-
-
IMPLEMENTATION
The implementation of the proposed system consists of developing a deep-learning-based brain tumor MRI classification system and integrating the trained model into a web application. The system uses DenseNet201 with transfer learning to extract important visual features from MRI images and classify them into four categories: Glioma, Meningioma, No Tumor, and Pituitary Tumor.
The implementation begins with MRI image preprocessing, where images are prepared into a suitable format for the deep learning model. DenseNet201 is then trained in two stages: first with the backbone frozen, followed by selective fine- tuning of the deeper layers. The trained model is evaluated using standard classification metrics such as accuracy, precision, recall, F1-score, and confusion matrix.
After training, the selected model is integrated into a Flask-based web application. When an MRI image is uploaded, the system processes the image, performs model inference, and produces the predicted class, model confidence, and class probabilities.
The prediction results are stored in an SQLite database, which maintains information related to patients, scans, and reports. The system also provides report generation and report-history functionality, allowing previously generated results to be retrieved
-
RESULTS AND DISCUSSION
The final DenseNet201 model achieved 93.3125% accuracy on the untouched 1,600-image test set, with 1,493 correct predictions. The model performed best on No Tumor (100% recall) and Pituitary (99.75% recall), while Glioma had the lowest recall (78%)
and was the main source of errors, particularly due to confusion with Meningioma. A comparison with the reconstructed portable model showed that the original model performed better (93.3125% vs. 92.8750%) and was therefore selected for deployment. Overall, the results demonstrate effective four-class MRI classification, while the GliomaMeningioma confusion remains the major limitation; the results alone do not establish clinical suitability.
Figure 3: MRI Detector
Figure 4: Report Generation
ADVANTAGES
-
Good classification performance The system achieves 93.3125% accuracy on the 1,600- image test set
-
Four-class classification It can classify MRI images into Glioma, Meningioma, No Tumor,
and Pituitary Tumor.
-
Transfer learning DenseNet201 allows the system to use learned visual features from a pretrained network.
-
High performance for some classes No Tumor achieves 100% recall, while Pituitary achieves 99.75% recall.
-
End-to-end system The trained model is integrated with a Flask web application for image upload, prediction, result display, and report generation.
-
Database support SQLite stores patient, scan, and report information for history and retrieval.
-
Model-selection evaluation The original and reconstructed models were compared using the same test set before deployment.
CONCLUSION
The proposed project successfully developed an end- to-end brain tumor MRI image classification system using DenseNet201 transfer learning. The model classifies MRI images into four categories: Glioma, Meningioma, No Tumor, and Pituitary Tumor.
The trained model was integrated into a Flask web application, enabling MRI image upload, classification, confidence display, database storage, and report generation. The model-selection experiment also demonstrated that the original trained model performed better than the reconstructed portable version and was therefore selected for deployment.
Although the system demonstrates promising classification performance, Glioma classification remains a major limitation, and the system has not undergone external dataset testing or clinical validation. Therefore, it is intended as a research and educational AI classification system rather than a medical diagnostic tool.
REFERENCES
-
Nickparvar, M. Brain Tumor MRI Dataset. Kaggle. https://www.kaggle.com/datasets/masoudnickparvar/brain- tumor-mri-dataset
-
Python Software Foundation. sqlite3 DB-API 2.0 interface for SQLite databases
-
Transparent brain tumor detection using DenseNet169 and LIME. Explainable Deep Learning in Medical Imaging: Brain Tumor and Pneumonia Detection.
-
Quantized Machine Learning Models for Medical Imaging in Low-Resource Healthcare Settings.
-
Improved brain tumor classification through DenseNet121 based transfer learning. PubMed. https://pubmed.ncbi.nlm.nih.gov/40866773/
-
A Tumor Aware Dense Net Swin Hybrid Learning with Boosted and Hierarchical Feature Spaces for Large-Scale Brain MRI Classification. https://arxiv.org/pdf/2601.18330
