Analisis Klasifikasi Tumor Otak dengan Algoritma Berbasis Convolutional Neural Network dan Transformers
Keywords:
CNN, Vision Transformer, Brain Tumor, MRI Images, Deep LearningAbstract
This study focuses on comparing the performance of Convolutional Neural Networks (CNN) and Vision Transformers (ViT) in classifying brain tumors using Magnetic Resonance Imaging (MRI) data. The MRI images are grouped into four categories: normal, glioma, meningioma, and pituitary, which represent healthy brain conditions and several common types of brain tumors. Before the classification process, data preprocessing was carried out to improve image quality and consistency. This included resizing images and normalizing intensity values. The dataset was then divided into training and testing sets using three different ratios: 70:30, 80:20, and 90:10, allowing the models to be evaluated under varying data conditions.The CNN and ViT models were designed to extract important features from medical images using different approaches. CNN uses convolutional and pooling layers to capture local spatial features, making it well suited for identifying texture and structural patterns in MRI images. In contrast, ViT applies a self-attention mechanism that enables the model to learn global relationships across the entire image. To make the system more user-friendly, a graphical user interface (GUI) based on Tkinter was developed. This interface allows users to select datasets, train the models, and view evaluation results such as graphs and confusion matrices interactively. Model performance was assessed using accuracy, precision, recall, and F1-score metrics. The results show that CNN consistently achieved more stable and higher performance across all data splits. At the 90:10 ratio, CNN reached an accuracy of 95%, while ViT achieved 88%. Similar trends were observed at the 80:20 and 70:30 ratios
References
[1] O. Akbar, E. Utami, and D. Ariatmanto, “Deteksi Tumor Otak Melalui Gambar MRI Berdasarkan Vision Transformers dengan TensorFlow dan Keras,” Jurnal Informatika Universitas Pamulang, vol. 8, no. 3, pp. 385–392, 2023.
[2] R. Andre, B. Wahyu, and R. Purbaningtyas, “Klasifikasi Tumor Otak Menggunakan Convolutional Neural Network dengan Arsitektur EfficientNet-B3,” 2021.
[3] R. F. Citra, F. Indriyani, and I. R. Rahadjeng, “Klasifikasi Tumor Otak Berbasis Magnetic Resonance Imaging Menggunakan Algoritma Convolutional Neural Network,” 2024.
[4] A. Dosovitskiy, L. Beyer, A. Kolesnikov, D. Weissenborn, X. Zhai, T. Unterthiner, et al., “An Image is Worth 16×16 Words: Transformers for Image Recognition at Scale,” 2021.
[5] M. Hasan Fadlun and U. Hayati, “Klasifikasi Tumor Otak Menggunakan Convolutional Neural Network dan Transfer Learning,” 2024.
[6] W. Hastomo, Sugiyanto, and Sudjiran, “Convolution Neural Network Arsitektur MobileNet-V2 Untuk Mengklasifikasi Tumor Otak,” 2021.
[7] M. A. L. Khaniki, et al., “Brain Tumor Classification Using Vision Transformer with Selective Cross-Attention Mechanism and Feature Calibration,” 2025.
[8] Z. Li, et al., “Vision Transformer-Based Weakly Supervised Histopathological Image Analysis of Primary Brain Tumors,” 2023.
[9] V. Nikhil and M. Rithani, “Enhanced Brain Tumor Classification: A Comprehensive Analysis of CNN Models and Vision Transformers for Improved Diagnosis,” 2024.
[10] I. B. L. M. Suta, R. S. Hartati, and Y. Divayana, “Diagnosa Tumor Otak Berdasarkan Citra MRI,” 2019.
Downloads
Published
Issue
Section
License
Copyright (c) 2026 Zhafar Usamah, Arya Adyhaksa Waskita , Taswanda Taryo

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
