KLASIFIKASI PENYAKIT PNEUMONIA MENGGUNAKAN MODEL HYBRID CNN-TRANSFORMER BERBASIS CITRA X-RAY PARU-PARU
##plugins.themes.academic_pro.article.main##
Abstract
This study aims to apply a Hybrid CNN-Transformer model based on Medical Vision Transformer (MedViT) for pneumonia classification using chest X-Ray images. The dataset consisted of 450 images, including 150 pneumonia images, 150 non-pneumonia images, and 150 random images as a control class to test system robustness. The data were obtained from Labuang Baji Hospital, Makassar, during the 2023 to 2025 period. The research stages included data collection, preprocessing, augmentation, dataset splitting, model implementation, training, and performance evaluation. The tested models consisted of CNN, Vision Transformer (ViT), and Hybrid CNN-Transformer. The evaluation used accuracy, precision, recall, F1-score, AUC, confusion matrix, ROC curve, and Grad-CAM visualization. The results showed that the Hybrid CNN-Transformer model achieved the best performance with an accuracy of 95.59%, precision of 96.12%, recall of 95.59%, F1-score of 95.58%, and AUC of 0.9968. The model improved accuracy by 8.83% compared with CNN and produced fewer classification errors. The Grad-CAM visualization also indicated that the model focused on relevant lung areas. These findings indicate that combining CNN local feature extraction with Transformer global context can improve pneumonia classification based on medical images..
##plugins.themes.academic_pro.article.details##

This work is licensed under a Creative Commons Attribution 4.0 International License.
References
[2] Mathi, S., Deb, D., Chaudhuri, A. K., Joseph, L., & Biswas, S. (2025). A Review Of Convolutional Neural Networks For Medical Image Analysis: Trends And Future Directions. Journal of Neonatal Surgery, 14(7), 90–97. https://doi.org/10.63682/jns.v14i7.5117
[3] Rahmadewi, P., Yanti, J., Harahap, K., & Indra, E. (2023). Algoritma Deep Learning untuk Pengklasifikasian Penyakit Radang Paru-Paru pada Citra Chest X-Ray dengan Convolutional Neural Network diderita pasien ( Klasifikasi Penyakit Paru-Paru Berbasis Pengolahan Citra X Ray Menggunakan Convolutional Neural Network. Jurnal Teknlogi Informatika Dan Komputer MH. Thamrin, 9(1), 14–23.
[4] Takahashi, S., Sakaguchi, Y., Kouno, N., Takasawa, K., Ishizu, K., Akagi, Y., Aoyama, R., Teraya, N., Bolatkan, A., Shinkai, N., Machino, H., Kobayashi, K., Asada, K., Komatsu, M., Kaneko, S., Sugiyama, M., & Hamamoto, R. (2024). Comparison of Vision Transformers and Convolutional Neural Networks in Medical Image Analysis: A Systematic Review. Journal of Medical Systems, 48(1), 1–22. https://doi.org/10.1007/s10916-024-02105-8
[5] Taula’bi, W. K. S., Wahyudin, B., & Hariadi, A. (2024). Karakteristik Pneumonia Pada Balita Di RSUD Labuang Baji Makassar Tahun 2021 - 2022. Bosowa Medical Journal, 2(1), 29–33. https://doi.org/10.56326/bmj.v2i1.5012
[6] Zahra, M., & Rosfadilla, P. (2025). Muthia Zahra 1 , Puspa Rosfadilla 2 Fakultas Kedokteran Universitas Malikussaleh 1 , Departemen Ilmu Pulmonoligi dan Respirasi RSUD Cut Meutia Aceh Utara 2. Jurnal Riset Ilmu Kesehatan Umum, 3(2), 147–153.
[7] Althubiti, S. A., Al-Ataby, A., & Ashour, W. M. (2024). A hybrid CNN-Vision Transformer approach for enhanced pneumonia detection in chest X-ray images. Diagnostics, 14(3), 285. https://doi.org/10.3390/diagnostics14030285
[8] Dosovitskiy, A., Beyer, L., Kolesnikov, A., Weissenborn, D., Zhai, X., Unterthiner, T., Dehghani, M., Minderer, M., Heigold, G., Gelly, S., Uszkoreit, J., & Houlsby, N. (2021). An image is worth 16x16 words: Transformers for image recognition at scale. International Conference on Learning Representations, 1–21. https://doi.org/10.48550/arXiv.2010.11929
[9] Hasan, M. M., Islam, M. R., & Kibria, M. G. (2023). Lightweight hybrid CNN-Transformer model for automatic pneumonia classification from chest radiograph images. Informatics in Medicine Unlocked, 41, 101320. https://doi.org/10.1016/j.imu.2023.101320
[10] Kermany, D. S., Goldbaum, M., Cai, W., Valentim, C. C., Liang, H., Baxter, S. L., McKeown, A., Yang, G., Wu, X., Yan, F., Dong, J., Prasadha, M. K., & Zhang, K. (2018). Identifying medical diagnoses and treatable diseases by image-based deep learning. Cell, 172(5), 1122–1131. https://doi.org/10.1016/j.cell.2018.02.010
[11] Rajaraman, S., Candemir, S., Kim, I., Thoma, G., & Antani, S. (2018). Visualization and interpretation of convolutional neural network predictions in detecting pneumonia in pediatric chest radiograph. Applied Sciences, 8(8), 1397. https://doi.org/10.3390/app8081397
[12] Selvaraju, R. R., Cogswell, M., Das, A., Vedantam, R., Parikh, D., & Batra, D. (2017). Grad-CAM: Visual explanations from deep networks via gradient-based localization. IEEE International Conference on Computer Vision, 618–626. https://doi.org/10.1109/ICCV.2017.74
[13] Siddiqi, R. (2024). Robust chest X-ray classification for pneumonia detection: Leveraging hybrid deep learning architectures. Biomedical Signal Processing and Control, 88, 105612. https://doi.org/10.1016/j.bspc.2023.105612