Automated Detection and Segmentation of Pneumonia from Chest X-Ray Images Using a Convolutional Neural Network and U-Net

Authors

  • Mithoo Kailash Department of Artificial Intelligence, Islamia University Bahawalpur, Pakistan.
  • Umer Iqbal Department of Artificial Intelligence, Faculty of Computer Sciences, Lahore Garrison University, Lahore, Pakistan.
  • Muhammad Kashif Siddhu Department of Computer Science, Faculty of Computer Sciences, Lahore Garrison University, Lahore, Pakistan.
  • Muhammad Asif Saleem Department of Artificial Intelligence, Faculty of Computer Sciences, Lahore Garrison University, Lahore, Pakistan.
  • Muhammad Saeed Department of Artificial Intelligence, Faculty of Computer Sciences, Lahore Garrison University, Lahore, Pakistan.

DOI:

https://doi.org/10.56979/1102/2026/1578

Keywords:

Pneumonia Detection, Chest X-ray, Convolutional Neural Network, U-Net Segmentation, Deep Learning, Medical Image Analysis

Abstract

Pneumonia is a severe disease of the lungs with inflammation of the air sacs which can be a cause of severe sickness and end of life, particularly in children and elderly people. The most frequently used method to diagnose pneumonia is to use chest X-ray imaging, however manual diagnosis by radiologists may be timely and prone to errors. This paper presents a deep learning-based automated approach for lung segmentation and pneumonia diagnosis in chest X-ray (CXR) pictures. A Convolutional Neural Network (CNN) model was used to categorize the CXR pictures as either normal or pneumonia, and a U-Net model was used to segment the lung area. The models were trained and tested using a publicly available library of CXR pictures of both normal and pneumonia patients. Before being input into the model during training, each picture was shrunk to 224 × 224 pixels, normalized, and enhanced for optimal performance. It was compared with ResNet-50, MobileNet, Inception-V3, Vision Transformer (ViT), and the Swin Transformer models for the proposed CNN, and with a VGG U-Net model for the proposed U-Net. Compared to all the other comparison models, which varied from 90.43% to 93.34% accuracy and 0.82 to 0.88 recall value for pneumonia cases, the proposed CNN obtained an accuracy of 94.00% using a test set of 1150 CXR pictures and a 0.95 recall value for the pneumonia cases.

Downloads

Published

2026-08-12

How to Cite

Mithoo Kailash, Umer Iqbal, Muhammad Kashif Siddhu, Muhammad Asif Saleem, & Muhammad Saeed. (2026). Automated Detection and Segmentation of Pneumonia from Chest X-Ray Images Using a Convolutional Neural Network and U-Net. Journal of Computing & Biomedical Informatics, 11(02). https://doi.org/10.56979/1102/2026/1578