# COVIDNet: Implementing Parallel Architecture on Sound and Image for High Efficacy
## 3 Materials and Methods  
Due to the lack of COVID-19 positive CXR images, a multiple data source was used ensuring there were no duplicates by going through the metadata file using Python when sorting and splitting the dataset into their train and test folders. The sources for our CXR dataset are the University of Montreal [9], which contained 20 different types of various non-COVID-19 pneumonia, DarwinAI Corporation Figure 1[10] which contained both COVID-19 positive and non-COVID-19 pneumonia, DarwinAI Corporation AcutalMed [11] which contained COVID-19 positive images, COVID-19 Radiography Database Kaggle [12] which contributed majorly to the dataset by containing all three classes COVID-19 pneumonia, non-COVID-19 pneumonia, and healthy lungs, and finally--RSNA Pneumonia Detection Challenge Dataset [13] which contained non-COVID-19 pneumonia and healthy lungs. This brings our dataset count of 20,054 images across three classes. On the other hand, for the cough dataset, the researchers were only able to acquire one dataset which is provided by the Indian Institute of Science under the Project Coswara [14] which contained a total of 1053 audio files. The audio files are all recorded at a sampling frequency of 48 kHz of the forced cough, and the recordings are four to six seconds long. For pre-processing the CXR images, all the images were converted into greyscale and resized to 150 \(\times\) 150 pixels due to the GPU memory limitation. Meanwhile, for the cough audio files were converted from.wav to Mel-spectrogram using the short-time Fourier transform [15]. Tables 1-3 shows the dataset split for each model at the final stage of pre-processing. The novelty of this research has a significant parallel architecture for future practical utilization. A convolution is a sliding kernel (of a defined dimension, usually square) that performs element-wise multiplication on each of the pixels with which it overlaps and then adds the results. Several separate kernels are applied to a single image in a current CNN, and the results are piled in the output. Each kernel traverses the entire image (in specified steps with a specified speed) [16]. The parameters of these kernels are updated using backpropagation (also called weights). As a result, both forward and backward propagation requires a lot of computing power. The most important findings of this work were that the efficacy of both inputs and sequences was quite high. Figure 1 has an illustration of the parallel architecture for the implementation. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Categories** & **Train** & **Test** \\ \hline COVID-19 Pneumonia & 1176 & 505 \\ Healthy & 7134 & 3058 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Dataset Split for COVID-19 CXR Model (70:30 Ratio). \begin{table}
\begin{tabular}{c c c} \hline \hline
**Categories** & **Train** & **Test** \\ \hline Non-COVID-19 Pneumonia & 4486 & 2992 \\ Healthy & 6115 & 4077 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Dataset Split for non-COVID-19 CXR Model (60:40 Ratio). \begin{table}
\begin{tabular}{c c c} \hline \hline
**Categories** & **Train** & **Test** \\ \hline COVID-19 Positive & 368 & 158 \\ COVID-19 Negative & 368 & 159 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Dataset Split for Cough Model (70:30 Ratio). For both the CXR Model, transfer learning was performed with the base of the model being ImageNet VGG-16 model, only the pre-trained weights were extracted and were trained with the new dataset and the new model architecture as shown below in Figure 2, the CXR image will go through six different blocks whereby the first convolutional block would contain two convolutional 2D layers with 16 filters each and follow by a max-pool layer. The second, third, fourth, and fifth convolutional blocks are all similar with two separable convolutional 2D layers with a kernel size of 3 \(\times\) 3, which is followed by a batch normalization layer and with a max-pool layer at the end of each block.