The Use of Convolution Neural Networks to Classify Viral Pneumonia and COVID-19 by Using Chest X-ray Images


  • Mayssam Alwan Hasson
  • Taha Mohammed Hassan
  • Alaa Jalal Abdullah
  • Sarah Mohemmed Fawzi Hussein



Convolution Neural Networks, Chest CT scan image, COVID-19 Diagnosis using Deep Learning, Pneumonia, Deep Learning.


The novel coronavirus outbreak reached pandemic status in March-2020. Since then, many countries have collaborated in the fight against COVID-19. The main objective of these governments is the rapid and effective identification of COVID-19-positive patients. While many molecular tests currently exist, not all hospitals have immediate access to these. However, X-rays, which are easily accessible in the majority of hospitals, provide different ways to detect COVID-19. This article discusses the use of neural networks for the classification of radiographic images of patients with pneumonia and COVID-19. Precision, Recall, and F1-score were used to select the best resizing parameters and adaptive equalization of the brightness histogram of images, as well as the optimal architecture of the neural network and its hyperparameters. The high values of these classification quality metrics obtained accuracy (97%) for patients with COVID-19, and accuracy (99%) for patients with pneumonia. These results strongly indicate a reliable differentiation of radiographic images. This opens up the possibility of creating a model with good predictive ability without involving ready-made complex models and preliminary training on third-party data.


Wu F, Zhao S, Yu B, et al." A new Coronavirus associated with human respiratory disease in China". Nature 2020; 579(7798): 265.

World Health Organization. Pneumonia of unknown cause -China. Source:-

Veselova EI, Russkikh AE, Kaminskiy GD, Lovacheva OV,Samoylova AG, Vasilyeva IA." Novel coronavirus infection." Tuberculosis and Lung Diseases, 2020; 98(4): 6-14. DOI: 10.21292/2075-1230-2020-98-4-6-14.

Pashina TA, Gaidel AV, Zelter PM, Kapishnikov AV, Nikonorov AV." Automatic highlighting of the region of interest in computed tomography images of the lungs".Computer Optics 2020; 44(1): 74-81. DOI: 10.18287/2412-6179-CO-659.

Li L, et al. "Using artificial intelligence to detect COVID-19 and community-acquired pneumonia based on pulmonary CT: Evaluation of the diagnostic accuracy". Radiology 2020; 296(2): E65-E71. DOI: 10.1148/radiol.2020200905.

Nath M, Choudhury C." Automatic detection of pneumonia from chest X-Rays using deep learning". In Book: Bhattacharjee A, Borgohain S, Soni B, Verma G, Gao XZ, eds. Machine learning, image processing, network security, and data sciences. Singapore: Springer; 2020:175-182. DOI: 10.1007/978-981-15-6315-7_14.

Okeke S, et al. "An efficient deep learning approach to pneumonia classification in healthcare". J Healthc Eng 2019; 2019: 4180949. DOI: 10.1155/2019/4180949.

Swapnarekha H, et al. "Role of intelligent computing in COVID-19 prognosis: A state-of-the-art review". Chaos Solitons Fractals 2020; 138:109947. DOI: 10.1016/j.chaos.2020.109947

Wang L, Wong A." COVID-Net: A tailored deep convolutional neural network design for detection of COVID-19 cases from chest X-Ray images". 2020. Source:-

Ozturk T, et al." Automated detection of COVID-19 cases using deep neural networks with X-ray images". Comput Biol Med 2020; 121: 103792. DOI: 10.1016/ j.compbiomed.2020.103792.

Loey M, Smarandache F, Khalifa NEM. "Within the lack of chest COVID-19 X-Ray dataset: A novel detection model based on GAN and deep transfer learning". Symmetry 2020; 12:651. DOI: 10.3390/sym12040651.

Apostolopoulos ID, Mpesiana TA." COVID-19: automatic detection from X-Ray images utilizing transfer learning with convolutional neural networks". Phys Eng Sci Med 2020; 43(2): 635-640. DOI: 10.1007/s13246-020-00865-4.

Tuncer T, Dogan S, Ozyurt F." An automated residual exemplar local binary pattern and iterative reliefF based COVID-19 detection method using chest X-Ray image". Chemom Intelli Lab Syst 2020; 203: 104054. DOI: 10.1016/ j.chemolab.2020.104054.

CoronaHack –"Chest X-Ray-Dataset. Classify the X-Ray image which is having Corona." source:-

Gonzalez RC, Woods RE. "Digital image processing. 3rd ed. Pearson Education "Inc.; 2008.

Chollet F." Deep learning with Python. New York: Manning "Publications; 2017. ISBN 9781617294433 384 pages.

Müller AC, Guido S. "Introduction to machine learning with Python: A guide for data scientists". O'Reilly Media; 2016.




How to Cite

Mayssam Alwan Hasson, Taha Mohammed Hassan, Alaa Jalal Abdullah, & Sarah Mohemmed Fawzi Hussein. (2024). The Use of Convolution Neural Networks to Classify Viral Pneumonia and COVID-19 by Using Chest X-ray Images. Academic Science Journal, 2(1), 291–304.