# Automatic Evaluation of the Lung Condition of COVID-19 Patients Using X-ray Images and Convolutional Neural Networks

^{1}

^{2}

^{3}

^{4}

^{5}

^{6}

^{7}

^{8}

^{*}

## Abstract

**:**

## 1. Introduction

- Is it possible to utilize CNN in order to classify COVID-19 patients according to X-ray images of lungs?
- Which CNN architecture achieves the highest classification performance?
- Which are the best-performing configurations in regards to the solver, number of iterations, and batch size?
- How do transfer learning and layer freezing influence the performances of the best configurations?

## 2. Dataset Construction

#### 2.1. Dataset Description

- Clinical picture description;
- Physical examination;
- Laboratory examination; and
- X-ray finding.

- Mild clinical picture;
- Moderate clinical picture;
- Severe clinical picture; and
- Critical clinical picture.

#### 2.2. Description of Data Augmentation Technique and Resulting Dataset

- 90 degree rotation around sagittal axis,
- 180 degree rotation around sagittal axis,
- 270 degree rotation around sagittal axis,
- 180 degree rotation around longitudinal axis,
- 180 degree rotation around longitudinal axis combined with 90 degree rotation around sagittal axis,
- 180 degree rotation around longitudinal axis combined with 180 degree rotation around sagittal axis, and
- 180 degree rotation around longitudinal axis combined with 270 degree rotation around sagittal axis.

## 3. Description of Used Convolutional Neural Networks

- AlexNet,
- VGG-16, and
- ResNet.

#### 3.1. AlexNet

#### 3.2. VGG-16

#### 3.3. ResNet

## 4. Research Methodology

#### 4.1. Description of $\overline{AU{C}_{micro}}$ and $\overline{AU{C}_{macro}}$

#### 4.1.1. $\overline{AU{C}_{micro}}$

#### 4.1.2. $\overline{AU{C}_{macro}}$

#### 4.2. Overfitting Issue

- Image augmentation; and
- Early stopping.

#### 4.3. Freezing Layers

#### 4.4. Results Representation

## 5. Results and Discussion

#### 5.1. Results Achieved with AlexNet

#### 5.2. Results Achieved with VGG-16

#### 5.3. Results Achieved with ResNet Architectures

#### 5.3.1. Results Achieved with ResNet50

#### 5.3.2. Results Achieved with ResNet101

#### 5.3.3. Results Achieved with ResNet152

#### 5.4. Comparison of Achieved Results

## 6. Conclusions

- It is possible to utilize CNN for automatic classification of COVID-19 patients according to X-ray lung images;
- The best results are achieved if ResNet152 architecture is utilized;
- The best results are achieved if the aforementioned architecture is trained by using larger batches of data for an intermediate number of consecutive epochs by using Nadam solver; and
- It can be noticed that by utilization of transfer learning and freezing layers, higher classification performances are achieved.

## Author Contributions

## Funding

## Acknowledgments

## Conflicts of Interest

## References

- Milenković, D.A.; Dimić, D.S.; Avdović, E.H.; Marković, Z.S. Several coumarin derivatives and their Pd (II) complexes as potential inhibitors of the main protease of SARS-CoV-2, an in silico approach. RSC Adv.
**2020**, 10, 35099–35108. [Google Scholar] [CrossRef] - Spiegelhalter, D. Use of “normal” risk to improve understanding of dangers of covid-19. BMJ
**2020**, 370, m3259. [Google Scholar] [CrossRef] [PubMed] - Li, X.; Xu, S.; Yu, M.; Wang, K.; Tao, Y.; Zhou, Y.; Shi, J.; Zhou, M.; Wu, B.; Yang, Z.; et al. Risk factors for severity and mortality in adult COVID-19 inpatients in Wuhan. J. Allergy Clin. Immunol.
**2020**, 146, 110–118. [Google Scholar] [CrossRef] [PubMed] - Brindle, M.E.; Gawande, A. Managing COVID-19 in surgical systems. Ann. Surg.
**2020**. [Google Scholar] [CrossRef] - Weissman, G.E.; Crane-Droesch, A.; Chivers, C.; Luong, T.; Hanish, A.; Levy, M.Z.; Lubken, J.; Becker, M.; Draugelis, M.E.; Anesi, G.L.; et al. Locally informed simulation to predict hospital capacity needs during the COVID-19 pandemic. Ann. Intern. Med.
**2020**. [Google Scholar] [CrossRef] - Yıldırım, M.; Güler, A. COVID-19 severity, self-efficacy, knowledge, preventive behaviors, and mental health in Turkey. Death Stud.
**2020**, 1–8. [Google Scholar] [CrossRef] - Vaishya, R.; Javaid, M.; Khan, I.H.; Haleem, A. Artificial Intelligence (AI) applications for COVID-19 pandemic. Diabetes Metab. Syndr. Clin. Res. Rev.
**2020**, 14, 337–339. [Google Scholar] [CrossRef] - Zhang, K.; Liu, X.; Shen, J.; Li, Z.; Sang, Y.; Wu, X.; Zha, Y.; Liang, W.; Wang, C.; Wang, K.; et al. Clinically applicable AI system for accurate diagnosis, quantitative measurements, and prognosis of covid-19 pneumonia using computed tomography. Cell
**2020**, 181, 1423–1433.e11. [Google Scholar] [CrossRef] - Al-Turjman, F.; Zahmatkesh, H.; Mostarda, L. Quantifying uncertainty in internet of medical things and big-data services using intelligence and deep learning. IEEE Access
**2019**, 7, 115749–115759. [Google Scholar] [CrossRef] - Guo, C.; Zhang, J.; Liu, Y.; Xie, Y.; Han, Z.; Yu, J. Recursion Enhanced Random Forest With an Improved Linear Model (RERF-ILM) for Heart Disease Detection on the Internet of Medical Things Platform. IEEE Access
**2020**, 8, 59247–59256. [Google Scholar] [CrossRef] - Kayser, K.; GĂśrtler, J.; Bogovac, M.; Bogovac, A.; Goldmann, T.; Vollmer, E.; Kayser, G. AI (artificial intelligence) in histopathology—From image analysis to automated diagnosis. Folia Histochem. Cytobiol.
**2009**, 47, 355–361. [Google Scholar] [CrossRef] [PubMed][Green Version] - Raghavendra, U.; Acharya, U.R.; Adeli, H. Artificial intelligence techniques for automated diagnosis of neurological disorders. Eur. Neurol.
**2019**, 82, 41–64. [Google Scholar] [CrossRef] [PubMed] - Lorencin, I.; Anđelić, N.; Španjol, J.; Car, Z. Using multi-layer perceptron with Laplacian edge detector for bladder cancer diagnosis. Artif. Intell. Med.
**2020**, 102, 101746. [Google Scholar] [CrossRef] [PubMed] - Tan, Z.; Simkin, S.; Lai, C.; Dai, S. Deep learning algorithm for automated diagnosis of retinopathy of prematurity plus disease. Transl. Vis. Sci. Technol.
**2019**, 8, 23. [Google Scholar] [CrossRef] [PubMed][Green Version] - Bishop, C.M. Pattern Recognition and Machine Learning; Springer: Berlin, Germany, 2006. [Google Scholar]
- Hastie, T.; Tibshirani, R.; Friedman, J. The Elements of Statistical Learning: Data Mining, Inference, and Prediction; Springer Science & Business Media: Berlin, Germany, 2009. [Google Scholar]
- Luján-García, J.E.; Yáñez-Márquez, C.; Villuendas-Rey, Y.; Camacho-Nieto, O. A Transfer Learning Method for Pneumonia Classification and Visualization. Appl. Sci.
**2020**, 10, 2908. [Google Scholar] [CrossRef][Green Version] - Kieu, P.N.; Tran, H.S.; Le, T.H.; Le, T.; Nguyen, T.T. Applying multi-CNNs model for detecting abnormal problem on chest X-ray images. In Proceedings of the 2018 10th International Conference on Knowledge and Systems Engineering (KSE), Ho Chi Minh City, Vietnam, 1–3 November 2018; pp. 300–305. [Google Scholar]
- Bullock, J.; Cuesta-Lázaro, C.; Quera-Bofarull, A. XNet: A convolutional neural network (CNN) implementation for medical X-ray image segmentation suitable for small datasets. In Medical Imaging 2019: Biomedical Applications in Molecular, Structural, and Functional Imaging; International Society for Optics and Photonics: Bellingham, WA, USA, 2019; Volume 10953, p. 109531Z. [Google Scholar]
- Takemiya, R.; Kido, S.; Hirano, Y.; Mabu, S. Detection of pulmonary nodules on chest X-ray images using R-CNN. In International Forum on Medical Imaging in Asia 2019; International Society for Optics and Photonics: Bellingham, WA, USA, 2019; Volume 11050, p. 110500W. [Google Scholar]
- Stirenko, S.; Kochura, Y.; Alienin, O.; Rokovyi, O.; Gordienko, Y.; Gang, P.; Zeng, W. Chest X-ray analysis of tuberculosis by deep learning with segmentation and augmentation. In Proceedings of the 2018 IEEE 38th International Conference on Electronics and Nanotechnology (ELNANO), Kiev, Ukraine, 24–26 April 2018; pp. 422–428. [Google Scholar]
- Chouhan, V.; Singh, S.K.; Khamparia, A.; Gupta, D.; Tiwari, P.; Moreira, C.; Damaševičius, R.; De Albuquerque, V.H.C. A novel transfer learning based approach for pneumonia detection in chest X-ray images. Appl. Sci.
**2020**, 10, 559. [Google Scholar] [CrossRef][Green Version] - Rahman, T.; Chowdhury, M.E.; Khandakar, A.; Islam, K.R.; Islam, K.F.; Mahbub, Z.B.; Kadir, M.A.; Kashem, S. Transfer Learning with Deep Convolutional Neural Network (CNN) for Pneumonia Detection using Chest X-ray. Appl. Sci.
**2020**, 10, 3233. [Google Scholar] [CrossRef] - Wong, H.Y.F.; Lam, H.Y.S.; Fong, A.H.T.; Leung, S.T.; Chin, T.W.Y.; Lo, C.S.Y.; Lui, M.M.S.; Lee, J.C.Y.; Chiu, K.W.H.; Chung, T.; et al. Frequency and distribution of chest radiographic findings in COVID-19 positive patients. Radiology
**2020**, 296, 201160. [Google Scholar] [CrossRef][Green Version] - Orsi, M.A.; Oliva, G.; Toluian, T.; Pittino, C.V.; Panzeri, M.; Cellina, M. Feasibility, reproducibility, and clinical validity of a quantitative chest X-ray assessment for COVID-19. Am. J. Trop. Med. Hyg.
**2020**, 103, 822–827. [Google Scholar] [CrossRef] - Cozzi, D.; Albanesi, M.; Cavigli, E.; Moroni, C.; Bindi, A.; Luvarà, S.; Lucarini, S.; Busoni, S.; Mazzoni, L.N.; Miele, V. Chest X-ray in new Coronavirus Disease 2019 (COVID-19) infection: Findings and correlation with clinical outcome. Radiol. Med.
**2020**, 125, 730–737. [Google Scholar] [CrossRef] - Borghesi, A.; Maroldi, R. COVID-19 outbreak in Italy: Experimental chest X-ray scoring system for quantifying and monitoring disease progression. Radiol. Med.
**2020**, 125, 509–513. [Google Scholar] [CrossRef] [PubMed] - Imran, A.; Posokhova, I.; Qureshi, H.N.; Masood, U.; Riaz, S.; Ali, K.; John, C.N.; Nabeel, M. AI4COVID-19: AI enabled preliminary diagnosis for COVID-19 from cough samples via an app. arXiv
**2020**, arXiv:2004.01275. [Google Scholar] [CrossRef] [PubMed] - Bragazzi, N.L.; Dai, H.; Damiani, G.; Behzadifar, M.; Martini, M.; Wu, J. How Big Data and Artificial Intelligence Can Help Better Manage the COVID-19 Pandemic. Int. J. Environ. Res. Public Health
**2020**, 17, 3176. [Google Scholar] [CrossRef] - Mohamadou, Y.; Halidou, A.; Kapen, P.T. A review of mathematical modeling, artificial intelligence and datasets used in the study, prediction and management of COVID-19. Appl. Intell.
**2020**, 50, 3913–3925. [Google Scholar] [CrossRef] - Raza, K. Artificial intelligence against COVID-19: A meta-analysis of current research. In Big Data Analytics and Artificial Intelligence Against COVID-19: Innovation Vision and Approach; Springer: Berlin, Germany, 2020; pp. 165–176. [Google Scholar]
- Adly, A.S.; Adly, A.S.; Adly, M.S. Approaches based on artificial intelligence and the internet of intelligent things to prevent the spread of COVID-19: Scoping review. J. Med. Internet Res.
**2020**, 22, e19104. [Google Scholar] [CrossRef] - Zheng, N.; Du, S.; Wang, J.; Zhang, H.; Cui, W.; Kang, Z.; Yang, T.; Lou, B.; Chi, Y.; Long, H.; et al. Predicting covid-19 in china using hybrid AI model. IEEE Trans. Cybern.
**2020**, 50, 2891–2904. [Google Scholar] [CrossRef] - Hazarika, B.B.; Gupta, D. Modelling and forecasting of COVID-19 spread using wavelet-coupled random vector functional link networks. Appl. Soft Comput.
**2020**, 96, 106626. [Google Scholar] [CrossRef] - Car, Z.; Baressi Šegota, S.; Anđelić, N.; Lorencin, I.; Mrzljak, V. Modeling the Spread of COVID-19 Infection Using a Multilayer Perceptron. Comput. Math. Methods Med.
**2020**, 2020, 5714714. [Google Scholar] [CrossRef] - Ye, Y.; Hou, S.; Fan, Y.; Qian, Y.; Zhang, Y.; Sun, S.; Peng, Q.; Laparo, K. alpha-Satellite: An AI-driven System and Benchmark Datasets for Hierarchical Community-level Risk Assessment to Help Combat COVID-19. arXiv
**2020**, arXiv:2003.12232. [Google Scholar] - Štifanić, D.; Musulin, J.; Miočević, A.; Baressi Šegota, S.; Šubić, R.; Car, Z. Impact of COVID-19 on Forecasting Stock Prices: An Integration of Stationary Wavelet Transform and Bidirectional Long Short-Term Memory. Complexity
**2020**, 2020, 1846926. [Google Scholar] [CrossRef] - Wang, L.; Lin, Z.Q.; Wong, A. Covid-net: A tailored deep convolutional neural network design for detection of covid-19 cases from chest x-ray images. Sci. Rep.
**2020**, 10, 1–12. [Google Scholar] [CrossRef] [PubMed] - Narin, A.; Kaya, C.; Pamuk, Z. Automatic detection of coronavirus disease (covid-19) using X-ray images and deep convolutional neural networks. arXiv
**2020**, arXiv:2003.10849. [Google Scholar] - Ozturk, T.; Talo, M.; Yildirim, E.A.; Baloglu, U.B.; Yildirim, O.; Acharya, U.R. Automated detection of COVID-19 cases using deep neural networks with X-ray images. Comput. Biol. Med.
**2020**, 121, 103792. [Google Scholar] [CrossRef] [PubMed] - Abdulaal, A.; Patel, A.; Charani, E.; Denny, S.; Mughal, N.; Moore, L. Prognostic modeling of COVID-19 using artificial intelligence in the United Kingdom: Model development and validation. J. Med. Internet Res.
**2020**, 22, e20259. [Google Scholar] [CrossRef] [PubMed] - Das, N.N.; Kumar, N.; Kaur, M.; Kumar, V.; Singh, D. Automated deep transfer learning-based approach for detection of COVID-19 infection in chest X-rays. IRBM
**2020**. [Google Scholar] [CrossRef] - Rahaman, M.M.; Li, C.; Yao, Y.; Kulwa, F.; Rahman, M.A.; Wang, Q.; Qi, S.; Kong, F.; Zhu, X.; Zhao, X. Identification of COVID-19 samples from chest X-ray images using deep learning: A comparison of transfer learning approaches. J. X-ray Sci. Technol.
**2020**, 28, 821–839. [Google Scholar] [CrossRef] - Clinical Centre of Kragujevac. Available online: https://www.kc-kg.rs/ (accessed on 17 December 2020).
- Bloice, M.D.; Stocker, C.; Holzinger, A. Augmentor: An image augmentation library for machine learning. arXiv
**2017**, arXiv:1708.04680. [Google Scholar] [CrossRef] - Farda, N.A.; Lai, J.Y.; Wang, J.C.; Lee, P.Y.; Liu, J.W.; Hsieh, I.H. Sanders classification of calcaneal fractures in CT images with deep learning and differential data augmentation techniques. Injury
**2020**. [Google Scholar] [CrossRef] - Bloice, M.D.; Roth, P.M.; Holzinger, A. Biomedical image augmentation using Augmentor. Bioinformatics
**2019**, 35, 4522–4524. [Google Scholar] [CrossRef] - Agrawal, T.; Gupta, R.; Narayanan, S. On evaluating CNN representations for low resource medical image classification. In Proceedings of the ICASSP 2019—2019 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Brighton, UK, 12–17 May 2019; pp. 1363–1367. [Google Scholar]
- Lorencin, I.; Anđelić, N.; Šegota, S.B.; Musulin, J.; Štifanić, D.; Mrzljak, V.; Španjol, J.; Car, Z. Edge Detector-Based Hybrid Artificial Neural Network Models for Urinary Bladder Cancer Diagnosis. In Enabling AI Applications in Data Science; Springer: Berlin, Germany, 2020; pp. 225–245. [Google Scholar]
- Baltruschat, I.M.; Nickisch, H.; Grass, M.; Knopp, T.; Saalbach, A. Comparison of deep learning approaches for multi-label chest X-ray classification. Sci. Rep.
**2019**, 9, 1–10. [Google Scholar] [CrossRef][Green Version] - Lu, Z.; Bai, Y.; Chen, Y.; Su, C.; Lu, S.; Zhan, T.; Hong, X.; Wang, S. The Classification of Gliomas Based on a Pyramid Dilated Convolution ResNet Model. Pattern Recognit. Lett.
**2020**, 133, 173–179. [Google Scholar] [CrossRef] - Jiang, Y.; Chen, L.; Zhang, H.; Xiao, X. Breast cancer histopathological image classification using convolutional neural networks with small SE-ResNet module. PLoS ONE
**2019**, 14, e0214587. [Google Scholar] [CrossRef] [PubMed][Green Version] - Ma, Y.; Xu, X.; Yu, Q.; Zhang, Y.; Li, Y.; Zhao, J.; Wang, G. LungBRN: A Smart Digital Stethoscope for Detecting Respiratory Disease Using bi-ResNet Deep Learning Algorithm. In Proceedings of the 2019 IEEE Biomedical Circuits and Systems Conference (BioCAS), Nara, Japan, 17–19 October 2019; pp. 1–4. [Google Scholar]
- Ning, D.; Liu, G.; Jiang, R.; Wang, C. Attention-based multi-scale transfer ResNet for skull fracture image classification. In Proceedings of the Fourth International Workshop on Pattern Recognition, Nanjing, China, 28–30 June 2019; Volume 11198, p. 111980D. [Google Scholar]
- Thian, Y.L.; Li, Y.; Jagmohan, P.; Sia, D.; Chan, V.E.Y.; Tan, R.T. Convolutional neural networks for automated fracture detection and localization on wrist radiographs. Radiol. Artif. Intell.
**2019**, 1, e180001. [Google Scholar] [CrossRef] - Kingma, D.P.; Ba, J. Adam: A method for stochastic optimization. arXiv
**2014**, arXiv:1412.6980. [Google Scholar] - Yi, D.; Ahn, J.; Ji, S. An Effective Optimization Method for Machine Learning Based on ADAM. Appl. Sci.
**2020**, 10, 1073. [Google Scholar] [CrossRef][Green Version] - Kandel, I.; Castelli, M.; Popovič, A. Comparative Study of First Order Optimizers for Image Classification Using Convolutional Neural Networks on Histopathology Images. J. Imaging
**2020**, 6, 92. [Google Scholar] [CrossRef] - Dogo, E.; Afolabi, O.; Nwulu, N.; Twala, B.; Aigbavboa, C. A comparative analysis of gradient descent-based optimization algorithms on convolutional neural networks. In Proceedings of the 2018 International Conference on Computational Techniques, Electronics and Mechanical Systems (CTEMS), Belgaum, India, 21–22 December 2018; pp. 92–99. [Google Scholar]
- Krizhevsky, A.; Sutskever, I.; Hinton, G.E. Imagenet classification with deep convolutional neural networks. Commun. ACM
**2017**, 60, 84–90. [Google Scholar] [CrossRef] - Ballester, P.; Araujo, R.M. On the performance of GoogLeNet and AlexNet applied to sketches. In Proceedings of the Thirtieth AAAI Conference on Artificial Intelligence, Phoenix, AZ, USA, 12–17 February 2016. [Google Scholar]
- Yan, L.; Yoshua, B.; Geoffrey, H. Deep learning. Nature
**2015**, 521, 436–444. [Google Scholar] - Simonyan, K.; Zisserman, A. Very deep convolutional networks for large-scale image recognition. arXiv
**2014**, arXiv:1409.1556. [Google Scholar] - Qassim, H.; Verma, A.; Feinzimer, D. Compressed residual-VGG16 CNN model for big data places image recognition. In Proceedings of the 2018 IEEE 8th Annual Computing and Communication Workshop and Conference (CCWC), Las Vegas, NV, USA, 8–10 January 2018; pp. 169–175. [Google Scholar]
- Canziani, A.; Paszke, A.; Culurciello, E. An analysis of deep neural network models for practical applications. arXiv
**2016**, arXiv:1605.07678. [Google Scholar] - Mhapsekar, M.; Mhapsekar, P.; Mhatre, A.; Sawant, V. Implementation of Residual Network (ResNet) for Devanagari Handwritten Character Recognition. In Advanced Computing Technologies and Applications; Springer: Berlin, Germany, 2020; pp. 137–148. [Google Scholar]
- He, K.; Zhang, X.; Ren, S.; Sun, J. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 27–30 June 2016; pp. 770–778. [Google Scholar]
- He, K.; Zhang, X.; Ren, S.; Sun, J. Identity mappings in deep residual networks. In European Conference on Computer Vision; Springer: Berlin, Germany, 2016; pp. 630–645. [Google Scholar]
- Chu, Y.; Yue, X.; Yu, L.; Sergei, M.; Wang, Z. Automatic Image Captioning Based on ResNet50 and LSTM with Soft Attention. Wirel. Commun. Mob. Comput.
**2020**, 2020, 8909458. [Google Scholar] [CrossRef] - Ghosal, P.; Nandanwar, L.; Kanchan, S.; Bhadra, A.; Chakraborty, J.; Nandi, D. Brain tumor classification using ResNet-101 based squeeze and excitation deep neural network. In Proceedings of the 2019 Second International Conference on Advanced Computational and Communication Paradigms (ICACCP), Gangtok, India, 25–28 February 2019; pp. 1–6. [Google Scholar]
- Khan, R.U.; Zhang, X.; Kumar, R.; Aboagye, E.O. Evaluating the performance of resnet model based on image recognition. In Proceedings of the 2018 International Conference on Computing and Artificial Intelligence, Chengdu, China, 12–14 March 2018; pp. 86–90. [Google Scholar]
- Kandel, I.; Castelli, M. The effect of batch size on the generalizability of the convolutional neural networks on a histopathology dataset. ICT Express
**2020**. [Google Scholar] [CrossRef]

**Figure 1.**Examples of X-ray images contained in the dataset: (

**a**) A mild clinical picture; (

**b**) moderate clinical picture; (

**c**) severe clinical picture; and (

**d**) critical clinical picture.

**Figure 3.**Overview of image augmentation procedure ((

**a**): original image; (

**b**): image rotated for 90 degrees around sagittal axis; (

**c**): image rotated for 180 degrees around sagittal axis; (

**d**): image rotated for 270 degrees around sagittal axis; (

**e**): image rotated for 180 degree around longitudal axis; (

**f**): image rotated for 180 degree around longitudal axis and rotated for 180 degree around sagittal axis; (

**g**): image rotated for 180 degree around longitudal axis and rotated for 180 degree around sagittal axis; (

**h**): image rotated for 180 degree around longitudal axis and rotated for 270 degree around sagittal axis; (

**i**): image with pixels multiplied by a factor 0.8; (

**j**): image with pixels multiplied by a factor 0.9; (

**k**): image with pixels multiplied by a factor 1.1; (

**l**): image with pixels multiplied by a factor 1.2).

**Figure 4.**Representation of augmented dataset ((

**a**): class distribution; (

**b**): training-validation-testing division).

**Figure 8.**The change of maximal $\overline{AU{C}_{macro}}$ in dependence of the number of epochs for AlexNet.

**Figure 9.**The change of maximal $\overline{AU{C}_{micro}}$ in dependence of the number of epochs for AlexNet.

**Figure 10.**The change of maximal $\overline{AU{C}_{macro}}$ in dependence of batch size for AlexNet.

**Figure 11.**The change of maximal $\overline{AU{C}_{micro}}$ in dependence of batch size for AlexNet.

**Figure 12.**The change of maximal $\overline{AU{C}_{macro}}$ in dependence of number of epochs for VGG-16.

**Figure 13.**The change of maximal $\overline{AU{C}_{micro}}$ in dependence of number of epochs for VGG-16.

**Figure 16.**The change of maximal $\overline{AU{C}_{macro}}$ in dependence of number of epochs for ResNet50.

**Figure 17.**The change of maximal $\overline{AU{C}_{micro}}$ in dependence of the number of epochs for ResNet50.

**Figure 18.**The change of maximal $\overline{AU{C}_{macro}}$ in dependence of batch size for ResNet50.

**Figure 19.**The change of maximal $\overline{AU{C}_{micro}}$ in dependence of batch size for ResNet50.

**Figure 20.**The change of maximal $\overline{AU{C}_{macro}}$ in dependence of number of epochs for ResNet101.

**Figure 21.**The change of maximal $\overline{AU{C}_{micro}}$ in dependence of number of epochs for ResNet101.

**Figure 22.**The change of maximal $\overline{AU{C}_{macro}}$ in dependence of batch size for ResNet101.

**Figure 23.**The change of maximal $\overline{AU{C}_{micro}}$ in dependence of batch size for ResNet101.

**Figure 24.**The change of maximal $\overline{AU{C}_{macro}}$ in dependence of number of epochs for ResNet152.

**Figure 25.**The change of maximal $\overline{AU{C}_{micro}}$ in dependence of number of epochs for ResNet152.

**Figure 26.**The change of maximal $\overline{AU{C}_{macro}}$ in dependence of batch size for ResNet152.

**Figure 27.**The change of maximal $\overline{AU{C}_{micro}}$ in dependence of batch size for ResNet152.

**Figure 28.**Comparison of highest $\overline{AU{C}_{macro}}$ and $\overline{AU{C}_{micro}}$ achieved with every CNN architecture.

**Figure 29.**Comparison of highest $\overline{AU{C}_{macro}}$ and $\overline{AU{C}_{micro}}$ achieved with every CNN architecture and freezing layers.

Number of Epochs | Solver | Batch Size |
---|---|---|

1 | Adam [56] | 2 |

5 | Adamax [57] | 4 |

10 | Nadam [58] | 8 |

25 | - | 16 |

50 | - | - |

75 | - | - |

100 | - | - |

125 | - | - |

150 | - | - |

175 | - | - |

200 | - | - |

Solver | $\mathit{\eta}$ | ${\mathit{\beta}}_{1}$ | ${\mathit{\beta}}_{2}$ | $\mathit{\u03f5}$ |
---|---|---|---|---|

Adam | 0.001 | 0.9 | 0.99 | $1\times {10}^{-8}$ |

Adamax | 0.02 | 0.9 | 0.999 | $1\times {10}^{-7}$ |

Nadam | 0.001 | 0.9 | 0.999 | $1\times {10}^{-7}$ |

**Table 3.**Description of AlexNet architecture (C—convolutional layer, P—Max pooling, FC—fully connected).

Layer | Type | Feature Map | Size | Kernel Size | Stride | Activation Function |
---|---|---|---|---|---|---|

Input | Image | 1 | $227\times 227\times 1$ | - | - | - |

1 | C | 96 | $55\times 55\times 96$ | $11\times 11$ | 4 | ReLU |

P | 96 | $27\times 27\times 96$ | $3\times 3$ | 2 | - | |

2 | C | 256 | $27\times 27\times 256$ | $5\times 5$ | 1 | ReLU |

P | 256 | $13\times 13\times 256$ | $3\times 3$ | 2 | - | |

3 | C | 384 | $13\times 13\times 384$ | $3\times 3$ | 1 | ReLU |

4 | C | 384 | $13\times 13\times 384$ | $3\times 3$ | 1 | ReLU |

5 | C | 256 | $13\times 13\times 256$ | $3\times 3$ | 1 | ReLU |

P | 256 | $6\times 6\times 256$ | $3\times 3$ | 2 | - | |

6 | FC | - | 9216 | - | - | ReLU |

7 | FC | - | 4096 | - | - | ReLU |

8 | FC | - | 4096 | - | - | ReLU |

Output | FC | - | 4 | - | - | Softmax |

**Table 4.**Description of VGG 16 architecture (C—convolutional layer, P—Max pooling, FC—fully connected).

Layer | Type | Feature Map | Size | Kernel Size | Stride | Activation Function |
---|---|---|---|---|---|---|

Input | Image | 1 | $224\times 224\times 1$ | - | - | - |

1 | $2\times C$ | 96 | $224\times 224\times 64$ | $3\times 3$ | 1 | ReLU |

P | 64 | $112\times 112\times 64$ | $3\times 3$ | 2 | - | |

3 | $2\times C$ | 128 | $112\times 112\times 128$ | $3\times 3$ | 1 | ReLU |

P | 256 | $56\times 56\times 128$ | $3\times 3$ | 2 | - | |

5 | $2\times C$ | 256 | $56\times 56\times 256$ | $3\times 3$ | 1 | ReLU |

P | 384 | $28\times 28\times 256$ | $3\times 3$ | 2 | ReLU | |

7 | $3\times C$ | 512 | $28\times 28\times 512$ | $3\times 3$ | 1 | ReLU |

P | 256 | $14\times 14\times 512$ | $3\times 3$ | 2 | - | |

10 | $3\times C$ | 512 | $14\times 14\times 512$ | $3\times 3$ | 1 | ReLU |

P | 512 | $7\times 7\times 512$ | $3\times 3$ | 2 | - | |

13 | FC | - | 25,088 | - | - | ReLU |

14 | FC | - | 4096 | - | - | ReLU |

15 | FC | - | 4096 | - | - | ReLU |

Output | FC | - | 4 | - | - | Softmax |

**Table 5.**Overview of configurations that achieved highest $\overline{AU{C}_{macro}}$ for all CNN architectures.

Network | Number of Epochs | Batch Size | Solver |
---|---|---|---|

AlexNet | 50 | 4 | AdaMax |

VGG-16 | 50 | 4 | AdaMax |

ResNet50 | 100 | 16 | AdaMax |

ResNet101 | 50 | 16 | Nadam |

ResNet152 | 125 | 16 | Nadam |

**Table 6.**Overview of configurations that achieved highest $\overline{AU{C}_{micro}}$ for all CNN architectures.

Network | Number of Epochs | Batch Size | Solver |
---|---|---|---|

AlexNet | 50 | 4 | AdaMax |

VGG-16 | 50 | 4 | AdaMax |

ResNet50 | 100 | 16 | AdaMax |

ResNet101 | 100 | 16 | Nadam |

ResNet152 | 100 | 16 | Nadam |

**Table 7.**Representation of distribution of frozen and unfrozen layers with classification performances.

Network | Frozen Layers | Unfrozen Layers |
---|---|---|

AlexNet | 1–5 | 6–9 |

VGG-16 | 1–12 | 13–16 |

ResNet50 | 1–42 | 43–50 |

ResNet101 | 1–92 | 93–101 |

ResNet152 | 1–139 | 140–152 |

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Lorencin, I.; Baressi Šegota, S.; Anđelić, N.; Blagojević, A.; Šušteršić, T.; Protić, A.; Arsenijević, M.; Ćabov, T.; Filipović, N.; Car, Z. Automatic Evaluation of the Lung Condition of COVID-19 Patients Using X-ray Images and Convolutional Neural Networks. *J. Pers. Med.* **2021**, *11*, 28.
https://doi.org/10.3390/jpm11010028

**AMA Style**

Lorencin I, Baressi Šegota S, Anđelić N, Blagojević A, Šušteršić T, Protić A, Arsenijević M, Ćabov T, Filipović N, Car Z. Automatic Evaluation of the Lung Condition of COVID-19 Patients Using X-ray Images and Convolutional Neural Networks. *Journal of Personalized Medicine*. 2021; 11(1):28.
https://doi.org/10.3390/jpm11010028

**Chicago/Turabian Style**

Lorencin, Ivan, Sandi Baressi Šegota, Nikola Anđelić, Anđela Blagojević, Tijana Šušteršić, Alen Protić, Miloš Arsenijević, Tomislav Ćabov, Nenad Filipović, and Zlatan Car. 2021. "Automatic Evaluation of the Lung Condition of COVID-19 Patients Using X-ray Images and Convolutional Neural Networks" *Journal of Personalized Medicine* 11, no. 1: 28.
https://doi.org/10.3390/jpm11010028