CNN-Transformer Hybrid Model for Accurate Pneumonia Detection in Chest X-Ray Images
Abstract
This research proposes a hybrid deep learning framework that unites Convolutional Neural Networks (CNN) and Transformers for the check-up of pneumonia on chest X-ray images. Traditional CNNs have excellent ability in capturing high-resolution local space features, such as tiny changes in the lung parenchyma's texture, but they fail to capture long-distance context dependencies. To address the issue, the model possesses a Transformer component that utilizes self-attention mechanisms for modelling the global relations among lesions, which are scattered and anatomical structures. This research used a 5,856-image dataset (pneumonia and normal), which used complex preprocessing methods like median filtering and geometry expansions, to ensure strong generalization ability. The experiment measured result displays that the hybrid model does much better than separate CNNs and achieves 94.38% sensitivity and 89.96% accuracy. The analysis of a detailed confusion matrix can show that this architecture has an effect in reducing false negative cases, and it directly responds to the clinical demand that screening must have high sensitivity. These results point out that the model can act as a dependable instrument for diagnosis. It builds a bridge over medical knowledge gaps in scarce resource regions, and it can promote clinical workflow in an effective way.
References
- World Health Organization. (2024). Pneumonia. WHO Health Topics.
- Guo, L., Zhou, C., Xu, J., Huang, C., Yu, Y., Lu, G. (2024). Deep learning for chest X-ray diagnosis: Competition between radiologists with or without artificial intelligence assistance. Journal of Imaging Informatics in Medicine, 37(4), 922–934.
- Rahman, T., et al. (2020). Transfer learning with deep convolutional neural network (CNN) for pneumonia detection using chest X-ray. University of Dhaka.
- Kotei, E., & Thirunavukarasu, R. (2024). Tuberculosis detection from chest X-ray image modalities based on Transformer and convolutional neural network. IEEE Access, 12, 97417–97427.
- Mathur, M. (2020). Pneumonia detection using CNN (92.6% accuracy). Kaggle.
- Widiyanto, W. W., Husen, M. N., Pariyasto, S., & Susanto, E. (2026). Comparative analysis of RGB and grayscale pixel-based similarity methods for lung X-ray image retrieval in clinical decision support systems. Jurnal Teknik Informatika (JUTIF), 6(1), 5854–5864.
- Rahman, T., Khandakar, A., Qiblawey, Y., Tahir, A., Kiranyaz, S., Kashem, S. B. A., Islam, M. T., Al Maadeed, S., Zughaier, S. M., Khan, M. S., & Chowdhury, M. E. (2021). Exploring the effect of image enhancement techniques on COVID-19 detection using chest X-ray images. Computers in Biology and Medicine, 132, 104319.
- Arivoli, A., Golwala, D., & Reddy, R. (n.d.). CoviExpert: COVID-19 detection from chest X-ray using CNN. VIT School.
- Fu, B., Zhang, M., He, J., Cao, Y., Guo, Y., & Wang, R. (2022). toHisNet: A hybrid multi-classification model with CNN and Transformer for gastric pathology images. Computer Methods and Programs in Biomedicine, 224, 106924.
- Gefter, W. B., Post, B. A., & Hatabu, H. (2022). Commonly missed findings on chest radiographs: Causes and consequences. Chest, 163(3), 650–661.