201 American Academic Scientific Research Journal for Engineering, Technology, and Sciences ISSN (Print) 2313-4410, ISSN (Online) 2313-4402 https://asrjetsjournal.org/index.php/American_Scientific_Journal/index CNN-resNet-50 Algorithm to Detect the Novel Coronavirus (COVID-19) Using CT Images H. Romdhanea*, H. Dzirib, M. Ali Chernic, Fethia Abidid, Asma Zidie a,bUniversité de Tunis El Manar, Laboratoire de recherche en Biophysique et Technologies Médicales,(LRBTM), ISTMT cUniversité de Tunis, LR13 ES03 SIME, ENSIT, Montfleury 1008 Tunisia d,eInstitut Salah Azaiez Service d'imagerie médicale, 1006 Tunis, Tunisia aEmail: romdhane.hamida@gmail.com bEmail: dziri_halima@hotmail.fr Abstract The detection of the Covid-19 pandemic has been crucial in ensuring health safety and preventing the spread of the virus. In this paper, we present a novel approach by combining the CNN and ResNet-50 algorithms into a unified model. Our experimental results showcase the remarkable efficiency of the proposed method, outperforming both the individual CNN and ResNet-50 approaches. The hybrid CNN-ResNet-50 algorithm demonstrates its ability to automatically and effectively assist in the early diagnosis of COVID-19 patients. By leveraging this combined model, we aim to contribute to the improved detection and management of the pandemic. Keywords: Convolutional neural networks; COVID-19; CT scan images; ResNet-50. 1. Introduction Corona virus (COVID 19) appeared in Wuhan China in December 2019 [1].It spread rapidly in the world. As it is a novel virus, his therapeutic treatment and his vaccination are absent. So, early diagnosis is imperative. The detection of COVID-19 at an early stage play a vital role in controlling Coronavirus due to its high transmissibility.According to the guidelines of the Chinese government [2], the reverse transcription-polymerase chain reaction (RT-PCR) is the main pointer to diagnosis the coronavirus by gene sequencing for respiratory or blood samples. Comparing to COVID-19’s rapid spread rate, the process of RT-PCR takes a long time. It takes 4 to 6 hours to get results. RT-PCR test kits are inefficient and it has a huge shortage [3].Another method to diagnose COVID-19 infections using radiological images like chest X-rays or computed tomography (CT). The COVID is identified as a ground glass opacities [4]. ------------------------------------------------------------------------ Received: 5/13/2024 Accepted: 7/13/2024 Published: 7/23/2024 ------------------------------------------------------------------------ * Corresponding author. https://asrjetsjournal.org/index.php/American_Scientific_Journal/index American Academic Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) - Volume 98, No 1, pp 201-209 202 It is defined as an area of pulmonary parenchyma whose density is increased, without obliterating the pulmonary vessels. According to [5], in comparing the RT-PCR with chest CT may be a more reliable, practical, and rapid method to diagnose and assess coronavirus. To automatically diagnose Covid-19, Machine learning are introduced . Many researchers have demonstrated the efficacies of these algorithms based on clinical images, CT scans, and X-rays of the chest.Asif and his colleagues. [6] proposed a CoroNet, a Deep Convolutional Neural Network model, to detect COVID19 from chest X-ray images COVID-19 and other chest pneumonia X- ray images. The proposed model achieved an overall accuracy of 89.6%, and more importantly the precision and recall rate for COVID-19 cases are 93% and 98.2% for 4-class cases (COVID vs Pneumonia bacterial vs pneumonia viral vs normal).Lafraxo and his colleagues. [7] developed a CoviNet an automated COVID-19 Detection from chest X-rays images using Deep Learning Techniques. This model achieved an accuracy of 98.62% for binary classification and 95.77% for multi-class classification.Ying Y and his colleagues. [8] used a DeepPneumonia: ResNet architecture to detect COVID-19. The used data set contain 275 CT scans comprising of 88 COVID-19. The experimental outcome obtained 93 % sensitivity and 99.00% AUC for COVID-19 cases. Cheng Jin JF and his colleagues. [9] introduced deep neural network to detect coronavirus from 970 CT images. This algorithm achieved 94.98% accuracy and 95.47% specificity.Butt C and his colleagues. [10] used a 3D deep learning with location-attention mechanism to detect COVID-19 from CT images. It applied to 618 CT images including 219 COVID-19 cases and it achieved 86.7% accuracy. Wang L and his colleagues. [11] proposed COVID-Net algorithm, a deep CNN architecture. It applied to 13,975 X-ray images from 13,870 patients. This proposed algorithm achieved 92.4% accuracy.Wu X and his colleagues. [12] developed a multi- view fusion model using deep learning techniques to detect the novel coronavirus pneumonia. This model applied to 495 CT images consisting of 368 COVID-19 cases and it achieved 70.0% Accuracy and 73.2% AUC.Khan A and his colleagues. [13] developed a CoroNet: Xception architecture for detection and diagnosis of COVID-19 from chest X-ray images. The proposed model achieved 89.6% accuracy.Wang S and his colleagues. [14] used modified inception to detect corona virus disease from CT image. The proposed algorithm achieved 79.3% accuracy = 79.3% and 83.0% specificity.COVID-19 continues to be a highly severe and life- threatening disease, highlighting the urgent need for swift and efficient detection methods to diagnose it at an early stage. In this context, researchers have recognized the effectiveness of Artificial Intelligence (AI) as a valuable tool in COVID-19 detection. The present article builds upon this notion by proposing an improvement achieved through the combination of two algorithms, namely CNN and ResNet-50. By leveraging the strengths of both algorithms, the aim is to enhance the accuracy and efficiency of COVID-19 detection.This paper is organized as follows: Section 2 presents the materials and methods used. Section 3 describes the results of the study and discussion, and in the end, Section 4 presents the conclusion. 2. Materials and methods 2.1. Data Set Description 306 CT exams have been used as a data bases. It consists of three classes: 170 exams confirmed COVID-19 patients, 59 exams CAP cases (Community acquired Pneumonia) [15] and other 77 images belonged to normal without COVID-19. X-ray image dataset patients collected from [16]. American Academic Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) - Volume 98, No 1, pp 201-209 203 The COVID is showed in the image (figure 1) as a ground glass. It is defined as an area of pulmonary parenchyma whose density is increased, without obliterating the pulmonary vessels. Figure 1: COVID-19 images 2.2. Data Preprocessing The preprocessing steps involve many operations including:  Resize images to consist size (224×224 pixels).  Normalize pixels values.  Augment the data set with transformations such as rotations, translation and flips. 2.3. Convolutional Neural Network (CNN) A Convolutional Neural Network (CNN) is a specialized form of Artificial Intelligence that utilizes a mathematical operation called convolution to process image data. Convolution involves multiplying two matrices, resulting in a smaller matrix. In the context of CNNs, an input image is processed using a filter or kernel, generating a feature map that describes the image. During the convolution operation, a filter, typically a 2x2 or 3x3 matrix, is applied by sliding it over the image matrix. The corresponding values in both matrices are multiplied and added to produce a single number representing that particular section of the input space. This process is repeated across the entire image. In this paper, a traditional CNN architecture, commonly employed for image processing and interpretation, is adopted. The architecture is represented as a Keras sequential model, depicted in Figure 2 American Academic Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) - Volume 98, No 1, pp 201-209 204 Figure 2: CNN model architecture 2.4. ResNet-50 ResNet-50 is a deep residual network that falls under the category of Convolutional Neural Networks (CNNs) used for image classification. One of its key innovations is the introduction of a novel architecture called "network-in-network" that utilizes residual layers. The ResNet-50 model is composed of five stages, each containing a convolutional block and an identity block. Each convolutional block comprises three convolution layers, and each identity block also consists of three convolution layers. ResNet-50 is specifically designed with 50 residual networks, as depicted in Figure 3, and it accepts images of size 224 × 224 pixels.The model is structured with five convolutional layers, namely conv1, conv2, conv3, conv4, and conv5. Upon loading the input image, it undergoes a convolutional layer with 64 filters and a kernel size of 7×7, followed by a max pooling layer with a stride length of 2. In conv2, the layers are grouped in pairs due to the connectivity pattern in residual networks. This process is repeated until the fifth convolutional layer, after which average pooling is applied at the fully connected layer, followed by softmax for classification [17]. Figure 3: The basic architecture of ResNet-50 (only 34 layers are shown for simplicity) Full connected layer 64 neurons Feature extraction American Academic Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) - Volume 98, No 1, pp 201-209 205 2.5. Combined CNN- ResNet-50 network In this work, a combined model was developed to automatically detect coronavirus cases using CT images. The architecture of this model was designed by combining CNN and ResNet-50 networks. This algorithm takes in an image of CT and uses a CNN- ResNet-50 to detect if the patient has COVID-19. The model uses the ResNet-50 architecture for initial feature extraction and adds custom dense and dropout layers for further processing and classification. The model is compiled with the Adam optimizer and binary cross-entropy loss function, and trained using data generators for augmented training and validation data. Figure (5) illustrates the proposed hybrid network for COVID-19. Figure 4: An illustration of the proposed hybrid network for COVID-19 detection 3. Results and discussion 3.1. Dataset division Initially, a comprehensive analysis was conducted on CT images by three radiologists. This analysis involved 170 exams of confirmed COVID-19 patients, 59 exams of CAP cases, and an additional 77 normal exams without COVID-19. Our dataset is organized into three folders, as indicated in Table 1: 1. Training Folder: This folder contains the training images that are used to teach the model. 2. Validation Folder: The second folder consists of images that serve as a validation set for assessing the model's performance during training. 3. Testing Folder: The third folder contains images used to evaluate the model once it has learned the correlations between the images and their respective labels (COVID/Not-COVID). American Academic Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) - Volume 98, No 1, pp 201-209 206 Table 1: Dataset image count for training and testing Dataset Covid-19 exams Normal exams CAP cases exams Total Training data 117 51 41 209 Testing data 11 17 5 33 Validation data 32 4 11 47 3.2. Model Training The training phase of the CNN- ResNet-50 hybrid model involves feeding preprocessed CT images through the initial CNN layers for feature extraction, followed by deeper feature learning using the ResNet-50 backbone, and optimizing the model parameters through backpropagation using a binary cross-entropy loss function and an Adam optimizer, with early stopping and model checkpointing to ensure the best performance on validation data. Table 2: Classification Performance Metrics Loss Test Accuracy Test Number of Iterations (Epoch) 0.1099 95.29% 50 The model achieved a training loss of 0.1099 and an accuracy of 95.29%, indicating that it is highly effective at correctly classifying the training data with minimal prediction errors. 3.3. Performance evaluation metrics Performance was assessed via the accuracy, recall, precision and F1-mesure metrics which can be defined as: 𝐴𝑐𝑐𝑢𝑟𝑎𝑐𝑦 = 𝑇𝑃+𝑇𝑁 𝑇𝑃+𝐹𝑃+𝐹𝑁+𝑇𝑁   𝑅𝑒𝑐𝑎𝑙𝑙 = 𝑇𝑃 𝑇𝑃+𝐹𝑃  𝑃𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛 = 𝑇𝑃 𝑇𝑃+𝐹𝑁  𝐹 − 𝑚𝑒𝑠𝑢𝑟𝑒 = 2𝑇𝑃 2𝑇𝑃+𝐹𝑃+𝐹𝑁  TP= number of true-positive TN= number of true-negative FP= number of false-positive American Academic Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) - Volume 98, No 1, pp 201-209 207 FN= number of false- negative This comparative study evaluates the performance of a hybrid CNN- ResNet-50 model against other popular models like ResNet-50 and InceptionV3. The evaluation includes metrics like accuracy, precision, recall and F1- score. Using ResNet-50 and InceptionV3 for comparison with the CNN- ResNet-50 hybrid model provides a robust evaluation because these established architectures are renowned for their diverse design principles, exceptional performance in image classification tasks, and varying strengths in feature extraction, model complexity, and computational efficiency. This comprehensive comparison helps to highlight the strengths and weaknesses of the hybrid model in detecting COVID-19 from chest CT images. The final results look in the Table 4. Table 3: confusion matrix Predicted Negative Predicted Positive Actual Negative 3975 0 Actual Positive 654 0 The model accurately identified all 3975 negative cases but missed all 654 positive cases, meaning it can detect negatives well but fails completely at detecting positives. Table 4: Performance Metrics (%) Model Accuracy Recall Precision F1-score ResNet-50 83.97 % 87 % 82% 82,54 % InceptionV3 65 % 72 % 56 % 78 % Proposed model 87 % 100 % 86 % 92 % Table 4 presents the results achieved by employing the four algorithms. ResNet-50 shows a strong overall performance with good balance between accuracy, recall, and precision.InceptionV3 has the lowest accuracy and precision, indicating it struggles with correctly identifying and predicting positive cases. Proposed Model outperforms the others with the highest accuracy and F1-score, perfect recall, and high precision, making it the most reliable model for detecting COVID-19 from the given data. In conclusion, the Proposed Model is the best performing model overall, as it not only achieves the highest accuracy but also perfectly identifies all positive cases without compromising precision. This suggests it is highly effective and reliable for detecting COVID-19. 4. Conclusion This paper introduces an automated approach aimed at enhancing the diagnosis of the Covid-19 pandemic. The approach suggests the utilization of a combined model consisting of two algorithms, namely InceptionV3 and ResNet-50. Through experimental analysis, the results showcase the remarkable effectiveness of the proposed American Academic Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) - Volume 98, No 1, pp 201-209 208 method in comparison to individual InceptionV3 and ResNet-50 approaches. Particularly, the integration of CNN and ResNet-50 in a hybrid layout significantly enhances the classification performance. The development of this hybrid CNN-ResNet-50 algorithm serves to provide efficient assistance in the early diagnosis of COVID- 19 patients References [1] Huang, Chaolin, et al. "Clinical features of patients infected with 2019 novel coronavirus in Wuhan, China." The lancet 395.10223 (2020): 497-506. [2] Ai T, Yang Z, Hou H, Zhan C, Chen C, Lv W, Tao Q, Sun Z, Xia L. Correlation of chest CT and RT- PCR testing in coronavirus disease 2019 (COVID-19) in China: a report of 1014 cases. Radiology 2020:200642. https://doi.org/10.1148/ radiol.2020200642. [3] Jibril SIAML, Islam Md M, Sharif US. Predictive data mining models for novel coronavirus (COVID- 19) infected patients recovery. SN Comput Sci 2020;1:206. https://doi.org/10.1007/s42979-020-00216- w. [4] Li Y, Xia L. Coronavirus disease 2019 (COVID-19): role of chest CT in diagnosis and management. AJR Am J Roentgenol 2020;1–7. https://doi.org/10.2214/ AJR.20.22954. [5] Fang Y, Zhang H, Xie J, Lin M, Ying L, Pang P, Ji W. Sensitivity of chest CT for COVID-19: comparison to RT-PCR, Radiology. 200432, https://doi.org/10.114 8/radiol.2020200432; 2020. [6] CoroNet: A deep neural network for detection and diagnosis of COVID-19 from chest x-ray images [7] Lafraxo, Samira, and Mohamed El Ansari. "CoviNet: automated COVID-19 detection from X-rays using deep learning techniques." 2020 6th IEEE congress on information science and technology (CiSt). IEEE, 2021. [8] Ying Y, Zheng S, Li S, Zhang L, Zhang X, Huang X, ChenZ, Zhao J, Jie H, Wang Y, Chong R, Shen Y, Zha J, Yang Y. Deep learning enables accurate diagnosis of novel coronavirus(COVID-19) with CT images. medRxiv. 2020. [9] Cheng Jin JF, Chen W, Cao Y, Zhanwei X, Zhang X, Deng L, Zheng C, Zhou J, Shi H. Development and evaluation of an AI system for COVID-19 diagnosis. medRxiv. 2020. [10] Butt C, Gill J, Chun D, Babu BA. Deep learning system to screen coronavirus disease pneumonia. Appl Intell. 2019. [11] Wang L, Wong A. COVID-Net: a tailored deep convolutional neural network design for detection of COVID-19 cases from chest X-ray images. 2020. https://doi.org/10.1007/s42979-020-00216-w https://doi.org/10.1007/s42979-020-00216-w American Academic Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) - Volume 98, No 1, pp 201-209 209 [12] Wu X, Hui H, Niu M, Li L, Wang L, He B, Yang X, Li L, Li H, Tian J, Zha Y. Deep learning-based multi-view fusion model for screening 2019 novel coronavirus pneumonia: a multicenter study. Eur J Radiol. 2020;128:1–9. [13] Khan AI, Shah JL, Bhat MM. CoroNet: a deep neural network for detection and diagnosis of COVID- 19 from chest X-ray images. Comput Methods Programs Biomed. 2020. [14] Wang S, Kang B, Ma J, Zeng X, Xiao M, Guo J, Cai M, Yang J,Li Y, Meng X, Xu B. A deep learning algorithm using CT images to screen for corona virus disease (COVID-19). medRxiv. 2020. [15] Ticona, Javier H., Victoria M. Zaccone, and Isabel M. McFarlane. "Community-acquired pneumonia: A focused review." American journal of medical case reports 9.1 (2021): 45. [16] Afshar, P., Heidarian, S., Enshaei, N. et al. COVID-CT-MD, COVID-19 computed tomography scan dataset applicable in machine learning and deep learning. Sci Data 8, 121 (2021). https://doi.org/10.1038/s41597-021-00900-3 [17] Victor Ikechukwu, A., Murali, S., Deepu, R., & Shivamurthy, R. (2021). ResNet-50 vs VGG-19 vs training from scratch: A comparative analysis of the segmentation and classification of Pneumonia from chest X-ray images. Global Transitions Proceedings, 2(2), 375– 381. https://doi.org/10.1016/j.gltp.2021.08.027 https://doi.org/10.1038/s41597-021-00900-3 https://doi.org/10.1016/j.gltp.2021.08.027