## 3 Materials and Methods
### The Considered Datasets  
In this work, we use two kinds of chest medical images: the chest CT scans and the traditional CXR images.  
Regarding the CT scans, we have selected the COVIDx CT-2A dataset (It can be downloaded from: [[https://www.kaggle.com/hgunraj/covidxct](https://www.kaggle.com/hgunraj/covidxct)]([https://www.kaggle.com/hgunraj/covidxct](https://www.kaggle.com/hgunraj/covidxct)) (accessed on 20 May 2021), which has been constructed by collecting a number of open data sources [108; 109] and comprises 194,922 CT slices from 3745 patients. The scans of the dataset are related to three classes: novel coronavirus pneumonia due to SARS-CoV-2 viral infection (NCP), common pneumonia (CP), and normal (N) controls (i.e., images from non-infected individuals). For NCP and CP CT volumes, slices marked as containing lung abnormalities were leveraged. Moreover, all the CT volumes contain the background, in order to avoid model biases. An example of a representative image for each image class is reported in the first row of Figure 2.  
In order to stress the effectiveness of the proposed approach in view of numerical comparisons, which are presented later, for the CXRs, we found a highly imbalanced dataset that contains few COVID images. This is a representative of the actual situation of public datasets, and it has been selected \"ad hoc\" to check the effectiveness of the proposed approach with respect to the corresponding supervised state-of-the-art approaches based on deep learning, which usually need a large amount of well-balanced training data.  
Specifically, for the CXRs, we have selected the COVID-XRay-5K dataset (It can be downloaded form: [[https://github.com/shervinmin/DeepCovid](https://github.com/shervinmin/DeepCovid)]([https://github.com/shervinmin/DeepCovid](https://github.com/shervinmin/DeepCovid)) (accessed on 20 May 2021), which has been constructed by collecting data from two publicly available sources ([PERSON] et al., 2020). The downloadable COVID-Xray-5k dataset is already split in training and test sets, and it contains 2084 training and 3100 test images. However, from the web URL, it can be downloaded a training set composed of only 580 Non-COVID and 84 COVID images, respectively, while the test set is composed of 3000 Non-COVID and 100 COVID images. An example of a representative image for each class is reported in the second row of Figure 2.  
Since the COVID-19 disease causes a pneumonia, from both datasets, we have selected only pneumonia images as the Non-COVID target class. In addition, for validating the proposed approach, we also consider normal images as targets. Furthermore, from the CT dataset, we have randomly selected 3500 images for both the Pneumonia and COVID classes for evaluating the target and 500 images from both classes to test it. For the CXR  
Figure 2: Examples of some chest CT and CXR images: (**a**) CT normal, (**b**) CT common pneumonia (CP), (**c**) CT novel coronavirus pneumonia (NCP), (**d**) RX normal, (**e**) RX CP, and (**f**) RX NCP.  
dataset, we used all the 580 images available for the Non-COVID class and the 84 images available for the COVID class to evaluate the target, while we selected 100 pneumonia images and all the available 97 COVID images for the test set. A summary of the used datasets is provided in Table 2. The same size of the target/test sets are used for the normal class. In the numerical results, we then select \(N_{T}\) target images from those available.