Brain Tumor Classification Using CNN on MRI Data: A PyTorch Implementation


Authors : Rambarki Sai Akshit; Konduru Hema Pushpika; Rambarki Sai Aashik; Dr. Ravi Bhramaramba; Sayala Manjith; Paladugu Madhav

Volume/Issue : Volume 10 - 2025, Issue 1 - January


Google Scholar : https://tinyurl.com/245skfbd

Scribd : https://tinyurl.com/4ybaewwa

DOI : https://doi.org/10.5281/zenodo.14621403


Abstract : The early detection of brain tumors and correct diagnosis are key factors capable of influencing the success of treatment and more importantly patient outcome. In this study, we hypothesize that MRI data set of brain tumors can be classified and detected using a deep learning method of Convolutional Neural Network (CNN) built on PyTorch. It utilized a sufficiently large Dataset obtained from Kaggle and incorporated various techniques of data augmentation in the training procedure to enhance its robust and generalization capability. The architecture of the CNN comprises of several convolutional layers, which allows the model to recognize complex features present in the MRI data set. With the network architecture trained using the Adam optimizer, the model could successfully differentiate between tumor and non-tumor images. Model validation metrics such as confusion matrices, accuracy, precision, recall ratio, F1 and other metrics were used to validate the model. The findings indicated that the tumor and healthy images classification is achieved with a high degree of accuracy with an adequate ability to generalize to the validation dataset.

Keywords : CNN, Brain Tumor Detection, Deep Learning, Pytorch, Tumor Segmentation.

References :

  1. Mahmoud Khaled Abd-Ellah, Ali Ismail Awad, Ashraf A. M. Khalaf and Hesham F. A. Hamed, "Two-phase multi-model automatic brain tumour diagnosis system from magnetic resonance images using convolutional neural networks", in Eurasip Journal on Image and Video Processing, 2018.
  2. Kevin P. Murphy. 2012. Machine Learning: A Probabilistic Perspective. The MIT Press.
  3. S. Shanjida, M. S. Islam and M. Mohiuddin, "Hybrid model-based Brain Tumor Detection and Classification using Deep CNN-SVM," 2024 6th International Conference on Electrical Engineering and Information & Communication Technology (ICEEICT), Dhaka, Bangladesh, 2024, pp. 1467-1472, doi: 10.1109/ICEEICT62016.2024.10534376.
  4. A. Pashaei, H. Sajedi and N. Jazayeri, "Brain Tumor Classification via Convolutional Neural Network and Extreme Learning Machines", Proceedings of the 2018 8th International Conference on Computer and Knowledge Engineering (ICCKE), pp. 314-319, 25–26 October 2018.Prokop, Emily. 2018. The Story Behind. Mango Publishing Group.  Florida, USA.
  5. H. Mohsen, E.-S.A. El-Dahshan, E.-S.M. El-Horbaty and A.-B.M. Salem, "Classification using deep learning neural networks for brain tumors", Future Comput. Inform. J, vol. 3, pp. 68-71, 2018.Brian K. Reid. 1980.   A high-level approach to computer document formatting. In Proceedings of the 7th Annual Symposium on Principles of Programming Languages. ACM, New York, 24–31. https://doi.org/10.1145/567446.567449
  6. GeÌ ron, A. (2019). Hands-on machine learning with Scikit-Learn, Keras and TensorFlow: concepts, tools, and techniques to build intelligent systems (2nd ed.). O'Reilly.
  7. Russell, Stuart J. (Stuart Jonathan), 1962-. Artificial Intelligence: a Modern Approach. Upper Saddle River, N.J. :Prentice Hall, 2010.
  8. Andrew Trask. 2019. Grokking Deep Learning (1st. ed.). Manning Publications Co., USA.
  9. A. Wulandari, R. Sigit and M. M. Bachtiar, "Brain Tumor Segmentation to Calculate Percentage Tumor Using MRI," 2018 International Electronics Symposium on Knowledge Creation and Intelligent Computing (IES-KCIC), Bali, Indonesia, 2018, pp. 292-296, doi: 10.1109/KCIC.2018.8628591. keywords: {Tumors;Brain;Magnetic resonance imaging;Image segmentation;Filtering;Image color analysis;Bones;Thresholding;Segmentation;Brain Tumors;MRI Image},
  10. Abd El Kader Isselmou, Guizhi Xu, Shuai Zhang, Sani Saminu, and Imran Javaid. 2019. Deep Learning Algorithm for Brain Tumor Detection and Analysis Using MR Brain Images. In Proceedings of the 2019 International Conference on Intelligent Medicine and Health (ICIMH 2019). Association for Computing Machinery, New York, NY, USA, 28–32. https://doi.org/10.1145/3348416.3348421
  11. T. P. Pries, R. Jahan and P. Suman, "Review of Brain Tumor Segmentation, Detection and Classification Algorithms in fMRI Images," 2018 International Conference on Computational and Characterization Techniques in Engineering & Sciences (CCTES), Lucknow, India, 2018, pp. 300-303, doi: 10.1109/CCTES.2018.8674150. keywords: {Tumors;Feature extraction;Image segmentation;Classification algorithms;Functional magnetic resonance imaging;Support vector machines;Clustering algorithms;fMRI;brain tumor;machine learning},
  12. Mahmoud Al-Ayyoub, Ghaith Husari, Omar Darwish, and Ahmad Alabed-alaziz. 2012. Machine learning approach for brain tumor detection. In Proceedings of the 3rd International Conference on Information and Communication Systems (ICICS '12). Association for Computing Machinery, New York, NY, USA, Article 23, 1–4. https://doi.org/10.1145/2222444.2222467
  13. A. Goswami and M. Dixit, "An Analysis of Image Segmentation Methods for Brain Tumour Detection on MRI Images," 2020 IEEE 9th International Conference on Communication Systems and Network Technologies (CSNT), Gwalior, India, 2020, pp. 318-322, doi: 10.1109/CSNT48778.2020.9115791. keywords: {Image processing;MRI images;Brain Tumour;Image Segmentation;Image Segmentation Techniques;Brain Tumour Detection},

The early detection of brain tumors and correct diagnosis are key factors capable of influencing the success of treatment and more importantly patient outcome. In this study, we hypothesize that MRI data set of brain tumors can be classified and detected using a deep learning method of Convolutional Neural Network (CNN) built on PyTorch. It utilized a sufficiently large Dataset obtained from Kaggle and incorporated various techniques of data augmentation in the training procedure to enhance its robust and generalization capability. The architecture of the CNN comprises of several convolutional layers, which allows the model to recognize complex features present in the MRI data set. With the network architecture trained using the Adam optimizer, the model could successfully differentiate between tumor and non-tumor images. Model validation metrics such as confusion matrices, accuracy, precision, recall ratio, F1 and other metrics were used to validate the model. The findings indicated that the tumor and healthy images classification is achieved with a high degree of accuracy with an adequate ability to generalize to the validation dataset.

Keywords : CNN, Brain Tumor Detection, Deep Learning, Pytorch, Tumor Segmentation.

Never miss an update from Papermashup

Get notified about the latest tutorials and downloads.

Subscribe by Email

Get alerts directly into your inbox after each post and stay updated.
Subscribe
OR

Subscribe by RSS

Add our RSS to your feedreader to get regular updates from us.
Subscribe