PVT-COV19D: Pyramid Vision Transformer for COVID-19 Diagnosis

Lilang Zheng, Jiaxuan Fang, Xiaorun Tang, Hanzhang Li, Jiaxin Fan, Tianyi Wang, Rui Zhou, Zhaoyan YanarXiv 2022 · DOI

Abstract

PVT-COV19D is a novel diagnostic framework that applies the Pyramid Vision Transformer (PVTv2) to chest CT scans for automated COVID-19 detection. By combining a "normal distribution" slice-sampling strategy with a multi-scale transformer architecture, the model achieves a Macro F1 score of 88.01%, significantly outperforming traditional CNN-based baselines while maintaining computational efficiency.

Introduction

While chest CT scans are a powerful tool for diagnosing COVID-19—offering a 3D view of lung lesions that 2D X-rays miss—interpreting these scans is a significant clinical bottleneck. A single CT scan can contain hundreds of slices, making manual review by radiologists time-consuming and prone to fatigue-induced errors during pandemic surges.

Existing AI solutions largely rely on Convolutional Neural Networks (CNNs). However, CNNs have two main drawbacks in this context: fixed receptive fields, which make it difficult to capture long-range dependencies, and resolution inflexibility. While standard Vision Transformers (ViTs) solve the global context problem, they are computationally expensive for high-resolution medical images. PVT-COV19D aims to bridge this gap with a model that is both globally aware and computationally efficient.

Methods

The PVT-COV19D framework moves away from the standard CNN backbone in favor of a Pyramid Vision Transformer (PVTv2).

The PVTv2 Backbone

Unlike the original ViT, which processes images at a single scale, PVTv2 uses a pyramid structure. It gradually reduces the spatial resolution of the feature maps while increasing the number of channels across four stages. This allows the model to generate multi-scale feature maps similar to a CNN but uses self-attention to maintain a global receptive field. Crucially, PVTv2 achieves linear complexity, making it as efficient as a CNN but with the representational power of a Transformer.

Overview of the PVT-COV19D pipeline, showing slice sampling and the PVTv2 architecture.

Normal Distribution Sampling and Voting

Processing every slice in a 3D CT volume is redundant. The authors observed that critical diagnostic information is typically concentrated in the middle of the lung. They implemented a sampling strategy based on a normal distribution, randomly selecting batches of 8 slices per case with a bias toward the center of the scan. This speeds up convergence and focuses the model on the most relevant anatomy. During evaluation, a multiple voting mechanism averages outputs from several batches to determine the final diagnosis.

Datasets

The study utilized the COV19-CT-DB (COVID19-CT-Database), containing approximately 7,750 chest CT scan series (1,650 COVID-19 and 6,100 non-COVID). These were labeled by four medical experts with a 98% agreement rate. The authors used 1,993 cases for training and 484 cases for validation, with scans ranging from 50 to 700 slices per patient.

Results

The PVT-COV19D model showed a marked improvement over the established baseline, achieving a Macro F1 score of 88.01% compared to the baseline's 77.00%.

Comparison of Macro F1 Scores between the baseline and the proposed PVT-COV19D model.

Additional performance metrics include:

  • Validation Accuracy: 88.19%
  • Specificity (Negative Accuracy): 91.54%
  • Sensitivity (Positive Accuracy): 84.11%

The model was trained on a single NVIDIA 2080Ti GPU for 60 epochs, demonstrating that high-performance medical AI can be achieved without massive industrial compute clusters.

Discussion and Conclusion

PVT-COV19D demonstrates that the quadratic complexity of standard Transformers is not necessary to benefit from self-attention. By using a pyramid structure, the authors achieved CNN-like speed with Transformer-like global context. Furthermore, the use of normal distribution sampling effectively bakes medical domain knowledge into the data pipeline, reducing noise and improving training efficiency.

Future work will focus on expanding the model to multiclass classification (e.g., distinguishing COVID-19 from other pneumonias) and testing its robustness across diverse hardware and hospital datasets to confirm its readiness for clinical deployment in resource-constrained environments.

Summary updated

BibTeX
@misc{zheng2022pvt,
  author = {Lilang Zheng and Jiaxuan Fang and Xiaorun Tang and Hanzhang Li and Jiaxin Fan and Tianyi Wang and Rui Zhou and Zhaoyan Yan},
  title = {{PVT-COV19D: Pyramid Vision Transformer for COVID-19 Diagnosis}},
  year = {2022},
  eprint = {2206.15069},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2206.15069},
}
Figure