Identifikasi Penyakit Tuberkulosis pada Citra X-Ray Paru Menggunakan Swin Transformer dengan Pendekatan Out-of-Distribution Detection
DOI:
https://doi.org/10.57250/ajst.v4i1.2731Kata Kunci:
Tuberkulosis, Citra X-Ray, Swin Transformer, Out-of-Distribution Detection, Deep LearningAbstrak
Penelitian ini bertujuan mengimplementasikan arsitektur Swin Transformer untuk mengidentifikasi penyakit tuberkulosis pada citra X-Ray paru serta mengevaluasi kemampuan pendekatan Out-of-Distribution Detection dalam mengenali citra yang tidak sesuai dengan distribusi data pelatihan. Data penelitian terdiri atas 1.272 citra yang terbagi seimbang ke dalam tiga kelas, yaitu Tuberkulosis, Non-Tuberkulosis, dan Tidak Dikenali/Out-of-Distribution Detection. Tahapan penelitian meliputi seleksi kualitas citra, resize ke ukuran 384 x 384 piksel, augmentasi data latih, pelatihan model Swin Transformer, serta evaluasi menggunakan accuracy, macro F1-score, confusion matrix, dan AUC. Hasil penelitian menunjukkan bahwa model Swin Transformer tunggal memperoleh accuracy 83,59% dan macro F1-score 83,59% pada klasifikasi Tuberkulosis dan Non-Tuberkulosis. Model Hybrid Swin Transformer + Out-of-Distribution Detection menghasilkan kinerja lebih baik dengan accuracy 89,06%, macro F1-score 89,10%, dan Out-of-Distribution Detection Rate 98,44%. Temuan ini menunjukkan bahwa integrasi Out-of-Distribution Detection mampu meningkatkan keandalan sistem karena model tidak memaksakan prediksi terhadap citra yang tidak relevan. Sistem yang dikembangkan dapat digunakan sebagai alat bantu skrining awal, dengan keputusan akhir tetap berada pada tenaga medis.
Referensi
Ahmad, K., Rehman, H. U., Shah, B., Ali, F., & Hussain, I. (2025). Dual-model approach for accurate chest disease detection using GViT and Swin Transformer V2. Scientific Reports, 15(1), 1-22. https://doi.org/10.1038/s41598-025-16422-6
Alsayed, S. S. R., & Gunosewoyo, H. (2023). Tuberculosis: Pathogenesis, current treatment regimens and new drug targets. International Journal of Molecular Sciences, 24(6). https://doi.org/10.3390/ijms24065202
Archana, R., & Jeevaraj, P. S. E. (2024). Deep learning models for digital image processing: A review. Artificial Intelligence Review, 57(1). https://doi.org/10.1007/s10462-023-10631-z
Cui, P., & Wang, J. (2022). Out-of-distribution detection based on deep learning: A review. Electronics, 11(21), 1-19. https://doi.org/10.3390/electronics11213500
El-Ghany, S. A., Elmogy, M., Mahmood, M. A., & Abd El-Aziz, A. A. (2024). A robust tuberculosis diagnosis using chest X-rays based on a hybrid Vision Transformer and principal component analysis. Diagnostics, 14(23). https://doi.org/10.3390/diagnostics14232736
Hong, Z., Yue, Y., Chen, Y., Cong, L., Lin, H., Luo, Y., Wang, M. H., Wang, W., Xu, J., Yang, X., Chen, H., Li, Z., & Xie, S. (2024). Out-of-distribution detection in medical image analysis: A survey. arXiv. http://arxiv.org/abs/2404.18279
Jiang, W., Zhang, H., Li, Z., Jiang, X., Shao, J., Yang, X., Xiong, J., Zhou, P., Zhang, H., Wang, H., Yu, J., Su, X., Wang, Y., Liu, J., & Li, Z. (2025). AI-powered chest X-ray for diagnosing pulmonary tuberculosis in county and township health care facilities in Yichang: Retrospective, real-world study. Journal of Medical Internet Research, 27, e83041. https://doi.org/10.2196/83041
Karimi, F., Farnia, F., & Bae, K. T. (2025). Robust detection of out-of-distribution shifts in chest X-ray imaging. Journal of Imaging Informatics in Medicine. https://doi.org/10.1007/s10278-025-01559-7
Lestari, T., Fuady, A., Yani, F. F., Putra, I. W. G. A. E., Pradipta, I. S., Chaidir, L., Handayani, D., Fitriangga, A., Loprang, M. R., Pambudi, I., Ruslami, R., & Probandari, A. (2023). The development of the national tuberculosis research priority in Indonesia: A comprehensive mixed-method approach. PLoS ONE, 18(2), 1-14. https://doi.org/10.1371/journal.pone.0281591
Liu, Z., Lin, Y., Cao, Y., Hu, H., Wei, Y., Zhang, Z., Lin, S., & Guo, B. (2021). Swin Transformer: Hierarchical Vision Transformer using shifted windows. Proceedings of the IEEE International Conference on Computer Vision, 9992-10002. https://doi.org/10.1109/ICCV48922.2021.00986
Mahajaya, N. S., Ayu, P. D. W., & Huizen, R. R. (2024). Classification of lung diseases in X-ray images using transformer-based deep learning models. Jurnal Nasional Pendidikan Teknik Informatika (JANAPATI), 13(3), 494-505. https://doi.org/10.23887/janapati.v13i3.81425
Oloko-Oba, M., & Viriri, S. (2022). A systematic review of deep learning techniques for tuberculosis detection from chest radiograph. Frontiers in Medicine, 9, 1-11. https://doi.org/10.3389/fmed.2022.830515
Pu, Q., Xi, Z., Yin, S., Zhao, Z., & Zhao, L. (2024). Advantages of transformer and its application for medical image segmentation: A survey. BioMedical Engineering Online, 23(1), 1-22. https://doi.org/10.1186/s12938-024-01212-4
Rana, N., Coulibaly, Y., Noor, A., Noor, T. H., Alam, M. I., Khan, Z., Tahir, A., & Khan, M. Z. (2025). Improved Swin Transformer-based thorax disease classification with optimal feature selection using chest X-ray. PLoS ONE, 20(6), e0327099. https://doi.org/10.1371/journal.pone.0327099
Showkatian, E., Salehi, M., Ghaffari, H., Reiazi, R., & Sadighi, N. (2022). Deep learning-based automatic detection of tuberculosis disease in chest X-ray images. Polish Journal of Radiology, 87, e118-e124. https://doi.org/10.5114/pjr.2022.113435
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), 84. https://doi.org/10.1007/s10916-024-02105-8
Visu, P., Sathiya, V., Ajitha, P., & Surendran, R. (2025). Enhanced Swin Transformer based tuberculosis classification with segmentation using chest X-ray. Journal of X-Ray Science and Technology, 33(1), 167-186. https://doi.org/10.1177/08953996241300018
WHO. (2024). Global tuberculosis report 2024. World Health Organization. https://www.who.int/publications/i/item/9789240101531
Wollek, A., Willem, T., Ingrisch, M., Sabel, B., & Lasser, T. (2024). Out-of-distribution detection with in-distribution voting using the medical example of chest X-ray classification. Medical Physics, 51(4), 2721-2732. https://doi.org/10.1002/mp.16790
Xia, Q., Zheng, H., Zou, H., Luo, D., Tang, H., Li, L., & Jiang, B. (2025). A comprehensive review of deep learning for medical image segmentation. Neurocomputing, 613. https://doi.org/10.1016/j.neucom.2024.128740
Yayan, J., Franke, K.-J., Berger, M., Windisch, W., & Rasche, K. (2024). Early detection of tuberculosis: A systematic review. Pneumonia, 16(1). https://doi.org/10.1186/s41479-024-00133-z
Yulvina, R., Putra, S. A., Rizkinia, M., Pujitresnani, A., Tenda, E. D., Yunus, R. E., Djumaryo, D. H., Yusuf, P. A., & Valindria, V. (2024). Hybrid Vision Transformer and Convolutional Neural Network for multi-class and multi-label classification of tuberculosis anomalies on chest X-ray. Computers, 13(12), 1-29. https://doi.org/10.3390/computers13120343
Zhou, W., Cheng, G., Zhang, Z., Zhu, L., Jaeger, S., Lure, F. Y. M., & Guo, L. (2022). Deep learning-based pulmonary tuberculosis automated





