Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2023 Aug 25;15(8):e44130.
doi: 10.7759/cureus.44130. eCollection 2023 Aug.

Convolutional Neural Networks (CNNs) for Pneumonia Classification on Pediatric Chest Radiographs

Affiliations

Convolutional Neural Networks (CNNs) for Pneumonia Classification on Pediatric Chest Radiographs

Yash S Saboo et al. Cureus. .

Abstract

Background: Pneumonia is an infectious disease that is especially harmful to those with weak immune systems, such as children under the age of 5. While radiologists' diagnosis of pediatric pneumonia on chest radiographs (CXRs) is often accurate, subtle findings can be missed due to the subjective nature of the diagnosis process. Artificial intelligence (AI) techniques, such as convolutional neural networks (CNNs), can help make the process more objective and precise. However, off-the-shelf CNNs may perform poorly if they are not tuned to their appropriate hyperparameters. Our study aimed to identify the CNNs and their hyperparameter combinations (dropout, batch size, and optimizer) that optimize model performance.

Methodology: Sixty models based on five CNNs (VGG 16, VGG 19, DenseNet 121, DenseNet 169, and InceptionResNet V2) and 12 hyperparameter combinations were tested. Adam, Root Mean Squared Propagation (RmsProp), and Mini-Batch Stochastic Gradient Descent (SGD) optimizers were used. Two batch sizes, 32 and 64, were utilized. A dropout rate of either 0.5 or 0.7 was used in all dropout layers. We used a deidentified CXR dataset of 4200 pneumonia (Figure 1a) and 1600 normal images (Figure 1b). Seventy percent of the CXRs in the dataset were used for training the model, 20% were used for validating the model, and 10% were used for testing the model. All CNNs were trained first on the ImageNet dataset. They were then trained, with frozen weights, on the CXR-containing dataset. Results: Among the 60 models, VGG-19 (dropout of 0.5, batch size of 32, and Adam optimizer) was the most accurate. This model achieved an accuracy of 87.9%. A dropout of 0.5 consistently gave higher accuracy, area under the receiver operating characteristics curve (AUROC), and area under the precision-recall curve (AUPRC) compared to a dropout of 0.7. The CNNs InceptionResNet V2, DenseNet 169, VGG 16, and VGG 19 significantly outperformed the DenseNet121 CNN in accuracy and AUROC. The Adam and RmsProp optimizer had improved AUROC and AUPRC compared to the SGD optimizer. The batch size had no statistically significant effect on model performance.

Conclusion: We recommend using low dropout rates (0.5) and RmsProp or Adam optimizer for pneumonia-detecting CNNs. Additionally, we discourage using the DenseNet121 CNN when other CNNs are available. Finally, the batch size may be set to any value, dependent on computational resources.

Keywords: artificial intelligence in radiology; chest x ray; computer vision; convolutional neural networks (cnn); deep learning artificial intelligence; pneumonia detection.

PubMed Disclaimer

Conflict of interest statement

The authors have declared that no competing interests exist.

Figures

Figure 1
Figure 1. Dataset breakdown into training, validation, and testing sets.
A shows the number of images in training, validation, and testing set. B shows the number of pneumonia and normal images in the training, validation, and testing set.
Figure 2
Figure 2. Twelve tested hyperparameter combinations for each CNN.
CNN, convolutional neural network
Figure 3
Figure 3. Relating architecture complexity, dropout rate, batch size, and optimizer to accuracy and AUROC.
A-D differentiates the 60 models by a certain hyperparameter. A categorizes the data into architectures DenseNet121, DenseNet169, VGG16, VGG19, and InceptionResNetV2. B categorizes the data by batch sizes. C differentiates the data by dropout rate. D differentiates the data by the optimizer. AUROC, area under the receiver operating characteristic curve

Similar articles

References

    1. Pneumonia in children. [ Jul; 2023 ]. 2022. https://www.who.int/news-room/fact-sheets/detail/pneumonia https://www.who.int/news-room/fact-sheets/detail/pneumonia
    1. Training a CNN to detect pneumonia. [ Jul; 2023 ]. 2019. https://medium.datadriveninvestor.com/training-a-cnn-to-detect-pneumonia... https://medium.datadriveninvestor.com/training-a-cnn-to-detect-pneumonia...
    1. The diagnosis of pneumonia requires a chest radiograph (x-ray)-yes, no or sometimes? Wootton D, Feldman C. Pneumonia (Nathan) 2014;5:1–7. - PMC - PubMed
    1. Radiologists once again rank among the most burned-out specialists. [ Jul; 2023 ]. 2023. https://healthimaging.com/topics/healthcare-management/medical-practice-... https://healthimaging.com/topics/healthcare-management/medical-practice-...
    1. Radiology facing a global shortage. [ Jul; 2023 ]. 2022. https://www.rsna.org/news/2022/may/global-radiologist-shortage https://www.rsna.org/news/2022/may/global-radiologist-shortage

LinkOut - more resources