MRI-Based Brain Tumor Diagnosis Using Preprocessing Pipeline and Transfer Learning Models
Abstract
Brain tumors represent a significant global health challenge, and their accurate and timely diagnosis is critical for effective treatment planning and improved patient outcomes. While transfer learning has shown promise in this domain, its performance is highly dependent on the quality of input data. This research introduces a novel, comprehensive 8-step preprocessing pipeline designed to significantly enhance the quality and feature visibility of Magnetic Resonance Imaging (MRI) scans for automated brain tumor classification. The pipeline includes resizing, grayscale conversion, Gaussian blurring, Otsu thresholding, contour isolation, Region of Interest (ROI) cropping, normalization, and a Power-law transform. To validate the efficacy of our proposed pipeline, we utilized a merged dataset of 10,287 MRI images from the Masoud and SARTAJ collections, encompassing four classes: glioma, meningioma, pituitary, and normal. This enhanced dataset was used to train and evaluate seven state-of-the-art transfer learning models: Xception, DenseNet-121, GoogLeNet, MobileNet, MobileNet-v2, VGG-19, and ResNet-50. Our rigorous preprocessing resulted in exceptional classification performance, with the Xception model achieving a peak accuracy of 98.68%. This study demonstrates that a meticulous and well-designed preprocessing pipeline is a critical and often overlooked component in developing highly accurate and reliable Computer-Aided Diagnosis (CAD) systems for clinical applications.
Keywords
Brain tumor classification, Transfer learning, Deep learning, MRI, Image preprocessing, Computer-aided diagnosis, Convolutional neural networks
References
- M. Hassan et al., “Unfolding Explainable AI for Brain Tumor Segmentation,” Neurocomputing, vol. 599, p. 128058, Sep. 2024, doi: 10.1016/j.neucom.2024.128058.
- A. Nag et al., “TumorGANet: A Transfer Learning and Generative Adversarial Network- Based Data Augmentation Model for Brain Tumor Classification,” IEEE Access, vol. 12, pp. 103060–103081, 2024, doi: 10.1109/ACCESS.2024.3429633.
- A. Agrawal and J. Chaki, “CerebralNet meets Explainable AI: Brain tumor detection and classification with probabilistic augmentation and a deep learning approach,” Biomed. Signal Process. Control, vol. 110, p. 108210, Dec. 2025, doi: 10.1016/j.bspc.2025.108210.
- R. Haque et al., “Explainable deep stacking ensemble model for accurate and transparent brain tumor diagnosis,” Comput. Biol. Med., vol. 191, p. 110166, Jun. 2025, doi: 10.1016/j.compbiomed.2025.110166.
- Md. A. Rahman et al., “GliomaCNN: An Effective Lightweight CNN Model in Assessment of Classifying Brain Tumor from Magnetic Resonance Images Using Explainable AI,” Computer Modeling in Engineering & Sciences, vol. 140, no. 3, pp. 2425–2448, 2024, doi: 10.32604/cmes.2024.050760.
- W. A. Awuah et al., “Predicting survival in malignant glioma using artificial intelligence,” Eur. J. Med. Res., vol. 30, no. 1, p. 61, Jan. 2025, doi: 10.1186/s40001-025-02339-3.
- M. R. Tonmoy et al., “X-Brain: Explainable recognition of brain tumors using robust deep attention CNN,” Biomed. Signal Process. Control, vol. 100, p. 106988, Feb. 2025, doi: 10.1016/j.bspc.2024.106988.
- H. Ayaz et al., “Post-hoc eXplainable AI methods for analyzing medical images of gliomas (— A review for clinical applications),” Comput. Biol. Med., vol. 196, p. 110649, Sep. 2025, doi: 10.1016/j.compbiomed.2025.110649.
- S. Maqsood, R. Damasevicius, and R. Maskelinas, ''Multi-Modal Brain Tumor Detection Using Deep Neural Network and Multiclass SVM, Medicina (B Aires).'', vol. 58, no. 8, p. 1090, Aug. 2022, doi: 10.3390/medicina58081090.
- Y. Hussain Ali et al., “Optimization System Based on Convolutional Neural Network and Internet of Medical Things for Early Diagnosis of Lung Cancer,” Bioengineering, vol. 10, no. 3, p. 320, Mar. 2023, doi: 10.3390/bioengineering10030320.
- L. K. Almajmaie, S. Albawi, and M. A. A. Khodher, “Brain Neoplasm Image Recognition Using Deep Learning Techniques,” Iraqi Journal of Science, pp. 2948–2962, Jul. 2025, doi: 10.24996/ijs.2025.66.7.24.
- J. Y. R. Al-Awadi, H. K. Aljobouri, and A. M. Hasan, “MRI Brain Scans Classification Using Extreme Learning Machine on LBP and GLCM,” International Journal of Online and Biomedical Engineering (iJOE), vol. 19, no. 02, pp. 134–149, Feb. 2023, doi: 10.3991/ijoe.v19i02.33987.
- M. Sajjad, S. Khan, K. Muhammad, W. Wu, A. Ullah, and S. W. Baik, “Multi-grade brain tumor classification using deep CNN with extensive data augmentation,” J. Comput. Sci., vol. 30, pp. 174–182, Jan. 2019, doi: 10.1016/j.jocs.2018.12.003.
- Z. N. K. Swati et al., “Brain tumor classification for MR images using transfer learning and fine-tuning,” Computerized Medical Imaging and Graphics, vol. 75, pp. 34–46, Jul. 2019, doi: 10.1016/j.compmedimag.2019.05.001.
- P. Narayankar and V. P. Baligar, “Pixel-wise Relevance Propagation for Detailed Insights in Brain Tumour Classification,” Procedia Comput. Sci., vol. 258, pp. 2958–2967, 2025, doi: 10.1016/j.procs.2025.04.555.
- R. L. Kumar, J. Kakarla, B. V. Isunuri, and M. Singh, “Multi-class brain tumor classification using residual network and global average pooling,” Multimed. Tools Appl., vol. 80, no. 9, pp. 13429–13438, Apr. 2021, doi: 10.1007/s11042-020-10335-4.
- M. Togacar, B. Ergen, and Z. Comert, “BrainMRNet: Brain tumor detection using magnetic resonance images with a novel convolutional neural network model,” Med. Hypotheses, vol. 134, p. 109531, Jan. 2020, doi: 10.1016/j.mehy.2019.109531.
- H. Kibriya, R. Amin, A. H. Alshehri, M. Masood, S. S. Alshamrani, and A. Alshehri, “A Novel and Effective Brain Tumor Classification Model Using Deep Feature Fusion and Famous Machine Learning Classifiers,” Comput. Intell. Neurosci., vol. 2022, pp. 1–15, Mar. 2022, doi: 10.1155/2022/7897669.
- Masoud Nickparvar, https://www.kaggle.com/datasets/masoudnickparvar/brain-tumor-mri-dataset.
- Sartaj Bhuvaji, https://www.kaggle.com/datasets/sartajbhuvaji/brain-tumor-classification-mri.
- F. Chollet, “Xception: Deep Learning with Depthwise Separable Convolutions,” Apr. 2017, [Online]. Available: http://arxiv.org/abs/1610.02357
- G. Huang, Z. Liu, L. van der Maaten, and K. Q. Weinberger, “Densely Connected Convolutional Networks,” Jan. 2018, [Online]. Available: http://arxiv.org/abs/1608.06993
- C. Szegedy, V. Vanhoucke, S. Ioffe, and J. Shlens, “Rethinking the Inception Architecture for Computer Vision.”
- A. G. Howard et al., “MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications,” Apr. 2017, [Online]. Available: http://arxiv.org/abs/1704.04861
- M. Sandler, A. Howard, M. Zhu, A. Zhmoginov, and L.-C. Chen, “MobileNetV2: Inverted Residuals and Linear Bottlenecks,” Mar. 2019, [Online]. Available: http://arxiv.org/abs/1801.04381
- K. Simonyan and A. Zisserman, “Very Deep Convolutional Networks for Large-Scale Image Recognition,” Apr. 2015, [Online]. Available: http://arxiv.org/abs/1409.1556
- K. He, X. Zhang, S. Ren, and J. Sun, “Deep Residual Learning for Image Recognition,” Dec. 2015, [Online]. Available: http://arxiv.org/abs/1512.03385
- Y. Yang, C. Miller, P. Jiang, and A. Moghtaderi, “A Case Study of Multi-class Classification with Diversified Precision Recall Requirements for Query Disambiguation,” in Proceedings of the 43rd International ACM SIGIR Conference on Research and Development in Information Retrieval, New York, NY, USA: ACM, Jul. 2020, pp. 1633–1636. doi: 10.1145/3397271.3401315.
- Z. C. Lipton, C. Elkan, and B. Naryanaswamy, “LNAI 8725 - Optimal Thresholding of Classifiers to Maximize F1 Measure.”
- S. Boughorbel, F. Jarray, and M. El-Anbari, “Optimal classifier for imbalanced data using Matthews Correlation Coefficient metric,” PLoS One, vol. 12, no. 6, p. e0177678, Jun. 2017, doi: 10.1371/journal.pone.0177678.
- J. Cohen, “A Coefficient of Agreement for Nominal Scales,” Educ. Psychol. Meas., vol. 20, no. 1, pp. 37–46, Apr. 1960, doi: 10.1177/001316446002000104.
- Pradeep, https://www.kaggle.com/datasets/pradeep2665/brain-mri.