Pneumonia remains a leading cause of morbidity and mortality worldwide, particularly among children and the elderly. Early and accurate diagnosis is vital to improving patient outcomes; however, manual chest X-ray interpretation requires specialized expertise and is prone to subjectivity. Deep learning offers a promising solution by automating diagnosis while reducing diagnostic delays and improving accessibility. This study develops and evaluates a lightweight Convolutional Neural Network (CNN) model for binary classification of chest X-ray images into “Normal” and “Pneumonia” categories.
The publicly available Kaggle Chest X-Ray Pneumonia dataset, comprising 5,863 pediatric radiographs, was used for training, validation, and testing. Images were preprocessed through resizing, normalization, and data augmentation techniques including flipping and rotation to enhance model generalization. The CNN architecture included three convolutional blocks followed by dense layers, dropout regularization, and a final sigmoid classifier. Training was conducted for 15 epochs with the Adam optimizer, and performance was assessed using accuracy, precision, recall, and F1-score.
Results demonstrate a test accuracy of 76.6%, with precision of 90% for pneumonia cases and recall of 94% for normal cases. The model showed strong diagnostic capability for normal scans but occasionally misclassified subtle pneumonia features, as confirmed by means of qualitative error analysis. Despite these limitations, the CNN achieved balanced performance with reduced computational complexity, making it suitable for deployment in resource-limited settings.
In conclusion, this study highlights the potential of efficient CNN architectures for supporting pneumonia diagnosis, offering a scalable and interpretable tool for clinical decision support and preliminary screening.
