Diagnosis of Active Pulmonary Tuberculosis and Community Acquired Pneumonia Using Convolution Neural Network Based on Transfer Learning

Acad Radiol. 2022 Oct;29(10):1486-1492. doi: 10.1016/j.acra.2021.12.025. Epub 2022 Jan 19.

Abstract

Rationale and objectives: A convolutional neural network (CNN) model for the diagnosis of active pulmonary tuberculosis (APTB) and community-acquired pneumonia (CAP) using chest radiographs (CRs) was constructed and verified based on transfer learning.

Materials and methods: CRs of 1247 APTB cases, 1488 CAP cases and 1247 normal cases were collected. All CRs were randomly divided into training set (1992 cases), validation set (1194 cases) and test set (796 cases) by stratified sampling in 5:3:2 radio. After normalization of CRs, the convolution base of pre-trained CNN (VGG16) model on ImageNet dataset was used to extract features, and the grid search was used to determine the optimal classifier module, which was added to the convolution base for transfer learning. After the training, the model with the highest accuracy of the validation set was selected as the optimal model to verify in the test set and calculate the accuracy of the model.

Results: The accuracy of validation set in the 63rd epochs was the highest, which was 0.9430, and the corresponding Categorical crossentropy was 0.1742. The accuracy of the training set was 0.9428, and the Categorical crossentropy was 0.1545. When the optimal model was applied to the test set, the accuracy was 0.9447, and the Categorical crossentropy was 0.1929.

Conclusion: The transfer learning-based CNN model has good classification performance in the diagnosis of APTB, CAP and normal patients using CRs.

Keywords: Diagnosis, Differential; Neural Networks (Computer); Pneumonia; Tuberculosis, Pulmonary.

Publication types

  • Research Support, Non-U.S. Gov't

MeSH terms

  • Humans
  • Machine Learning
  • Neural Networks, Computer
  • Pneumonia* / diagnostic imaging
  • Radiography
  • Tuberculosis, Pulmonary* / diagnostic imaging