Recibido: 2 de julio de 2020; Aceptado: 20 de abril de 2021
COVID-19 Diagnosis with Deep Learning
Diagnóstico de COVID-19 con Deep Learning
ABSTRACT
The coronavirus disease 2019 (COVID-19) is fatal and spreading rapidly. Early detection and diagnosis of the COVID-19 infection will prevent rapid spread. This study aims to automatically detect COVID-19 through a chest computed tomography (CT) dataset. The standard models for automatic COVID-19 detection using raw chest CT images are presented. This study uses convolutional neural network (CNN), Zeiler and Fergus network (ZFNet), and dense convolutional network-121 (DenseNet121) architectures of deep convolutional neural network models. The proposed models are presented to provide accurate diagnosis for binary classification. The datasets were obtained from a public database. This retrospective study included 757 chest CT images (360 confirmed COVID-19 and 397 non-COVID-19 chest CT images). The algorithms were coded using the Python programming language. The performance metrics used were accuracy, precision, recall, F1-score, and ROC-AUC. Comparative analyses are presented between the three models by considering hyper-parameter factors to find the best model. We obtained the best performance, with an accuracy of 94,7%, a recall of 90%, a precision of 100%, and an F1-score of 94,7% from the CNN model. As a result, the CNN algorithm is more accurate and precise than the ZFNet and DenseNet121 models. This study can present a second point of view to medical staff.
Keywords:
COVID-19, deep learning, convolutional neural network, Zeiler and Fergus network, dense convolutional network-121.RESUMEN
La enfermedad del coronavirus 2019 (COVID-19) es fatal y se está propagando rápidamente. La detección y el diagnóstico tempranos de la infección por COVID-19 evitarán la propagación rápida. Este estudio tiene como objetivo detectar COVID-19 automáticamente a partir del conjunto de datos de tomografía computarizada de tórax (TC). Se presentan los modelos estándar para la detección automática de COVID-19 utilizando imágenes de TC de tórax sin procesar. El estudio consta de arquitecturas de red neuronal convolucional (CNN), red Zeiler y Fergus (ZFNet) y red convolucional densa-121 (DenseNet121) de modelos de redes neuronales convolucionales profundas. Los modelos propuestos se presentan para proporcionar diagnósticos precisos para clasificación binaria. Los conjuntos de datos se obtuvieron de una base de datos pública. Este estudio retrospectivo incluyó 757 imágenes de TC de tórax (360 imágenes de TC de tórax COVID-19 confirmadas y 397 imágenes no COVID-19). Los algoritmos se codificaron utilizando el lenguaje de programación Python. Los parámetros de desempeño que se utilizaron fueron exactitud, precisión, recuperación, puntaje-F1 y ROC-AUC. Se presentan análisis comparativos entre los tres modelos considerando factores de hiperparámetros para encontrar el mejor modelo. Obtuvimos el mejor rendimiento, con exactitud del 94,7%, recuperación del 90%, precisión del 100% y puntuación-F1 del 94,7% del modelo de CNN. Como resultado, el algoritmo de CNN es más exacto y preciso que los modelos ZFNet y DenseNet121. Este estudio puede presentar un segundo punto de vista al personal médico.
Palabras clave:
COVID-19, deep learning, red neuronal convolucional, red Zeiler y Fergus, red convolucional densa-121.Introduction
Machine-learning (ML) techniques have been used in medical imaging and infectious disease diagnosis (Lundervold and Lundervold, 2019; Chen et al., 2016; Ardabili et al., 2020). The coronavirus disease 2019 (COVID-19), which started to spread from Wuhan (China), as of the end of December 2019 (Zhu et al., 2020; Huang et al., 2020), has affected the whole world. According to the updated data, there have been more than 134 957 021 confirmed cases and 2 918 752 confirmed deaths because of COVID-19 in 223 countries as of 11 April 2021 (WHO, 2021). Coronaviruses (CoVs) are related to zoonotic viruses that can cause disease in mammal or bird species (Tezer and Bedir Demirdag, 2020). Various medical approaches are available to diagnose and detect COVID-19 in patients, such as the transcription-polymerase chain reaction (RT-PCR) test kits (Ai et al., 2020) and chest computed tomography (CT) images. Chest CT scans have played a vital role in diagnosis during this pandemic (Akcay et al., 2020; Bao et al., 2020; Chung et al., 2020; Lei et al., 2020). Early detection, diagnosis, isolation, and treatment are critical to preventing further spread of the disease (Guner et al., 2020). In some cases, real-time polymerase chain reactions can give incorrect or inadequate information (Ai et al., 2020). It is critical to develop cost-effective and accurate detection methods that all countries can benefit from. Deep learning (DL) is a part of machine learning (Deng, 2014). Recently, this technique has shown effective performance in the field of medical image processing. DL-based research has been presented for the detection of COVID-19. This includes artificial neural networks (ANN), convolutional neural networks (CNN), recurrent neural networks (RNN, a hybrid classifier architecture) (Goreke etal., 2021); ResNet50, Incep-tionV3, and InceptionResNetV2 (Narin etal., 2020); nCOVnet (Panwar et al., 2020); DarkCovidNet (Ozturk et al., 2020); VGG-19 (Ioannis and Bessiana, 2020); COVID-NET (Wang and Wong, 2020); and Xception and ResNeXt (Jain et al., 2021) models using X-ray images. At the same time, studies that detect COVID-19 using CT images have been presented in the literature. AlexNet, VGG-16, VGG-19, SqueezeNet, GoogLeNet (Ardakani et al., 2020), ResNet-50 as a specific model (Li et al., 2020), DenseNet (Yang et al., 2020), and DenseNet201 (Jaiswal et al., 2020) algorithms have used CT images for COVID-19 detection and diagnosis. Although there are studies on the subject, there is still insufficient literature. Deep learning algorithms can help develop a new useful diagnosis and management system for COVID-19 cases. In this study, we have proposed three models for an automatic prediction of COVID-19 using DL-based using chest CT images. The proposed models have an end-to-end architecture that uses feature extraction methods and raw chest-CT images for analysis. These models are a customized CNN, ZFNet, and DenseNet121. We reached this accuracy by means of a large-size dataset and multi-layer models. Along with the customized CNN model, we proposed a small-size nonstandard dataset.
Radiologists have to be pioneers in medical imaging and interpretation during the COVID-19 pandemic, but the medical staff are currently under heavy workloads. Therefore, DL-based approaches can help contribute to the medical system and offer a secondary perspective.
This study is organized as follows: in section 2 (Materials and methods), we give a short overview of the literature in deep learning and the proposed models; we describe how we obtained the dataset, and we present architecture charts and plots. Then, we provide a statistical analysis. In section 3 (Results), we show the results of the experiment. After that, we discuss and interpret the obtained results and conclusions.
Materials and methods
In this section, we define the dataset used in the study for DL. The second part is followed by the proposed CNN, ZFNet, and DenseNet121. It compares the performance of these three models. We built DL-based platforms for automatic detection and prediction of COVID-19 (Figure 1).
Figure 1: A schematic presentation of the study.
Deep learning is a subclass of machine learning and is the most popular approach in artificial intelligence applications (LeCun et al., 2015). DL is a method that imitates the human brain in the use of information and aims for new approaches in complex data solutions. The most important feature that distinguishes deep learning from traditional neural networks is that it has more than one hidden layer (Sejnowski and Tesauro, 1989). Generally, the architecture of convolutional neural networks consists of input, convolution, pooling, convolution, pooling, fully connected, fully connected, and output prediction (Pouyanfar et al., 2018).
The data were downloaded and used from the GitHub public database. The COVID-CT-Dataset has 360 CT images containing clinical findings of COVID-19 from 216 patients and 397 non-COVID-19 CT images (Github/UCSD-AI4H, 2020). No human and no animal rights were violated. The research was performed according to the principles of the Declaration of Helsinki. We used the Keras deep learning library with the TensorFlow backend to implement deep learning models (Figure 3). This study was done on a personal laptop equipped with an Intel 15 processor, 6 GB of RAM, and a GTX 940MX NVidia GPU with 2GB of VRAM. Table 1 shows the DL methods used and statistics of the dataset for chest CT images.
Table 1: Statistics of the dataset
Source: Author
A chest CT dataset was used (Figure 2), which was obtained with different techniques and did not have standard features. Therefore, all images were pre-processed.
Figure 2: Raw chest CT image samples.
Figure 3: Deep learning algorithm framework.
Problem solving with the help of deep learning is equivalent to optimally designing a multi-layered network structure. The raw CT dataset and 100 epochs were used as the input layer in our study (Figures 4 to 6). BatchNormalization caused the model to learn better during training, and it also positively affected the stability of the network.
Figure 4: Architecture of the customized CNN model.
Figure 5: Architecture of the ZFNet model.
Figure 6: Architecture of the DenseNet121 model.
CNNs have been used in imaging-based classification in various medical areas (Lakhani and Sundaram, 2017; Esteva et al., 2017). They have been significantly practiced in medical image processing to develop health research (Choe et al., 2019). CNNs are a kind of artificial neural network with multiple layers contributing to high accuracy and cost reduction in its large datasets (Panwar et al., 2020). The customized CNN's architecture contains 3 layers instead of 2 in the 2-3-4 layers (Figure 4). Therefore, we increased the model's performance in terms of accuracy.
Performance measures
This study used the receiver operating characteristic (ROC) curve to evaluate classifier output quality. ROC curve analysis is generally used in medical studies for evaluating the diagnostic accuracy of a continuous class (Kamarudin et al., 2017). The confusion matrix is based on four parameters, identified as True Positive (TP), False Positive (FP), False Negative (FN), and True Negative (TN), as shown in Table 2. Accuracy, precision, recall, F1-score, and ROC-AUC metrics were used for performance measurement (Togacar et al., 2020).
Table 2: Confusion matrix
Source: Author
Experimental results
We used CNN, ZFNet, and DenseNet121 DL algorithms to detect COVID-19 for training, validation, and testing purposes. Visual performance plots are given in Figures 7 to 9, and the evaluation results of the methods are shown in Table 3.
Table 3: Comparative results of models
Source: Author
Figure 7: Confusion matrix visualization: (top) CNN, (middle) ZFNet, (bottom) DenseNet121.
Figure 8: Training loss and validation loss values for CNN (top), ZFNet (middle), DenseNet121 (bottom).
Figure 9: ROC curve obtained for customized CNN (top), ZFNet (middle), (bottom) DenseNet121Algorithm.
We obtained the best performance with the customized CNN model, with an accuracy of 94,7%, a recall of 90%, a precision of 100%, and an Fl-score of 94,7%. The lowest performance values were obtained by DenseNet121 with an accuracy of 84,2%, a recall of 76,5%, a precision of 85%, and an Fl-score of 81,2%. The confusion matrix for the detection of COVID-19 obtained from the study is given in Figure 7. Accuracy, precision, recall, Fl-score, and ROC-AUC were used for performance evaluation (Table 3).
The loss function layer is used to calculate the expected results predicted by the vital features (Sriporn et al., 2020) (Figure 8).
According to the results of the ROC curve (Figure 9), we obtained the best result from the CNN model with 95%, the second best result from the ZFNet model with 86,8%, and the lowest result with the DenseNet121 model (83,5%).
Conclusions
In this study, we focused on the detection and prediction of COVID-19 using chest CT imaging. As a result, the CNN algorithm gave more satisfactory and higher accuracy than ZFNet and DenseNet121. The additional layers we applied for the CNN model increased the study's performance (while the standard CNN ROC-AUC value was 94%, it increased to 95% with the customized method). We presented a different perspective to the standard CNN approach. According to the results, the customized CNN model can be used to automatically predict the COVID-19 disease.
A major limitation of this study is the use of a limited number of COVID-19 chest CT images; it can offer radiologists and medical staff a second perspective. COVID-19 diagnosis performed using DL-based algorithms can help medical staff with reporting and interpreting. In future work, studies with more datasets and different machine learning methods will be presented.
Acknowledgements
Acknowledgments
We would like to thank Veysel Turk and Serhat Kaya for their technical contribution.
References
- Ardakani, A. A., Kanafi, A. R., Acharya, U. R., Khadem, N., and Mohammadi, A. (2020). Application of deep learning technique to manage COVID-19 in routine clinical practice using CT images: results of 10 convolutional neural networks. Computers in Biology and Medicine, 727, 103795. 10.1016/j.compbiomed.2020.103795 [DOI] 🠔
- Huang, C., Wang, Y., Li, X., Ren, L., Zhao, J., Hu, Y., Zhang, L., Fan, G., Xu, J., Gu, X., Cheng, Z., Yu, T., Xia, J., Wei, Y., Wu, W., Xie, X., Yin, W., Li, H., Liu, M. . . . Cao, B. (2020). Clinical features ofpatients infected with 2019 novel coronavirus in Wuhan, China. The Lancet, 395(10223), 497-506. 10.1016/S0140-6736(20)30183-5 [DOI] 🠔
- Li, L., Qin, L., Xu, Z., Yin, Y., Wang, X., Kong, B., Bai, J., Lu, Y., Fang, Z., Song, Q., Cao, K., Liu, D., Wang, G., Xu, Q., Fang, X. Zhang, S., Xia, J., and Xia, J. (2020). Artificial intelligence distinguishesCOVID-19 from community acquired pneumonia on chest CT. Radiology, 296(2). 10.1148/radiol.2020200905 [DOI] 🠔
- Sejnowski, T. and Tesauro, G. (1989). The Hebbian rule for synaptic plasticity algorithms and implementations. In J. H. Byme and W. O. Berry (Eds.). Neural models of plasticity (pp. 94-103). California Academic Press. 🠔
- Yang, S., Jiang, L., Cao, Z., Wang, L., Cao, J., Feng, R., Zhang, Z., Xue, X., Shi, Y., and Shan, F. (2020). Deep learning for detecting corona virus disease 2019 (COVID-19) on high-resolution computed tomography: a pilot study. Annals of Translational Medicine, 8(7), 50. 10.21037/atm.2020.03.132 [DOI] 🠔
- Zhu, N., Zhang, D., Wang, W. J., Li, X., Yang, B., Song, J., Zhao, X., Huang, B., Shi, W., Lu, R., Niu, P., Zhan, F., Ma, X., Wang, D., Xu, W., Wu, G., Gao, G. F., and Tan, W. (2020). A novel coronavirus from patients with pneumonia in China, 2019. The New England Journal of Medicine, 382(8), 727-733. 10.1056/NEJMoa2001017 [DOI] 🠔
Appendix
Table A1: Parameters of the customized CNN model for binary classification
Source: Author
Table A2: Parameters of the ZFNet model for binary classification
Source: Author
Table A3: Parameters of the DenseNet121 model for binary classification
Source: Author