A deep ensemble learning-based automated detection of COVID-19 using lung CT images and Vision Transformer and ConvNeXt

Geng Tian, Ziwei Wang, Chang Wang, Jianhua Chen, Guangyi Liu, He Xu, Yuankang Lu, Zhuoran Han, Yubo Zhao, Zejun Li, Xueming Luo, Lihong PengFrontiers in Microbiology 2022

Abstract

Since the outbreak of COVID-19, accurate and timely identification of patients has been crucial for controlling the pandemic. While nucleic acid tests are standard, lung CT imaging provides a rapid alternative for identifying characteristic lesions. This paper proposes VitCNX, a deep learning ensemble framework combining Vision Transformer (ViT) and ConvNeXt. Evaluated against state-of-the-art models like EfficientNetV2 and ResNet-50, VitCNX achieved a recall of 0.9907 and an accuracy of 0.9821 in binary classification, and an accuracy of 0.9696 in three-class experiments. These results demonstrate the model's superior capability in assisting radiologists with rapid COVID-19 identification.

Introduction

The global impact of COVID-19 has necessitated the development of rapid diagnostic tools. Lung CT scans allow for the detection of "ground-glass opacity" and other pneumonia-related markers. However, the manual interpretation of thousands of scans is labor-intensive and prone to human error due to fatigue. Automated deep learning systems can mitigate these issues, but they must distinguish between COVID-19 and other pneumonia types that present similar visual features. Standard CNNs excel at local feature extraction but often lack global spatial context, while Transformers capture global relationships but may miss fine-grained details.

Methodology: The VitCNX Framework

The proposed VitCNX model leverages a soft-voting ensemble strategy to combine the strengths of two distinct architectures: the Vision Transformer (ViT) and ConvNeXt.

Vision Transformer (ViT)

The ViT architecture treats an image as a sequence of patches, similar to words in a sentence. This allows the model to utilize self-attention mechanisms to capture global dependencies across the entire CT scan.

Overview of the Vision Transformer (ViT) architecture used in the ensemble, showing the flow from input image to classification.

A critical component of this architecture is the Embedding Layer, which transforms raw image patches into a format suitable for the Transformer encoder.

Detailed view of the Embedding Layer, illustrating the flattening of image patches, the addition of a class token, and position embedding.

ConvNeXt

ConvNeXt represents a modernized convolutional neural network (CNN). It adopts successful design elements from Transformers—such as 7x7 convolution kernels, GELU activations, and Layer Normalization—while maintaining the efficiency and local feature extraction capabilities of the ResNet family.

Ensemble Strategy

VitCNX employs a weighted soft-voting mechanism. By averaging the classification probabilities from both ViT and ConvNeXt, the framework reduces individual model variance and improves overall diagnostic reliability.

Data and Experimental Setup

The study utilized an integrated dataset of 7,398 CT images from sources in Brazil and China, categorized into COVID-19 (3,768), healthy (2,383), and other pneumonia (1,247). The data was partitioned into an 80/20 training/testing split. Performance was benchmarked against EfficientNetV2, DenseNet, ResNet-50, and Swin-Transformer.

Results and Discussion

VitCNX consistently outperformed all baseline models across multiple metrics.

  • Binary Classification: The model achieved a recall of 0.9907, an accuracy of 0.9821, and an AUC of 0.9985. High recall is particularly vital in medical screening to minimize false negatives.
  • Three-Class Classification: For the more complex task of distinguishing between COVID-19, healthy lungs, and other pneumonia, VitCNX maintained high performance with an accuracy of 0.9696 and an F1-score of 0.9631.

Confusion matrix analysis revealed that VitCNX produced only 7 false negatives out of 753 COVID-19 test cases, the lowest among all compared models.

Conclusion

The VitCNX ensemble framework demonstrates that combining global context from Transformers with the robust local feature extraction of modernized CNNs significantly improves COVID-19 detection from CT images. While the ensemble approach increases computational complexity, its superior accuracy and recall make it a powerful tool for clinical decision support. Future work will focus on model optimization for edge devices and the development of explainable AI features to highlight specific lung lesions for radiologists.

Summary updated

BibTeX
@inproceedings{tian2022deep,
  author = {Geng Tian and Ziwei Wang and Chang Wang and Jianhua Chen and Guangyi Liu and He Xu and Yuankang Lu and Zhuoran Han and Yubo Zhao and Zejun Li and Xueming Luo and Lihong Peng},
  title = {{A deep ensemble learning-based automated detection of COVID-19 using lung CT images and Vision Transformer and ConvNeXt}},
  booktitle = {Frontiers in Microbiology},
  year = {2022},
  doi = {10.3389/fmicb.2022.1024104},
}
Figure