Abstract
SARS-CoV-2 is a highly contagious virus that can induce pulmonary complications like viral pneumonia and acute respiratory distress syndrome (ARDS). In order to support RT-PCR testing, chest X-rays are used to identify the presence of COVID-19 in lungs. Radiologists proficient in chest X-Ray (CXR) interpretation are scarce, motivating our work of examining the performance of convolutional neural networks (CNNs) on this task. CNNs are the state-of-the-art image classification method. In this work we classify X-rays into four classes (COVID-19, other lung opacity, other diseases and normal). We find, that MobileNetV1 is the best CNN for this task and achieve an overall accuracy of 70% and a COVID-19 accuracy of 83% on a test data set. By increasing the number of images of the unrestricted classes normal, lung opacity and other, the COVID-19 accuracy can be increased to 95% and the overall accuracy to 78%. We leverage model interpretability techniques and provide attention heatmaps that can assist in validating the model’s decision process.
Introduction
During the height of the COVID-19 pandemic, RT-PCR testing—the gold standard for diagnosis—often faced significant bottlenecks due to swab shortages and limited laboratory capacity. Thorax X-ray imaging emerged as a vital alternative for immediate diagnostic information and risk assessment. However, the primary hurdle was the scarcity of expert radiologists available to interpret these images rapidly. Furthermore, COVID-19 pneumonia can easily be confused with other lung conditions or standard influenza. This study evaluates whether deep learning models can reliably differentiate COVID-19 from other lung opacities and diseases, providing a scalable "second opinion" for clinicians.
Methods
The researchers employed Transfer Learning, a technique where models pre-trained on massive general datasets (like ImageNet) are fine-tuned for a specific medical task. This is particularly effective when medical data is scarce.
The study followed a three-step experimental process:
- Hyperparameter Search: Using MobileNetV2 as a baseline to find optimal settings for learning rate, dropout, and data augmentation.
- Model Benchmarking: Comparing five distinct architectures: Xception, ResNet50, InceptionV3, MobileNetV1, and MobileNetV2.
- Optimization: Refining the best-performing models and testing the impact of increasing the training data size for non-COVID classes.
To ensure the models weren't just "black boxes," the authors used Grad-CAM (Gradient-weighted Class Activation Mapping) to generate heatmaps. These visualizations show exactly which regions of the X-ray the model prioritized when making a classification.
Datasets
The authors compiled a multi-source dataset to train and validate their models, focusing on four distinct categories of lung health.
- COVID-19 Images: Collected from the Cohen database, the University Medical Center Mainz, and Charité Berlin (totaling 538 training and 95 validation images).
- Non-COVID Images: Sourced from the Kaggle RSNA Pneumonia Detection Challenge, categorized into three classes: "Normal," "Lung Opacity," and "Other Diseases."
- Data Scaling: They initially used 1,000 images per non-COVID class but later expanded this to 2,000 images to test if a more robust "background" dataset improved COVID-19 detection.
Key Results and Insights
Surprisingly, the lightweight MobileNetV1 outperformed significantly deeper and more complex models like ResNet50 and Xception. This suggests that for this specific medical imaging task, massive parameter counts may lead to overfitting rather than better generalization.
- Initial Results (1k non-COVID images): Achieved an overall accuracy of 70% and a COVID-19 specific accuracy of 83%.
- Expanded Results (2k non-COVID images): The overall accuracy rose to 78%, while the COVID-19 detection accuracy jumped to a remarkable 95%.
One of the most interesting findings was that increasing the number of non-COVID images significantly boosted the accuracy of COVID-19 detection. By seeing more examples of what COVID-19 isn't, the model became much better at identifying what it is. Furthermore, the models found it much easier to distinguish COVID-19 from "Normal" lungs than to distinguish between "Lung Opacity" and "Other Diseases," supporting the hypothesis that COVID-19 induces unique radiological patterns like ground-glass opacities.
Limitations and Future Work
The authors identified several challenges, including the risk of "shortcut learning" due to data heterogeneity across different sources. While Grad-CAM showed the model correctly focusing on lung tissue in many cases, it also revealed occasional focus on image borders or artifacts. Future work should incorporate U-Net segmentation to crop images strictly to the lung fields before classification and compare CNN performance against traditional machine learning methods like Support Vector Machines (SVMs).
Summary updated