ABSTRACT
Pneumonia remains a significant cause of morbidity and mortality worldwide, particularly in vulnerable populations such as children and the elderly. Early detection through chest X-ray analysis plays a crucial role in timely treatment; however, reliance on radiologists can lead to variability, delays, and diagnostic errors. This paper presents a convolutional neural network (CNN) designed to automate pneumonia diagnosis from chest X-ray images, addressing the need for faster and more consistent diagnostic solutions. The model was trained and validated on a publicly available dataset containing chest X-ray images labeled as either pneumonia or normal. Data augmentation techniques, such as rotation, scaling, and flipping, were applied to enhance generalization and mitigate class imbalance. The architecture consists of multiple convolutional layers, batch normalization, max pooling, and dropout layers to extract and classify image features effectively. The CNN achieved an accuracy of 90.22% and an AUC score of 0.96 on the test set. Precision, recall, and F1-score metrics demonstrate the model’s robust performance, with a recall of 96% for pneumonia cases, indicating a low rate of false negatives. The receiver operating characteristic (ROC) curve and confusion matrix further validate the model’s efficacy in distinguishing pneumonia from normal cases. This study highlights the potential of AI-driven diagnostic tools to improve pneumonia detection, particularly in resource-limited settings. The proposed model can assist radiologists by providing rapid and reliable interpretations, ultimately enhancing patient outcomes and reducing the burden on healthcare systems. Future work will focus on expanding datasets and refining the architecture for even greater accuracy and stability.