Abstract
Chest X-rays are a time-consuming, interpretation-heavy, and variable process in diagnosing pneumonia, a respiratory disease. This paper presents PneuNet, our unique convolutional neural network (CNN) structured to improve pneumonia identification by overcoming the challenges posed by chest X-ray interpretation processes. When interpreting pneumonia in a chest X-ray, deep learning, especially CNNs have demonstrated strength in medical imaging, and existing models such as Xception and MobileNet reported high pneumonia identification accuracies, with MobileNet being smaller and designed for use in resource-constrained edge devices. However, pre-trained models often do not adequately identify pneumonia because of a lack of customization. Therefore we designed PneuNet with four targeted innovations: depthwise separable convolutions for computational efficiency, Squeeze-and-Excitation (SE) blocks to emphasize informative channels, Atrous Spatial Pyramid Pooling (ASPP) for multiscale context, and a novel Learnable Pooling layer that replaces fixed global average pooling with trainable spatial weighting (1 × 1 convolution + sigmoid). This enables the model to dynamically focus on pneumonia-relevant lung regions instead of uniformly averaging features. PneuNet was trained and evaluated on the publicly available Chest X-ray Pneumonia Kaggle dataset using a stratified 80-10-10 split. On the training set (4,646 images), PneuNet achieved 97% accuracy. On the independent validation set (586 images) used for hyperparameter tuning and early stopping, it attained 93% accuracy. The final model, selected at the epoch of lowest validation loss, yielded 91% accuracy on the held-out test set (624 images). The modest 2% drop from validation to test performance, combined with a stabilized validation loss of 0.44 after epoch 42, confirms effective generalization and successful overfitting mitigation through dropout (rate = 0.3), L2 regularization (λ = 0.001), and early stopping (patience = 7). The accuracy and loss curves provide functional illustrations of the PneuNet model converging effectively, albeit with the possibility of improvements following additional tuning. Methods such as data augmentation, dropout, L2 regularization, tuning hyperparameters could allow PneuNet to become more robust. Although the model did particularly well compared to the baseline, of course there are improvements to be had with further tuning and other architecture search, and ideally transfer learning to establish more real world applications. Certainly increasing the quantity of data would also help for a wider generalization to provide additional features to the data model. Overall, this study demonstrates the possible value of deep learning for automating pneumonia screening, where deep learning introduces a possible efficient and scalable diagnostic tool for augmenting health care professionals, especially in developing nations.