key: cord-0629095-ctmsc70y authors: Narin, Ali; Pamuk, Ziynet title: Effect of Different Batch Size Parameters on Predicting of COVID19 Cases date: 2020-12-10 journal: nan DOI: nan sha: 1ae4aea2c077534bdebe1d38680f736556bdc125 doc_id: 629095 cord_uid: ctmsc70y The new coronavirus 2019, also known as COVID19, is a very serious epidemic that has killed thousands or even millions of people since December 2019. It was defined as a pandemic by the world health organization in March 2020. It is stated that this virus is usually transmitted by droplets caused by sneezing or coughing, or by touching infected surfaces. The presence of the virus is detected by real-time reverse transcriptase polymerase chain reaction (rRT-PCR) tests with the help of a swab taken from the nose or throat. In addition, X-ray and CT imaging methods are also used to support this method. Since it is known that the accuracy sensitivity in rRT-PCR test is low, auxiliary diagnostic methods have a very important place. Computer-aided diagnosis and detection systems are developed especially with the help of X-ray and CT images. Studies on the detection of COVID19 in the literature are increasing day by day. In this study, the effect of different batch size (BH=3, 10, 20, 30, 40, and 50) parameter values on their performance in detecting COVID19 and other classes was investigated using data belonging to 4 different (Viral Pneumonia, COVID19, Normal, Bacterial Pneumonia) classes. The study was carried out using a pre-trained ResNet50 convolutional neural network. According to the obtained results, they performed closely on the training and test data. However, it was observed that the steady state in the test data was delayed as the batch size value increased. The highest COVID19 detection was 95.17% for BH = 3, while the overall accuracy value was 97.97% with BH = 20. According to the findings, it can be said that the batch size value does not affect the overall performance significantly, but the increase in the batch size value delays obtaining stable results. Epidemic and seasonal flu infections cause severe pneumonia and high mortality rates [1] . Pneumonia is an inflammation of the lung tissue [2] , [3] . Thus, human breathing becomes painful and oxygen intake decreases. Pneumonia occurs due to viruses, bacteria, and fungi [4] . Nowadays the whole world is struggling with the COVID19 epidemic. Deaths from pneumonia developing due to the SARS-COV-2 virus are increasing day by day. The vast majority (99%) of people suffering from COVID19 epidemic disease have mild symptoms [5] . Although the remaining 1% seems small, it actually refers to millions of people. These people suffer from pneumonia caused by SARS-COV-2. Pandemic captured elderly, obese, pregnant women or people with chronic diseases should be admitted in the intensive care unit of the hospital. Mortality rates of these patients are high [1] . According to the World Health Organization's 2019 report, pneumonia ranks first among infectionrelated deaths worldwide [6] . The most important method of diagnosis of pneumonia worldwide is chest X-ray [7] . Doctors make a diagnosis by looking at a chest X-ray. However, doctors deal with many patients and work long hours in disasters such as epidemics. At the same time, healthcare workers have a very high risk of getting sick. For such reasons, engineers working with artificial intelligence work on decision support systems to facilitate the work of doctors. In recent years, Deep Learning (DL) technique has been able to diagnose diseases (e.g. lung disease, metastasis detection for breast cancer, skin lesion classification, diabetic retinopathy, attention deficit hyperactivity disorder) just like specialist physicians [8] . DL is one of the most successful artificial intelligence techniques and is an effective tool to help radiologists analyze [9] . There is interest in using convolutional neural networks (CNNs) to analyze medical imaging to provide computeraided diagnosis (CAD) [10] . CNNs are one of the powerful deep learning architectures. CNN is intuitively widely used in many practical applications such as pattern recognition and image classification [11] . CAD systems based on deep learning and medical imaging are becoming more and more research centers [12] . Verma and others suggest a CNN model prepared without any preparation to group and identify the occurrence of pneumonia disease from a particular chest X-ray image test product line [4] . Gusztáv Gaál and colleagues provide a new approach to deep learning to diagnose pneumonia, lung segmentation, a basic but challenging task. In this system, state-of-the-art fully CNNs are used together with a competing critic model [13] . In the study of Ilyas Sirazitdinov, he explores opportunities to apply machine learning solutions for the automatic detection and localization of pneumonia in chest X-ray images. RetinaNet and Mask R-CNN are recommended for the detection and localization of pneumonia [2] . Wesley O'Quinn and his friends have detected pneumonia using chest X-rays and AlexNet transfer network in deep learning [14] . Stephan and others proposed a CNN model trained from scratch to classify the presence of pneumonia from chest Xray images [15] . Sreeja and others used the neural network classification model in Keras to classify Normal and Pneumonia using lung X-ray data [16] . Longjiang and others evaluate the effectiveness of the deep learning model in segmenting arXiv:2012.05534v1 [eess.IV] 10 Dec 2020 the lung and thorax regions on pediatric chest X-rays (CXR) [17] . For the diagnosis of pneumonia, M.Togaçar and others use existing CNNs, which are AlexNet, VGG16 and VGG19 [18] . Apostopolus and others performed a common pneumonia, COVID19-induced pneumonia, and an evolutionary neural network for healthy differentiation for automatic detection of COVID19. In particular, the procedure called transfer learning has been adopted. With transfer learning, the detection of various abnormalities in small medical image datasets is an achievable goal, often with remarkable results [19] . Based on chest X-ray images, Zhang and others aim to develop a deep learning-based model that can detect COVID19 with high sensitivity, providing fast and reliable scanning [9] . Ghoshal and Tucker used the dropweights-based Bayesian CNNs model using chest X-ray images for diagnosis of COVID19 [8] . Hemdan and others used VGG19 and DenseNet models to diagnose COVID19 from X-ray images [11] . Apostopolus and others performed automatic detection from X-ray images using CNNs with Transfer Learning [20] . In another study, Apostopolus used the latest technology CNN called MobileNet and used 7 classes [19] . Sethy and Behera proposed a methodology based on Deep Learning to detect a patient infected with coronavirus using X-ray images. In addition to the ResNet50 method, they also worked on the SVM model [21] . In our first study in the diagnosis of pneumonia developed due to COVID19, we classified the chest x-ray images using CNN-based ResNet50, InceptionV3 and Inception-ResNetV2 models. As a result of this study, ResNet50 model achieved the highest performance with 98% classification performance [22] . Based on the results obtained from this study, the effects of the different bacthsize hyper-parameter on the performance of the COVID19 cases were examined. For this, pre-trained ResNet50 model and X-ray images in 4 classes (COVID19, Normal, Viral Pneumonia, Bacterial Pneumonia) were used. The flow chart of the proposed study is given in Figure 1 . Two different databases were used to obtain X-ray images. There are four different classification processes on X-Ray images. Of these, 219 images for COVID19 positive, 1341 images for normal and 1345 images for viral pneumonia were obtained from radiography-database images on Kaggle page [23] . In addition to these data, 1350 X-ray images, which are pneumonia from bacteria, were also obtained from a different database on the Kaggle page [24] . Normal, COVID19, Bacterial pneumonia and Viral pneumonia chest X-ray images are given in the Figure 2 . CNN is a machine learning model. CNN differs from other neural network models by direct processing of data to produce results [25] , [26] and is widely used in medical images because it can impress image processing for classification, detection and segmentation [27] . A standard CNN model usually includes convolution, pooling, and fully connected layers. The properties are obtained by the convolution layer with activation function. The pooling layer reduces the number of features and model parameters that reduce the number of calculations. In particular, the Relu activation function is used on the Fully Connected Layer, and the SoftMax activation function is added to the end of this layer and provides a categorical probability distribution output using CNN output. The performances of deep learning models vary according to the hyper-parameters used. In order for the model to exhibit high performance, values such as data number, batch size value, learning rate, optimization algorithms, Epoch amount, activation functions, kernel size should be determined appropriately. In this study, the effect of bathsize parameters, which means how many data will be processed at the same time, will be examined. Kaiming He proposed Residual neural network (ResNet) in 2015 [28] . The hypothesis behind ResNet is that deeper networks are more difficult to optimize. Because the deeper model should be able to perform as well as the shallower model by copying the learned parameters from the shallow model and adjusting the additional layers to identity mapping. More specifically, every residual block has two 3x3 convolutional layers. Periodically, the number of filters are doubled and spatial downsampling is operated. Predictive performances of classes are determined by four different measurements. The metrics are: where TP is the number of correctly classified positive subjects, FN is the number of misclassified positive subjects as negative, TN is the number of correctly classified negative subjects, and FP is the number of misclassified negative subjects as positive. Tensorflow-keras libraries supported by Python programming language were used for the training of the deep learning model. Original images have been resized and converted to 224x224. No other pre-processing was applied to the images. In updating the model weights, the ADAM algorithm, the Epoch number as 30 and the Learning rate as 0.0001 were determined. In addition to the direct transfer of the weights of the ResNet50 model, the model was trained with 3 layers added to the end of the model. Training and test performance of six different batch size (3, 10, 20, 30, 40, 50) values are given in Figure 3 and Figure 4 . As can be seen from Figure 3 , It is seen that the model exhibits an training performance over 99% according to all BH parameters. In the zoomed graph, it is seen that low BH values get slightly lower. Considering Figure 4 , it can be said that low GH values reach a stable result at low epoch (rapidly) values. As the BH value increases, the time to reach stability increases. This means that more epoch values may be needed. When we compare these results with the general performance values given in Table 1 , the fact that the BH value is not too small and not too large makes the performance values higher. The highest COVID19 detection was 95.17% for BH = 3 and the highest overall performance value and F1 score value were obtained for BH = 20. Influenza Aassociated severe pneumonia in hospitalized patients: Risk factors and NAI treatments Deep neural network ensemble for pneumonia localization from a largescale chest x-ray database Early diagnosis of pneumonia with deep learning Pneumonia classification using deep learning in healthcare Identifying pneumonia in chest x-rays: A deep learning approach Estimating uncertainty and interpretability in deep learning for coronavirus (covid-19) detection Covid-19 screening on chest x-ray images using deep learning based anomaly detection Variable generalization performance of a deep learning model to detect pneumonia in chest radiographs: A cross-sectional study COVIDX-Net: A framework of deep learning classifiers to diagnose covid-19 in x-ray images A transfer learning method with deep residual network for pediatric pneumonia diagnosis Attention u-net based adversarial architectures for chest x-ray lung segmentation Pneumonia radiograph diagnosis utilizing deep learning network An efficient deep learning approach to pneumonia classification in healthcare Chest x-ray pneumonia prediction using machine learning algorithms Using deep-learning techniques for pulmonary-thoracic segmentations and improvement of pneumonia diagnosis in pediatric chest radiographs A deep feature learning model for pneumonia detection applying a combination of mrmr feature selection and machine learning models Extracting possibly representative COVID-19 biomarkers from x-ray images with deep learning approach and image data related to pulmonary diseases Covid-19: automatic detection from x-ray images utilizing transfer learning with convolutional neural networks Detection of coronavirus disease (covid-19) based on deep features Automatic Detection of Coronavirus Disease (COVID-19) Using X-ray Images and Deep Convolutional Neural Networks Can AI help in screening viral and covid-19 pneumonia? Deep convolutional neural network for the automated detection and diagnosis of seizure using EEG signals Detection of focal and non-focal epileptic seizure using continuous wavelet transform-based scalogram images and pre-trained deep neural networks A new image classification method using CNN transfer learning and web data augmentation Deep residual learning for image recognition