Research Article

SA-ResNet50: A Four-Class Classification Model for Lung Diseases in Chest X-rays

Qi Deng*
School of Artificial Intelligence, Southeast University, Nanjing, China

* Corresponding author: [email protected]

Abstract

Deep learning in medical image analysis is becoming more important for diagnosing disease, especially when it comes to spotting stuff like COVID-19 and pneumonia in CXR pictures of someone's chest. But it is inevitable that there will be some limitations for CNN in terms of CXR images because it always has blurred and unclear edges, strange shape and low contrast with other tissues around the lesion area. And these usually cause wrong localizations and some important informations will be lost when extracting features. So it is hard for classification models to do well. In order to solve above problems, I propose the SA-ResNet50 architecture in which a spatial attention block is introduced inside residual bottleneck blocks of ResNet-50. This work contributes in some ways. First is to improve classification accuracy by improving the localization and representation of important lesion area. Second, in a complete pneumonia data set, the Accuracy is 0.9847, the Precision is 0.9826, the Recall is 0.9827, the F1-Score is 0.9826, and the Specificity is 0.9939. By doing full-comparison experiment about every baseline model and detailed ablation studies, I will strictly demonstrate it is effective and better than others. The experimental results not only validate the efficacy of this model, but also propose new ways and references to deal with similar issues in other fields related to recognizing pictures of medicine.

Keywords: Deep Learning; Spatial Attention Mechanism; Chest X-ray; Lung Disease Classification; ResNet-50
Published: September 24, 2025
DOI: 10.54254/2755-2721/2025.BJ27210
Volume: ACE Vol.183
pp. 92-101
Download PDF

References

  1. X. Wang, Y. Peng, L. Lu, Z. Lu, M. Bagheri and R. M. Summers, "ChestX-Ray8: Hospital-Scale Chest X-Ray Database and Benchmarks on Weakly-Supervised Classification and Localization of Common Thorax Diseases, " 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, HI, USA, 2017, pp. 3462-3471.
  2. G. N. Hounsfield, "Computerized transverse axial scanning (tomography): Part 1. Description of system, " British Journal of Radiology, vol. 46, no. 552, pp. 1016-1022, Dec. 1973.
  3. P. C. Lauterbur, "Image Formation by Induced Local Interactions: Examples Employing Nuclear Magnetic Resonance, " Nature, vol. 242, no. 5394, pp. 190-191, Mar. 1973.
  4. Y. LeCun et al., "Backpropagation Applied to Handwritten Zip Code Recognition, " in Neural Computation, vol. 1, no. 4, pp. 541-551, Dec. 1989.
  5. A. Krizhevsky, I. Sutskever, and G. E. Hinton, "ImageNet classification with deep convolutional neural networks, " in Advances in Neural Information Processing Systems 25 (NIPS 2012), 2012, pp. 1097-1105.
  6. K. Simonyan and A. Zisserman, "Very deep convolutional networks for large-scale image recognition, " presented at the International Conference on Learning Representations (ICLR), 2015.
  7. K. He, X. Zhang, S. Ren and J. Sun, "Deep Residual Learning for Image Recognition, " 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 2016, pp. 770-778.
  8. J. Hu, L. Shen, S. Albanie, G. Sun, and E. Wu, "Squeeze-and-excitation networks, " in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018, pp. 7132-7141.
  9. M. Jaderberg, K. Simonyan, A. Zisserman, and K. Kavukcuoglu, "Spatial transformer networks, " in Advances in Neural Information Processing Systems 28 (NIPS 2015), 2015, pp. 2017-2025.
  10. S. Woo, J. Park, J.-Y. Lee, and I. S. Kweon, "CBAM: Convolutional block attention module, " in Proceedings of the European Conference on Computer Vision (ECCV), 2018, pp. 3-19.
  11. T. Wang, Y. Zhao, L. Zhu, G. Liu, Z. Ma and J. Zheng, "Lung CT image aided detection COVID-19 based on Alexnet network, " 2020 5th International Conference on Communication, Image and Signal Processing (CCISP), Chengdu, China, 2020, pp. 199-203.
  12. K. H. Shibly, S. K. Dey, M. Tahzib-Ul-Islam, and M. M. Rahman, "COVID faster R–CNN: A novel framework to Diagnose Novel Coronavirus Disease (COVID-19) in X-Ray images, " Informatics in Medicine Unlocked, vol. 20, p. 100405, 2020.
  13. H. Tahir, A. Iftikhar and M. Mumraiz, "Forecasting COVID-19 via Registration Slips of Patients using ResNet-101 and Performance Analysis and Comparison of Prediction for COVID-19 using Faster R-CNN, Mask R-CNN, and ResNet-50, " 2021 International Conference on Advances in Electrical, Computing, Communication and Sustainable Technologies (ICAECT), Bhilai, India, 2021, pp. 1-6.
  14. Wang, L., Lin, Z.Q. Wong, “A. COVI D-Net: a tailored deep convolutional neural network design for detection of COVID-19 cases from chest X-ray images, ”  Sci Rep  10, 19549 ( 2020 ). https: //doi.org/10.1038/s41598–020-76550-z.
  15. D. K. Redie, “Diagnosis of COVID-19 using chest X-ray images based on modified DarkCovidNet model, ”  Evol. Intell., pp. 1–10, 2022.
  16. J. T. Townsend, "Theoretical analysis of an alphabetic confusion matrix, " Perception & Psychophysics, vol. 9, no. 1, pp. 40-50, 1971.
  17. A. Kent, M. M. Berry, F. U. Luehrs, Jr., and J. W. Perry, "Machine literature searching VIII. Operational criteria for designing information retrieval systems, " American Documentation, vol. 6, no. 2, pp. 93-101, 1955.
  18. C. J. Van Rijsbergen, Information Retrieval, 2nd ed. London, UK: Butterworth-Heinemann, 1979.
  19. J. Yerushalmy, "Statistical problems in assessing methods of medical diagnosis, with special reference to X-ray techniques, " Public Health Reports, vol. 62, no. 40, pp. 1432-1449, 1947.