[Paper Review] COVID-19 Detection in Chest X-ray Images Using Swin-Transformer and Transformer in Transformer
This paper proposes a hybrid deep learning approach combining Swin-Transformer and Transformer in Transformer (TNT) for classifying chest X-ray images into three categories: COVID-19, pneumonia, and normal. Using weighted ensemble averaging of the two models, the method achieved a test accuracy of 0.9475 on the Chest XR COVID-19 Detection Challenge dataset, demonstrating the effectiveness of vision transformers in medical image classification despite limited data and computational constraints.
The Coronavirus Disease 2019 (COVID-19) has spread globally and caused serious damage. Chest X-ray images are widely used for COVID-19 diagnosis and the Artificial Intelligence method can increase efficiency and accuracy. In the Challenge of Chest XR COVID-19 detection in Ethics and Explainability for Responsible Data Science (EE-RDS) conference 2021, we proposed a method that combined Swin Transformer and Transformer in Transformer to classify chest X-ray images as three classes: COVID-19, Pneumonia, and Normal (healthy) and achieved 0.9475 accuracies on the test set.
Motivation & Objective
- To improve the accuracy and efficiency of COVID-19 detection in chest X-ray images using state-of-the-art vision transformer architectures.
- To investigate the performance of Swin-Transformer and Transformer in Transformer in the context of medical image classification with limited annotated data.
- To develop a robust, explainable, and responsible AI solution for early detection of COVID-19 using X-ray imaging.
- To achieve high performance on the Chest XR COVID-19 Detection Challenge benchmark through model ensembling and careful data preprocessing.
Proposed method
- Employed Swin-Transformer (Swin-B) with hierarchical feature maps and shifted window multi-head self-attention to model local and global dependencies in chest X-rays.
- Integrated Transformer in Transformer (TNT-S) that models patches as 'visual sentences' and subdivides them into 'visual words' for enhanced representation learning.
- Applied data augmentation techniques including random horizontal flipping, small-range rotation/translation, and random erasing with low probability to preserve diagnostic features.
- Used image resizing to 224×224 for Swin-Transformer and 384×384 for TNT to align with pre-trained ImageNet models and manage computational load.
- Trained both models using AdamW optimizer with cosine annealing learning rate scheduling, label smoothing, and weight decay of 0.05.
- Combined predictions from both models using a weighted average ensemble strategy, followed by a linear classifier for final class prediction.
Experimental results
Research questions
- RQ1Can Swin-Transformer and Transformer in Transformer effectively classify chest X-ray images into COVID-19, pneumonia, and normal classes with limited training data?
- RQ2How does the ensemble of Swin-Transformer and TNT compare to individual models in terms of accuracy and robustness on the Chest XR challenge dataset?
- RQ3To what extent do careful data preprocessing and augmentation preserve critical diagnostic features in medical X-rays without overfitting?
- RQ4What is the impact of input resolution and model architecture choice on performance in low-data medical imaging scenarios?
- RQ5Can vision transformers outperform traditional CNN-based models in detecting subtle pulmonary patterns in COVID-19 X-rays?
Key findings
- The ensemble model achieved a test accuracy of 0.9475, ranking 10th on the official challenge leaderboard.
- Sensitivity and specificity scores were both above 0.94, indicating strong performance in correctly identifying positive and negative cases.
- The model using a 2:1 weight ratio for Swin-Transformer and TNT achieved the highest accuracy (0.9475), outperforming equal-weighted and individual model results.
- The Swin-Transformer model alone achieved 0.9467 accuracy, while the TNT model alone was not reported but contributed to the ensemble performance.
- The use of minimal, non-destructive data augmentation preserved class-discriminative features critical for medical diagnosis.
- Despite computational constraints, the approach demonstrated that vision transformers can achieve high performance in low-resource medical imaging tasks.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.