Source-linked AI summary

Transfer Learning with Deep Convolutional Neural Network (CNN) for Pneumonia Detection using Chest X-ray

Tawsifur Rahman, Muhammad E. H. Chowdhury, Amith Khandakar, Khandaker R. Islam, Khandaker F. Islam, Zaid B. Mahbub, Muhammad A. Kadir, Saad Kashem

arXiv:2004.06578v1eess.IVcs.CVcs.LG

TL;DR

Pneumonia requires timely diagnosis, and the paper addresses the need for computer-aided detection. It evaluates a CNN-based transfer-learning approach using different pre-trained models to detect and classify pneumonia.

  • Problem

    The paper addresses a pressing need for computer-aided pneumonia detection, particularly in rural areas of low-resource countries.

  • Method

    The authors use CNN-based transfer learning with AlexNet, ResNet18, DenseNet201, and SqueezeNet to detect pneumonia and classify bacterial versus viral cases.

  • Results

    The study analyzes the performance of four pre-trained CNN architectures across pneumonia detection and bacterial-versus-viral classification tasks.

  • Takeaways & Limitations

    The proposed CNN-based transfer-learning approach is presented as a way to detect pneumonia and distinguish bacterial from viral pneumonia.

  • Takeaways & Limitations

    The dataset does not include cases of viral and bacterial co-infection.

Abstract

from arXiv · show

Pneumonia is a life-threatening disease, which occurs in the lungs caused by either bacterial or viral infection. It can be life-endangering if not acted upon in the right time and thus an early diagnosis of pneumonia is vital. The aim of this paper is to automatically detect bacterial and viral pneumonia using digital x-ray images. It provides a detailed report on advances made in making accurate detection of pneumonia and then presents the methodology adopted by the authors. Four different pre-trained deep Convolutional Neural Network (CNN)- AlexNet, ResNet18, DenseNet201, and SqueezeNet were used for transfer learning. 5247 Bacterial, viral and normal chest x-rays images underwent preprocessing techniques and the modified images were trained for the transfer learning based classification task. In this work, the authors have reported three schemes of classifications: normal vs pneumonia, bacterial vs viral pneumonia and normal, bacterial and viral pneumonia. The classification accuracy of normal and pneumonia images, bacterial and viral pneumonia images, and normal, bacterial and viral pneumonia were 98%, 95%, and 93.3% respectively. This is the highest accuracy in any scheme than the accuracies reported in the literature. Therefore, the proposed study can be useful in faster-diagnosing pneumonia by the radiologist and can help in the fast airport screening of pneumonia patients.

1. Introduction

Pneumonia causes substantial global mortality, while chest X-ray interpretation can misclassify disease type and produce inappropriate treatment. The study addresses this need with CNN-based transfer learning to detect pneumonia and distinguish bacterial from viral cases.

  • Motivation: Pneumonia causes approximately 1.4 million deaths annually among children under five, representing 18% of deaths in that age group.
  • Motivation: Faster diagnosis and correct medication are needed because delayed or incorrect treatment can worsen patient condition and lead to death.
  • Problem: Chest X-rays are the best current diagnostic method, but pneumonia images and bacterial-versus-viral cases can be misclassified, with subjective inconsistencies among radiologists.
  • Research gap: Prior deep-learning studies reported maximum accuracies of 96.84% for normal-versus-pneumonia classification and 93.6% for bacterial-versus-viral classification, leaving room for improvement.
  • Contribution: The proposed study uses CNN-based transfer learning with four pre-trained architectures to detect pneumonia and classify bacterial and viral pneumonia.
  • Contribution: The paper provides methodological details intended to enable other research groups to benefit from the approach.

2. Background of Deep Machine Learning Algorithms

CNNs extract image features efficiently through convolution, pooling, and shared weights, while transfer learning enables their use with comparatively small datasets. The study applies four pre-trained CNNs—AlexNet, ResNet18, DenseNet201, and SqueezeNet—for pneumonia detection.

  • CNN fundamentals: CNNs use convolutional filters to extract spatial and temporal image features, while weight sharing reduces computational effort and model parameters.Their building blocks include convolution, max-pooling for downsampling, and fully connected layers.
  • Transfer learning: Transfer learning uses models trained on large datasets such as ImageNet for applications with comparatively smaller datasets, reducing data requirements and training time.It has been used in manufacturing, medical, and baggage-screening applications.
  • Models used: Four pre-trained CNNs—AlexNet, ResNet, DenseNet, and SqueezeNet—were selected for pneumonia detection, with the study using ResNet18 and DenseNet201 variants.The paper identifies these networks as well-known pre-trained deep learning CNNs.
  • Network characteristics: AlexNet classifies more than 1000 classes using 650k neurons and 60 million parameters, whereas ResNet learns residuals to address vanishing-gradient and degradation problems.AlexNet contains five convolutional layers, three pooling layers, two fully connected layers, and a Softmax layer; ResNet18 is used here for pneumonia detection.
  • Network characteristics: DenseNet reduces redundant feature maps and computational cost through narrow layers and direct access to original inputs and loss gradients.DenseNet has four variants, and DenseNet201 is used for pneumonia detection.

3. Methodology

The study used a 5,247-image Kaggle chest X-ray database containing normal, bacterial-pneumonia, and viral-pneumonia images. The dataset was segmented into training and test sets, with four algorithms trained and evaluated across experiments.

  • Dataset: 5,247 chest X-ray images with resolutions ranging from 400p to 2000p formed the study database.
  • Dataset: 3,906 images showed pneumonia, including 2,561 bacterial and 1,345 viral cases, while 1,341 images came from normal subjects.
  • Dataset: The dataset excluded cases involving viral and bacterial co-infection.
  • Data split and evaluation: The images were segmented into training and test sets, with training images augmented for evaluation experiments.
  • Model training and evaluation: Four algorithms were trained on the training dataset and evaluated on the test dataset.

A B C

The study preprocesses and augments chest X-ray image sets before transfer-learning classification with four pre-trained CNN algorithms. Images are resized to model-specific dimensions and normalized according to pre-trained model standards, with samples representing normal, bacterial, and viral pneumonia cases.

  • Dataset samples: The dataset samples comprise normal cases, bacterial pneumonia cases, and viral pneumonia cases.Figure 7 labels these categories as samples A, B, and C, respectively.
  • Methodology: Four pre-trained CNNs—AlexNet, ResNet18, DenseNet201, and SqueezeNet—were trained and tested on the image dataset after preprocessing and augmentation.The methodology overview describes preprocessing, data augmentation, training, and testing using these algorithms.
  • Model selection: ResNet18 and DenseNet201 were selected because they were readily available for MATLAB 2019a.The study used MATLAB (2019a) to train, evaluate, and test the algorithms.
  • Image preprocessing: 227×227 pixels were used for AlexNet and SqueezeNet, while 224×224 pixels were used for ResNet18 and DenseNet201.All images were normalized according to the standards of the corresponding pre-trained model.

Data augmentation

Because the working database is not very large, the study used data augmentation to expand the training sets. The authors applied rotation, scaling, and translation to existing chest X-ray images.

  • Motivation: The working database was not very large, motivating the use of data augmentation to make a comparatively smaller dataset larger.Data augmentation was presented as an alternative to collecting new data.
  • Expected benefit: Data augmentation can improve deep-learning classification accuracy and model performance by augmenting existing data.The passage contrasts augmenting existing data with collecting new data.
  • Augmentation strategies: Three augmentation strategies—Rotation, Scaling, and Translation—were used to generate new training sets.These transformations were shown in Figure 9.
  • Rotation: 315 degrees counter clockwise 45 degrees was used for image rotation during augmentation.The rotation operation was described as rotating images clockwise between 0 and 360 degrees, with this study using 315 degrees.

4. Results and Discussions

DenseNet201 achieved the strongest performance across all three pneumonia classification schemes, with test accuracies of 98%, 95%, and 93.3%. The authors report that it outperformed other algorithms and recent comparable studies, while suggesting larger datasets and ensembles as future improvements.

  • Classification performance: 98% test accuracy was achieved for normal and pneumonia classification using DenseNet201.DenseNet201 produced the highest training and testing accuracy across the three classification schemes.
  • Classification performance: 95% test accuracy was achieved for bacterial and viral pneumonia classification, while normal, bacterial and viral pneumonia classification reached 93.3%.DenseNet201 produced the highest accuracy for both training and testing across all three schemes.
  • ROC/AUROC evaluation: DenseNet201 outperformed the other algorithms in ROC/AUROC evaluation across the classification schemes.The paper identifies AUC/ROC as an important metric for assessing classification-model performance.
  • Model evaluation: DenseNet201 outperformed the other CNN models across different performance indices and supported confusion-matrix analysis for all three classifications.Figure 13 presents confusion matrices for normal-versus-pneumonia, bacterial-versus-viral, and three-class classification.
  • Comparison with related work: DenseNet201 exhibited the highest accuracy among recent comparable works for automatically classifying normal, bacterial, and viral pneumonia.The comparison included prior deep-learning and VGG16-based pneumonia studies reporting multiple sensitivity, precision, and accuracy values.
  • Future work: Training with a larger database and using an ensemble of pre-trained CNN algorithms were proposed as future work to increase detection accuracy.These improvements were suggested after the reported DenseNet201 results.

5. Conclusion

The study concludes that deep CNN-based transfer learning can detect pneumonia and its classes from chest X-rays, with DenseNet201 outperforming the other evaluated networks. Reported performance supports a computer-aided diagnostic tool for rapid pneumonia identification and potential airport screening.

  • Conclusion: Deep CNN-based transfer learning was used to classify normal and pneumonia patients from chest X-ray images across pneumonia classes.Four popular CNN-based deep learning algorithms were trained and tested for the classification task.
  • Conclusion: DenseNet201 outperformed the other three deep CNN networks.The conclusion also states that DenseNet201 performed effectively with a comparatively lower collection of complex image data, reduced bias, and higher generalization.
  • Conclusion: 98%, 97%, and 99% were reported for classification accuracy, precision and recall of normal and pneumonia images.These metrics correspond to the normal-versus-pneumonia classification scheme.
  • Conclusion: 95%, 95% and 96% were reported for classification accuracy, precision and recall of bacterial and viral pneumonia images.These metrics correspond to the bacterial-versus-viral pneumonia classification scheme.
  • Conclusion: 93.3%, 93.7% and 93.2% were reported for classification accuracy, precision and recall of normal, bacterial and viral pneumonia.The proposed CAD tool is intended to help radiologists identify pneumonia and its type immediately after image acquisition, including possible airport screening.
Loading 2004.06578v1…