# A Self-Supervised Detail-Sensitive ViT-Based Model for COVID-19 X-ray Image Diagnosis: SDViT
## 4 Experiment  
### Dataset  
There have been prior research efforts dedicated to classification based on chest X-ray images. The outbreak of COVID-19 has pushed forward the progress of research in this field, and many studies have been developed. However, the lack of publicly available chest X-ray datasets of COVID-19-positive patients is a significant challenge. In this research, we use the COVID-19 CXR scan dataset, called the X-ray Image [20], which is used for machine learning (ML) and deep learning studies. In particular, the X-ray Image dataset consists of 125 confirmed COVID-19-positive cases collected from 23 February 2020 to 21 April 2020, 500 normal cases collected from 21 January 2019 to 29 May 2020, and 500 community-acquired pneumonia (CAP) cases collected from 3 April 2018 to 24 November 2019. For a more intuitive understanding, we visualize a sample of each category in Figures 9-11. Figure 8: Domain transfer via Reform. Figure 9: Covid sample: X-ray Image dataset. For balance purposes, the X-ray Image dataset is divided into a training set and a validation (or testing) set at a ratio of 957:168. As shown in Table 2, the training set contains 105 CXR images of COVID-19 positive patients, 426 healthy CXR images, and 426 non-COVID-19 CXR pneumonia images, while the testing set contains 20 CXR images of COVID-19-positive patients, 74 healthy CXR images, and 74 CXR images of non-COVID-19 pneumonia patients. Figure 11: Normal sample: X-ray Image dataset. Figure 10: Pneumonia sample: X-ray Image dataset. In addition, we use another dataset, the synthetic_covid_cxf dataset ([[https://github.com/hasibzunair/synthetic-covid-cxf-dataset](https://github.com/hasibzunair/synthetic-covid-cxf-dataset)]([https://github.com/hasibzunair/synthetic-covid-cxf-dataset](https://github.com/hasibzunair/synthetic-covid-cxf-dataset)), accessed on 9 August 2022), to ensure a more comprehensive study. This dataset is a similar binary medical dataset consisting of many more samples (21,295 samples in total): 16,537 normal and 4758 pneumonia. We divide the dataset into a training set and a validation (testing) set at a ratio of 6:1. As shown in Table 3, The training set consists of 4158 CXR images of positive COVID-19 patients and 14,137 healthy CXR images. The testing set consists of 600 CXR images of positive COVID-19 patients and 2400 health CXR images. Figures 12 and 13 demonstrate a pneumonia sample and a normal sample from the synthetic-covid-cxf dataset. Figure 14 shows an example of typical chest X-ray images used for diagnosis. It can be observed that there are ground-glass opacities in the lungs of certain patients, which are identified using green rectangles. Pulmonary lobes and patchy consolidations are identified using blue ovals, indicating the presence of fibrosis or nodules. Doctors often use these features to determine whether patients are in a state of pneumonia, as well as its severity. Our model is designed to learn these features in order to achieve correct classification. Figure 14: Analysis and diagnosis using patient CXR images. Figure 13: Normal sample: synthetic-covid-cxr. We select the classical network ResNet101 [21] as the baseline for our experiments. This network structure is widely used in a variety of computer vision tasks, including object detection, semantic segmentation, tracking, and classification, demonstrating excellent performance. It has a distinct structure that can successfully extract features from images to carry out the corresponding tasks. Comparative experiments are conducted to verify the effectiveness of our proposed method. In addition, we introduce the current best model in the domain, Attention-Based VGG16 [15], for comparative study. The Attention-based VGG-16 model adds an additional branch to the convolutional neural network and adds a Spatial Attention module to better obtain different spatial region associations and interactions, obtaining the best results in the current field.