Deep Learning-Based Multiclass Classification of Chest X-Ray Images using Convolutional Neural Network and Transfer Learning
DOI:
https://doi.org/10.53560/PPASA(63-3)718Keywords:
Deep Learning, CNN, MobileNetV2, Multi-classification of COVID-19, Transfer Learning, Chest X-ray ClassificationAbstract
The COVID-19 pandemic highlighted the need for quick, accurate, and automated diagnostic methods to support healthcare systems, particularly in resource-limited settings. In this study, a deep learning-based framework is developed to categorize chest X-ray images into four classes: COVID-19, viral pneumonia, lung opacity, and normal cases. Two models are implemented and compared: a custom Convolutional Neural Network (CNN) and a pretrained MobileNetV2 model consuming ImageNet weights, with its convolutional backbone kept frozen during training. The experiments are performed utilizing the openly accessible COVID-19 Radiography Database. After removal of exact duplicate images, 21,111 unique X-ray images were retained and partitioned into stratified training, validation, and independent test subsets using a 70%, 15%, 15% split. On the independent test set, the CNN attained an accuracy of 84.34%, whereas MobileNetV2 demonstrated superior performance, achieving an accuracy of 91.63%. Across five folds of MobileNetV2 cross validation, the mean accuracy was 90.29 ± 1.34% (95% Confidence Interval (CI): 88.95-91.63%) and the mean macro F1-score was 91.03 ± 1.04% (95% CI: 89.99 - 92.07%). A McNemar test showed a statistically significant difference favouring MobileNetV2 (p = 2.60 × 10⁻⁶²). These results highlight the potential benefits of transfer learning for this four-class task, whereas the observed variability across independent CNN runs highlights the importance of repeated evaluation.
References
1. M. Ahmed, G. Gilanie, M. Ahsan, H. Ullah, and F.A. Sheikh. Review of artificial intelligence-based COVID-19 detection and a CNN-based model to detect COVID-19 from X-rays and CT images. VFAST Transactions on Software Engineering 11(2): 100-112 (2023). https://doi.org/10.21015/vtse.v11i2.1460
2. G.D. Rubin, C.J. Ryerson, L.B. Haramati, et al. The role of chest imaging in patient management during the COVID-19 pandemic: A multinational consensus statement from the Fleischner Society. Radiology 296(1): 172-180 (2020). https://doi.org/10.1148/radiol.2020201365
3. L. Wang, Z.Q. Lin, and A. Wong. COVID-Net: A tailored deep convolutional neural network design for detection of COVID-19 cases from chest X-ray images. Scientific Reports 10(1): 19549 (2020). https://doi.org/10.1038/s41598-020-76550-z
4. G. Litjens, T. Kooi, B.E. Bejnordi, A.A.A. Setio, F. Ciompi, M. Ghafoorian, J.A.W.M. van der Laak, B. van Ginneken, and C.I. Sánchez. A survey on deep learning in medical image analysis. Medical Image Analysis 42: 60-88 (2017). https://doi.org/10.1016/j.media.2017.07.005
5. C. Shorten and T.M. Khoshgoftaar. A survey on image data augmentation for deep learning. Journal of Big Data 6(1): 60 (2019). https://doi.org/10.1186/s40537-019-0197-0
6. K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. 3rd International Conference on Learning Representations (ICLR), 7-9 May 2015, San Diego, CA, USA (2015). https://arxiv.org/abs/1409.1556
7. A. Narin, C. Kaya, and Z. Pamuk. Automatic detection of coronavirus disease (COVID-19) using X-ray images and deep convolutional neural networks. Pattern Analysis and Applications 24(3): 1207-1220 (2021). https://doi.org/10.1007/s10044-021-00984-y
8. M. Sandler, A. Howard, M. Zhu, A. Zhmoginov, and L.C. Chen. MobileNetV2: Inverted residuals and linear bottlenecks. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 18-23 June 2018, Salt Lake City, UT, USA pp. 4510-4520 (2018). https://doi.org/10.1109/CVPR.2018.00474
9. A. Esteva, A. Robicquet, B. Ramsundar, V. Kuleshov, M. DePristo, K. Chou, C. Cui, G. Corrado, S. Thrun, and J. Dean. A guide to deep learning in healthcare. Nature Medicine 25(1): 24-29 (2019). https://doi.org/10.1038/s41591-018-0316-z
10. S. Kornblith, J. Shlens, and Q.V. Le. Do better ImageNet models transfer better? Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 15-20 June 2019, Long Beach, CA, USA pp. 2656-2666 (2019). https://doi.org/10.1109/CVPR.2019.00277
11. D. Ezzat, A.E. Hassanien, and H.A. Ella. An optimized deep learning architecture for the diagnosis of COVID-19 disease based on gravitational search optimization. Applied Soft Computing 98: 106742 (2021). https://doi.org/10.1016/j.asoc.2020.106742
12. M. Rahimzadeh and A. Attar. A modified deep convolutional neural network for detecting COVID-19 and pneumonia from chest X-ray images based on the concatenation of Xception and ResNet50V2. Informatics in Medicine Unlocked 19: 100360 (2020). https://doi.org/10.1016/j.imu.2020.100360
13. S. Minaee, R. Kafieh, M. Sonka, S. Yazdani, and G.J. Soufi. Deep-COVID: Predicting COVID-19 from chest X-ray images using deep transfer learning. Medical Image Analysis 65: 101794 (2020). https://doi.org/10.1016/j.media.2020.101794
14. I.D. Apostolopoulos and T.A. Mpesiana. COVID-19: Automatic detection from X-ray images utilizing transfer learning with convolutional neural networks. Physical and Engineering Sciences in Medicine 43(2): 635-640 (2020). https://doi.org/10.1007/s13246-020-00865-4
15. Y. Oh, S. Park, and J.C. Ye. Deep learning COVID-19 features on chest X-ray using limited training data sets. IEEE Transactions on Medical Imaging 39(8): 2688-2700 (2020). https://doi.org/10.1109/TMI.2020.2993291
16. Kaggle. COVID-19 Radiography Database. Kaggle Datasets Repository (2021). https://www.kaggle.com/datasets/tawsifurrahman/covid19-radiography-database
17. M.E.H. Chowdhury, T. Rahman, A. Khandakar, M.A. Ayari, A.Z. Khan, M.S. Khan, N. Al-Emadi, M.B.I. Reaz, M.T. Islam, and S.H.M. Ali. Can AI help in screening viral and COVID-19 pneumonia? IEEE Access 8: 132665-132676 (2020). https://doi.org/10.1109/ACCESS.2020.3010287
18. Y. Brima, M. Atemkeng, S.T. Djiokap, J. Ebiele, and F. Tchakounté. Transfer Learning for the Detection and Diagnosis of Types of Pneumonia including Pneumonia Induced by COVID-19 from Chest X-ray Images. Diagnostics 11(8): 1480 (2021). https://doi.org/10.3390/diagnostics11081480
19. I. Goodfellow, Y. Bengio, and A. Courville. Deep Learning. MIT Press, Cambridge, MA, USA (2016).
20. G. Mohan, M.M. Subashini, S. Balan, et al. A multiclass deep learning algorithm for healthy lung, COVID-19 and pneumonia disease detection from chest X-ray images. Discover Artificial Intelligence 4: 20 (2024). https://doi.org/10.1007/s44163-024-00110-x
21. H. Lamouadene, M. El Kassaoui, M. El Yadari, A. El Kenz, A. Benyoussef, A. El Moutaouakil, and O. Mounkachi. Detection of COVID-19, lung opacity, and viral pneumonia via X-ray using machine learning and deep learning. Computers in Biology and Medicine 191: 110131 (2025). https://doi.org/10.1016/j.compbiomed.2025.110131
22. X. Song, A 19-layer convolutional neural network for accurate COVID-19 detection in chest X-ray images: Comparative analysis with pretrained networks. Scientific Reports 16: 25141 (2026). https://doi.org/10.1038/s41598-026-49315-3
23. M.K. Islam, S.U. Habiba, T.A. Khan, and F. Tasnim. COV-RadNet: A deep convolutional neural network for automatic detection of COVID-19 from chest X-rays and CT scans. Computer Methods and Programs in Biomedicine Update 2: 100064 (2022). https://doi.org/10.1016/j.cmpbup.2022.100064
24. A. Gopatoti and P. Vijayalakshmi. MTMC-AUR2CNet: Multi-textural multi-class attention recurrent residual convolutional neural network for COVID-19 classification using chest X-ray images. Biomedical Signal Processing and Control 85: 104857 (2023). https://doi.org/10.1016/j.bspc.2023.104857
25. T.G. Dietterich. Approximate statistical tests for comparing supervised classification learning algorithms. Neural Computation 10(7): 1895-1923 (1998). https://doi 10.1162/089976698300017197

