LungAI: A Deep Learning Convolutional Neural Network for Automated Detection of COVID-19 from Posteroanterior Chest X-Rays

Aryan GulatimedRxiv 2020

Abstract

COVID-19 is an infectious disease caused by the Severe Acute Respiratory Syndrome Coronavirus 2 (SARS-CoV-2). As of late 2020, the global pandemic has necessitated rapid and reliable detection techniques to supplement standard Real-Time Reverse Transcription Polymerase Chain Reaction (rRT-PCR) testing, which often suffers from long turnaround times and kit shortages. Given that the virus predominantly manifests as lung abnormalities, this study proposes LungAI, a novel Convolutional Neural Network (CNN) based on a hybrid of the DarkNet and AlexNet architectures. Utilizing a dataset of 6,585 Posteroanterior (PA) Chest X-rays—comprising Bacterial Pneumonia, Viral Pneumonia, COVID-19, and healthy individuals—the model achieved a three-way classification accuracy of 99.16%, with a sensitivity of 99.31% and specificity of 99.14%. These results suggest that LungAI can serve as a highly effective automated tool for rapid COVID-19 screening.

Introduction

While RT-PCR remains the gold standard for COVID-19 diagnosis, it faces significant hurdles: long turnaround times (often exceeding 48 hours), potential for false negatives due to viral mutations or low viral load, and global shortages of testing kits.

Since COVID-19 predominantly manifests as lung abnormalities, radiological imaging offers a viable secondary screening method. However, manual interpretation of Chest X-rays (CXRs) is labor-intensive and requires expert radiologists, who may be in short supply during peak pandemic waves. This paper introduces LungAI, an automated deep learning tool designed to provide quick, reliable, and non-labor-intensive detection to support mass surveillance and clinical decision-making.

Methods and Architecture

The author developed a novel CNN architecture rather than simply fine-tuning a pre-existing model. LungAI draws inspiration from DarkNet-53 and AlexNet, utilizing a total of 21 2D-convolutional layers to extract hierarchical features from radiological images.

The LungAI hybrid CNN architecture, combining elements of DarkNet and AlexNet.

Key technical features include:

  • Global Average Pooling (GAP): Unlike standard CNNs that use Fully-Connected (FC) layers at the end, LungAI uses GAP followed by a Flatten layer. This design choice reduces the risk of overfitting by minimizing the number of parameters and makes the model more robust to spatial variations in the image.
  • Layer Composition: Each convolutional layer is followed by Batch Normalization to speed up training and maintain stability, and ReLU activation to prevent the "dying neurons" problem. Max Pooling (2x2) is used throughout to downsample feature maps while retaining prominent features.
  • Training Strategy: The model was trained from scratch for 60 epochs using the Adam optimizer and Categorical Cross-Entropy loss.

Datasets

The study utilized a combination of several publicly available datasets to create a comprehensive training and validation set:

Representative Posteroanterior Chest X-rays used in the study, showing distinct radiological features of healthy, pneumonia-infected, and COVID-19 lungs.
  • COVID-19 Images: Sourced from JP Cohen’s dataset, the Italian Society of Medical and Interventional Radiology (SIRM) database, and the COVID-Net initiative (Totaling 729 images).
  • Non-COVID Images: Sourced from the Kaggle Chest X-Ray dataset, including Normal/Healthy individuals (1,583 images) and Pneumonia cases (4,273 images, including both viral and bacterial variants).
  • Data Split: 80% of the data was used for training, with 20% reserved for validation to ensure the model's generalizability.

Key Insights

  • Moving Beyond Transfer Learning: Most existing COVID-19 detection models rely on Transfer Learning (using models like VGG16 or ResNet pre-trained on ImageNet). The author argues that a custom architecture built specifically for radiological features can outperform these general-purpose models, even with smaller datasets, by focusing on domain-specific textures.
  • Robustness via GAP: The decision to omit Fully-Connected layers is significant. FC layers are parameter-heavy and prone to overfitting. By using Global Average Pooling, the model sums spatial information, making it more "native" to the convolutional structure and more robust to the inherent noise in medical imaging.
  • Handling Class Imbalance: The author noted a sharp spike and then a decrease in loss during early training epochs. This was attributed to the initial struggle with an unbalanced dataset (fewer COVID-19 samples compared to Pneumonia). However, the model eventually "rectified" this through multiple passes (epochs) over the data, leading to stable validation accuracy.

Results

LungAI demonstrated high performance across both multi-class and binary classification tasks, proving its efficacy as a diagnostic aid:

  • Three-Way Classification (COVID-19 vs. Normal vs. Pneumonia):
    • Accuracy: 99.16%
    • Sensitivity: 99.31%
    • Specificity: 99.14%
  • Binary Classification (COVID-19 vs. Pneumonia):
    • Accuracy: 99.40%
    • Sensitivity: 99.32%
  • Binary Classification (COVID-19 vs. Normal):
    • Accuracy: 99.35%
    • Sensitivity: 100.00% (Zero false negatives in this category)

Conclusion and Future Work

While the results are strong, the dataset remains somewhat unbalanced, particularly regarding the number of COVID-19 samples relative to other pneumonia types. Future work suggests that as more verified COVID-19 radiological data becomes available, the LungAI architecture can be further refined. The ultimate goal is to adapt this model into a workable mass surveillance system that can be integrated into community-wide anti-COVID strategies, providing a rapid screening layer alongside traditional molecular testing.

Summary updated

BibTeX
@misc{gulati2020lungai,
  author = {Aryan Gulati},
  title = {{LungAI: A Deep Learning Convolutional Neural Network for Automated Detection of COVID-19 from Posteroanterior Chest X-Rays}},
  year = {2020},
  doi = {10.1101/2020.12.19.20248530},
  howpublished = {medRxiv},
}
Figure