1 Introduction

In December 2019, a pandemic situation raised due to coronavirus (COVID-19) started in place Wuhan, China. Till July-2021, it is not understood completely about COVID-19, and more than 152,534,452 confirmed cases found worldwide according to the World Health Organization (WHO) [24]. The virus Severe Acute Respiratory Syndrome Coronavirus-2 causes the pandemic COVID-19 syndrome (SARS-COV-2).

COVID-19, that has now spread over the world, is believed to have started in a seafood market in Wuhan, where live animals such as frogs, bats, snakes, snails, birds, pigs, and dogs are frequently wholesaled. After examining the COVID-19 genetic structure, it was determined that the sick person may have visited a seafood market in Wuhan City or touched infected birds or animals. In contrast, later surveys revealed that a few cases of people becoming infected even though they had not visited the city of Wuhan. As a result of this investigation, it was determined that the COVID-19-causing virus was capable of community transmission via a human. This new virus is spread from person to person by intimate contact with an infected person or through exposure to respiratory droplets emitted by an infected person during respiratory secretions. This type of infected person’s respiratory droplets can enter a healthy human’s respiratory system through the nasopharynx during breathing. The virus can survive for at least three hours in the air and up to 72 hours on glass and stainless-steel objects.

The disease Pneumonia is also caused by the illness of the respiratory system. There are lots of moderate symptoms like fever, hard breathing, coughing, chest pain which are common to both pneumonia and COVID-19. To stop the spread of this epidemic, early diagnosis of COVID 19 is a key factor for the researchers who are working in this domain. COVID-19 patients are diagnosed via reverse transcriptase-polymerase chain reaction (RT-PCR) testing through nasopharyngeal or oropharyngeal swabs but it takes more time, expensive, and also tedious.

It’s a challenge for the researcher to create an Artificial Intelligence (AI) or Deep Learning (DL) model to assist physicians, so that they will provide better treatment. In a recent paper [3] have used some pre-trained networks such as MobileNet V2, Visual Geometry Group (VGG-19) along with transfer learning for COVID-19 detection on two data-sets. According to the simulation results, the average performance of the VGG-16 model is superior to the MobileNet V2 model for two-class classification. In paper [32], the authors have proposed that CXR photographs be used to diagnose COVID-19 patients instead of computed tomography (CT) scans and magnetic resonance imaging (MRI) [31]. In the last 10 years, DL has obtained a special position in the area of AI for the application of chest X-ray image classification to achieve accurate results [15, 42].

The rest of the paper is organized as follows; Section 2 detailed explanation on CXR image classification in literature review. Section 3, describes the existing methodology associated with the CXR image classification. Concise presentation of the proposed hybrid method is explained in Section 4. Section 5 provides the simulation-based experimental results, discussion, and different analyses. Finally, the conclusion and future scope is discussed in Section 6.

2 Literature survey

Recently, CNNs have obtained popularity in image-based implementation which requires image pre-processing before deploying them to the network [4]. As compared to traditional Machine Learning (ML) classifiers, CNN produced superior accuracy for CXR images. The CNNs consist of both feature extraction and classification phases in one system. There are several DL pre-trained models with distinct architecture that were trained for image classification and recognition which are publicly available to all the researchers [18, 33, 34, 45]. The different state-of-the-art pre-trained models of DL are VGG-16, VGG-19 [33], ResNet50 (Residual Neural Network with 50 deep layer) [18], INV3 (Inception) [34], MobileNet and DenceNet121 [45].

Researchers are attempting to develop low-cost and quick Computer-Aided Diagnosis (CAD) procedures for CXR [21, 25, 46], CT [22, 35], and so on. But the WHO has motivated individuals to do chest imaging for those having mild symptoms of COVID-19. The crucial obstacle in COVID-19 detection in CXR-based technique is a large number of training parameters needed in existing DL-based models which produces more computation load and over-fitting issues due to limited availability of COVID-19 CXR images.

In paper [43], the authors have applied Support Vector Machine (SVM), VGG-16, and InceptionV3 models in the pneumonia dataset which is divided into three categories: normal, bacterial, and viral pneumonia for classification of algorithms, and reported 96.6% as the best classification accuracy. The other studies like, [19, 20, 29, 40], the author have developed a CNN model with convolution layers, dense blocks, and flatten layers for classification of pneumonia data using the sigmoid function and discovered a success rate of 93.73% in pneumonia using X-ray images. Adam optimizer has been used for optimizing CNN hyper-parameters on ImageNet [16] where epochs vary from 10 to 100 and batch size varies from 8 to 128. In a recent communication, [3] suggested some state-of-the-art CNN networks [8, 9, 11] utilizing the transfer learning techniques to identify COVID-19 and obtained an accuracy of 96.78% in MobileNet architecture which was superior to others. A DarkCOVIDNet model was proposed in [28] by using binary classification (COVID-19 positive, COVID-19 negative) and trinary classification (COVID-19 positive, COVID-19 negative and Pneumonia) and from the simulation study, they found that higher accuracy has been achieved by two classes dataset over three classes.

In another article, CoroNet is a model proposed by the authors [36] for the classification of four classes (COVID-19 vs. bacterial pneumonia vs. viral pneumonia vs. normal) and three classes (COVID vs. pneumonia vs. normal) and observed accuracy of 89.6% and 94% respectively. Despite the fact that the CNN model produces good results for COVID-19 identification and classification, still a lot of hyper-parameters need to be optimized for better improvement [30]. There are several hyper-parameters are associated with the CNN network such as; kernel dimension, network depth, pooling size, stride size, etc. which have a substantial impact on the different performance statistics. Therefore, optimization techniques are needed for finding near-optimal values of those hyper-parameters. Some recent publications have also attempted to use optimization approaches for hyper-parameter selection.To further increase the CNN model’s accuracy, [39] have proposed a hybrid model called deep BayesSqueezeNet which uses Bayesian optimization in CNN to tune the hyper-parameter and obtained an accuracy of 98.3% in three classes dataset (Normal, COVID-19, and Pneumonia). The author proposed an optimized CNN model [17] called Optconet using 2700 images and obtained a precision score of 92.8%. In another study [2] have been proposed a Mobilenet CNN model using extricated features. The research article [27], suggested using three predefined CNN models such as; IN-V3, IN-ResNet V2, and ResNet-50 for the classification of the CXR image dataset as COVID-19 or Normal. Minaee et al. [26] employed a transfer learning technique in a recent work in four CNN models namely ResNet18, ResNet50, SqueezeNet, and DenseNet121 for the binary classification (COVID-19 positive and NON-COVID-19 negative).

So far, there is no work which optimizes every hyper-parameter in designing a CNN architecture. In 2012 [10], have created a CNN model with five convolution layers(CL) and three fully-connected layers(FCL) to train the ImageNet dataset and achieved good results. Several researchers have altered the architecture of the AlexNet, resulting in enhanced accuracy. The author [13] has improved the accuracy by reducing the filter dimension from 11x11 to 7x7 and the stride from 4 to 2 in the AlexNet model’s first layer. In another study, [7] have used 19 layers with (3×3) kernel dimension in every convolutional layer to further enhance the accuracy and it was discovered that the depth of the CNN model plays a significant impact in getting higher performance. But the some of the authors have also proved that adding too many layers leads to an increase in training and testing errors [12, 23]. Till now, there is no direct formula for selecting proper hyper-parameters. So, repeating the trial-and-error method is ineffective and time-consuming for bigger data sets [44].

Hence, the optimization algorithm plays a vital role in choosing the proper value of the hyper-parameter of the CNN model. Grid search is a common method for hyper-parameter optimization of CNN but it is comprehensive because it attempts to combine all possible hyper-parameters. Recently, random search [5] produced better results than a grid search. In recent work, the authors have used Bayesian optimization (BO) [37] to optimize nine hyper-parameters such as epochs, learning rate, weights of CNN, and parameters of contrast normalization of a CNN model.The authors of [44] have employed genetic algorithms to improve two parameters (filter dimension and feature map of convolution layer) of a CNN network and obtained 75% accuracy on CIFER 10 data-sets.

In this research, an attempt has been made to design an efficient classifier for CXR dataset to automate the detection of COVID-19. To enhance the performance of the CNN architecture, a CNN-based optimized hybrid model with an appropriate layer is proposed for fine-tuning the model’s parameters using bio-inspired optimization techniques.

3 Materials and methods

The methodology comprises three sub-stages. (a) Controlling over-fitting with stratified k-fold cross-validation; (b) Design of CNN classifier and; (c) Employ PSO, Jaya, and HCA to adjust the parameters of CNN.

3.1 k-fold cross-validation

The k-fold cross-validation method is used to prevent over-fitting. The complete dataset is randomly divided into k-fold partitions , one of which is necessary for testing while the remaining folds are used for training. Finally, the average error produced among all sets is computed. This procedure is repeated unless all data folds have been tested.

3.2 CNN methodology

CNN model was developed by a French computer scientist Yann Andre Lecun and his team in 1998 using the field of computer vision and machine learning. The CNN-based model is extensively utilized in the medical image classification job. Hugh number of public image data-sets such as ImageNet [14], Places [6] are required for the training of non-pre-trained DL models. CNN consists of two parts: (a) feature extraction (b) classification.

Feature extraction comprises CL and pooling layer (PL). The weights and biases of CL and FCL have been tuned by stochastic gradient descent (SGD) algorithm which minimizes the cost function through the backward direction. Through the ReLU activation function, the extracted features are mapped into a new feature space. Between CL and ReLU, the batch normalisation layer (BNL) is used to normalize the gradients and activation function.However max pooling is superior to others due to its faster convergence rate and well generalization [38]. FCL is the final layer of the CNN model, and it classifies the extracted visual feature into a specific class. Figure 1 exhibits a general architecture of a CNN with CL, PL, FCL, and output layer.

Fig. 1
figure 1

Block diagram of CNN

If the input size is (a × a), kernel dimension (b × b), and stride (c), then the size of the feature matrix (FM)(f ) is computed as per (1).

$$ f=\lfloor \frac{a-b}{c} \rfloor + 1 $$
(1)

If the PL splits the input to small blocks of pixels of size (d × d), then the pooling layer’s output size (p) is calculated using (2).

$$ p=\lfloor \frac {f}{d} \rfloor + 1 $$
(2)

In this work, two parameters of the CNN model have been optimized such as; filter dimension and the total number of neurons in the first dense layer by HCA optimization techniques while other parameters have been fixed.

3.3 PSO, Jaya and hill climbing algorithm

PSO (Particle Swarm Optimization) is developed by Eberhart and Kennedy which uses the social behavior of bird’s flock. Lots of particle makes a swarm and each particle moves in the solution space. Each particle represents a feasible solution in solution space. Due to its faster convergence, it is considered a promising optimization technique.

JAYA algorithm is a recent population-based algorithm which is proposed by Rao in 2016. Due to its impressive characteristics and simplicity, it is easy to use. In its initial search, there is no derivative information. It has only two parameters such as; population size and iteration numbers.

In this work, a new optimization algorithm has been used known as hill climbing which provides optimized results. It is a local search optimization technique that explores the superior solution among neighborhoods after evaluating the present state. It updates the current state until reaches the goal state.

4 Proposed CNN-HCA methodology

This section describes the design of the proposed hybrid classifier. Figure 2 represents the overall structure of our proposed hybrid model “CNN-HCA” which classifies a CXR image into either “COVID-19”, or “pneumonia”.

Fig. 2
figure 2

COVID-19 CXR image classification block diagram of the proposed hybrid model “CNN-HCA”

4.1 Phase 1 (data preparation)

To balance the dataset, 50% of images have been taken for both positive category (110 images) and negative category (110 images) respectively. The balanced dataset has been divided into two phases such as; Training (80%) and Testing (20%). Prior to applying the training and testing phases, several data augmentation techniques such as horizontal and vertical flip, zooming, width shift range, rotation and width height were already applied in the dataset. Due to variation in dimension of CXR images, all were resizing to 224 × 224.

4.2 Phase 2 (selection of hyper-parameters)

To create a new CNN classifier, minor changes of some hyper-parameters is required. For optimization, two hyper-parameters have considered in this work: filter size and the total number of neurons in the first dense layer.

4.3 Phase 3 (learning phase)

For feature extraction, the original existing CNN model is replaced with a new one which consists of 9 layers such as; three CL, three max-pooling layers, one flatten layer, and two dense layers. HCA determines the total number of neurons in the first dense layer and appropriate filter size which uses the RELU activation function. The new classifier learns for 20 epochs before beginning the fine-tuning procedure.

4.4 Design of CNN model

Convolution, relu, dropout, pooling, and dense layers are one of the layers in the CNN model. Each layer is significant in its own right. Despite the fact that CNNs have shown promise in a variety of classification issues, determining the appropriate CNN configuration for a certain application is far from basic. The presented configurations of CNN in the literature are largely based on trial and error or are influenced by previous relevant studies. The initial CNN structure is developed in our situation by referring to the published articles.

The proposed CNN model’s architecture in this study consists of three CL with 16, 32, and 64 filters, as well as two dense layers with 512 and 1 neuron. A (3 × 3) filter dimension has been considered for the architecture as well as a dropout rate of 0.5. Excluding the last CL, a 2×2 maximum pooling was considered for each layer. A (1 × 1) max-pooling was used in the last convolutional layer. The architectural property of the proposed CNN is represented in Table 1. The proposed network provides approximately 57,377 parameters as compared to other models. A 5-fold cross-validation was used in the experiment. In this research, (240 × 240) CXR images were resized to (15 × 15).

Table 1 Architectural properties of the proposed CNN

To convert the features obtained from the convolution block into one-dimensional features, we employ FCL, which has three layers: flatten, dropout, and dense. In our proposed method, we fix dropout to 0.5 and set the number of the last dense layer neuron to 1. The sigmoid layer is used to classify the features taken from the FCL. The number of units for the SoftMax layer is determined by the number of categories.

The pseudo-code of the “CNN-HCA” is represented in Algorithm 1 which improves the quality of the solution. At each iteration of optimization methods, it updates the dimension of filter size along with the number of neurons in the first dense layer in the model structure. The proposed algorithm is repeated until the final condition is not satisfied.

Algorithm 1
figure a

Pseudo-code for CNN-HCA algorithm.

Note: [Condition for termination of HCA]: Either the iteration number reaches 50 or the fitness of particle doesn’t change for 5 generations continuously.

4.5 Phase 4 (performance evaluation phase)

To analyse the suggested model, five metrics were used: classification accuracy, sensitivity, specificity, ROC, and AUC. In this study, HCA is used to reduce the misclassification rate, which is specified as a cost function in (3).

$$ f = min(1-Accuracy) $$
(3)

Here, Accuracy is calculated using (4)

$$ Accuracy = \frac{{\sum}_{k=1}^{n}{\sum}_{l=1}^{c}{A\left( k,l\right).B(k,l)}}{n} $$
(4)

where n and c represents the total number of instances and classes respectively.

  • A(k,l) = 1, If an instance k is of class l else 0.

  • B(k,l) = 1, , if the predicted class of instance k is l else 0.

The following are the study’s primary contributions:

  • The proposed method has converged at the 42nd iteration with a very less error rate of 0.11 as compared to other hybridized models to generalize the classification of CXR images and show the best fit for the dataset.

  • The suggested hybrid classifier ``CNN-HCA” is intended to divide CXR images into two categories.

  • Selection of bio-inspired technique which is being able to optimize the CNN parameters such as; Filter dimension and the total number of neurons in the first dense layer concerning improvement in classification performance.

  • A comparative study is carried out between the proposed CNN model and pre-trained CNN models.

  • For adjusting the hyper-parameters of CNN, three optimization algorithms were used: HCA, Jaya, and PSO, and the suggested technique discovered the best optimum values of the hyper-parameters.

5 Results and discussion

5.1 Description of the data set

The data can be found on the Kaggle website which holds two categories of CXR image folders as; (a) COVID-19 (b) Pneumonia. Before applying to the training and testing phase, several data augmentation techniques such as horizontal and vertical flip, zooming, width shift range, rotation and width height were already applied in the dataset. Not only does it improve CNN performance, but also prevents the over-fitting issue. Table 2 explains the different parameters and the values used in the dataset.

Table 2 Data augmentation parameters utilised in the dataset before the training and testing phases

The composition of the dataset is narrated in Table 3. There are 220 numbers of CXR images were selected for this work and divided into 80:20 ratios, where 80%, 20% of data were used for both training testing respectively. The dataset is balanced and consists of 50% of images positive category (110 images) and 50% of images in are negative category (110 images). There are 120 male patients and 65 female patients. The average age of the COVID-19 cluster is 55.5 years. The training and testing dataset comprise 176 and 44 number of CXR images respectively. Due to variation in dimension in images, all were resizing to 224 × 224. Different types of CXR images from the dataset have been represented in Fig. 3. The COVID-19 CXR image (Fig. 3(a)) manifests with diffuses of the lung due to whiteness while the Pneumonia CXR image (Fig. 3(b)) depicts an area of lung inflammation and focal lobar consolidation.

Table 3 Data-set description
Fig. 3
figure 3

Different samples of CXR image

5.2 Hardware and software setup

For CXR image classification, an ordinary high-performance computer like 8GB memory, Intel i7 (2.3 GHz) Processor, 256GB solid-state drive disk, NVIDIA Tesla K80 was used. In this paper, a Google Cloud GPU was used to accelerate the process also. A python program was used to test the classification result while needs a virtual machine in the GPU cloud since CNN techniques require high computing.

5.3 Model evaluation criteria

In this work Accuracy, sensitivity, specificity, fscore, ROC, and AUC have been taken into consideration for the performance of the model for COVID-19/Pneumonia experiments. Model having higher ROC and AUC value is more proficient and effective in differentiating both the patients. Equations (5), (6), (7), (8), and (9) represent the Accuracy, sensitivity, specificity, precision, and fscore respectively.

$$ Accuracy=\left( tp+tn\right)/\left( tp+tn+fp+fn\right) $$
(5)
$$ sensitivity=\frac{tp}{tp+fn} $$
(6)
$$ specificity=\frac{tn}{tn+fp} $$
(7)
$$ precision=\frac{tp}{tp+fp} $$
(8)
$$ f-score=\frac{2\times t\ p}{2 \times t\ p+fp+fn} $$
(9)

Where tp, tn, fp, fn represent true positive, true negative, false-positive, and false-negative respectively. f-score comprises the harmonic mean of recall and precision values of both classes.

5.4 Experimental results

Table 4 represents a summary of the comparison of performance in terms of accuracy between pre-trained CNN models and the proposed CNN model using the same CXR COVID dataset. The parameters of different pre-trained deep learning models are explained below.

Table 4 Comparison of accuracy between CNN model and pre-trained deep learning models using the different combination of the epoch, batch size, loss function in the same CXR COVID dataset by manual search to quantify hyper-parameter values

In VGG-16 network, 16 means it contains 16 layers with different weights. This network is rather huge, with over 138 million (approximately) parameters. The most distinctive feature of VGG16 is that, rather than having a huge number of hyper-parameters, they worked on having 3x3 filter convolution layers with a stride 1 and always utilised the same padding and max-pool layer of 2x2 filter stride 2. Throughout the design, the convolution and max pool layers are arranged in the same way. Finally, there are two FC layers and a soft-max for output.

VGG19 is a VGG variation with 19 layers (16 convolution layers, 3 FC layer) whereas 5 Max-Pool layers and 1 SoftMax layer not taken into account. Capsule Networks (CapsNet) are networks that can retrieve geographical information in order to avoid the data loss that occurs during pooling operations. ResNet50 is a ResNet variation of 48 Convolution layers, 1 Max-Pool layer, and 1 Average Pool layer. There are 3.8 x 109 floating point operations in it. DenseNet-121 has One 7x7 Convolution, 58 3x3 Convolution, 61 1x1 Convolution, 4 Average-pool, and 1 FC layer. MobileNet employs depth-wise separable convolutions.

It’s observed from Table 4, the proposed 9-layer CNN model produces 86% accuracy which is superior to all the pre-trained architectures.

The effect of several hyper-parameters such as the loss function, the number of epochs, and the batch size on the accuracy of many architectures of DL on same CXR dataset by the trial-and-error approach has also been observed from Table 4. The CNN model provides the best results as compared to other pre-trained CNN models using cross-entropy loss function, 20 epochs, and a batch size of 10 in our proposed CNN model accomplishes the best results as compared with other models.

To prevent the over fitting issue, different explorations results of the proposed CNN model with the last unfrozen ConvLayer have been shown in Table 5. As the final accuracy of the CNN model does not depend on one factor, so a fair comparison of different parameters is needed. From the analysis, it can be found that the highest accuracy of the proposed CNN model can be obtained with the learning rate of 0.001, a dropout rate of 0.5, with batch BNL.

Table 5 Estimation of dropout, batch normalization layer, and learning rate for proposed CNN model in the final Convolution layer

5.5 Setting up the HCA for the hyper-parameters selection

The searching space for filter size and the total number of neurons in the first FCL are [3,10] and [50,600] respectively where the maximum number of iteration and population are chosen to 50 and 30, respectively, represented in Table 6. The results of the experiment showed that when the number of epochs is greater than twenty, the training process for each of the HCA requires exponential time, and when the number of epochs is less than twenty, the proposed model’s results are not sufficiently accurate. As a result, the number of epochs was limited to twenty. The purpose of using the HCA is to lower the testing set’s loss rate as much as feasible.

Table 6 Necessary parameter values for HCA in collaboration with the suggested CNN

The best settings for kernel size and the number of neurons in the first dense layer were identified after approximately 7 hours of training. The optimal values for the hyper-parameters chosen by HCA are shown in Table 7 where filter size and the number of neurons are 7, 512 respectively.

Table 7 HCA calculated the optimal settings for the hyper-parameters

5.6 Convergence analysis

As shown by Fig. 4 and Table 8, it has been observed that the proposed CNN-HCA hybrid model has achieved the highest accuracy of 90% (90% of the test set correctly), sensitivity of 92%, specificity of 89.10%, F-score of 90.25% and AUC value of 97.94% on two-class classification over the remainder of the models including CNN-Jaya (87.95%), and CNN-PSO (88.94%) in terms of accuracy. Further, the F- score for the CNN-HCA model (90.25%) is higher than CNN-Jaya (87.21%) and CNN-PSO (88.42%). To make a fair comparison, we fixed the number of iterations to 50 in all the hybrid models.

Fig. 4
figure 4

Comparison of CXR image dataset with other hybridized models

Table 8 Comparison of the suggested hybrid model’s sensitivity, specificity, F-score, AUC, and accuracy to others

From Fig. 5b, it is also found that our proposed method has converged at the 42nd iteration with a very less error rate as compared to other hybridized models to generalize the classification of CXR images and show best-fit for the dataset. In comparison to other hybrid models, the results in Table 9 revealed that the proposed technique is more dependable, valid, and superior.

Fig. 5
figure 5

Comparison of hybridized models based on RoC and Convergence Curve

Table 9 A comparison of the proposed approach’s results with the best results obtained by the other offered techniques

It has observed from Table 8 that the suggested CNN-HCA model outperformed the previous hybrid architecture models in terms of accuracy, sensitivity, specificity, F-score, and AUC, with 90%, 92%, 89.1%, 90.25%, and 97.94% respectively. The other approaches [1, 6, 41] were selected for comparison with the proposed approach for classification of COVID-19 using the same CXR images and obtained a superior result for the proposed model as shown in Table 9.

The dataset used in our proposed model is balanced, whereas the dataset in earlier work is imbalanced. Joy Iong-Zong Chen [6] has made the Cohen’s dataset, which comprises of 60k around pictures with 400 positive COVID-19 X-ray. In classifying COVID-19, the suggested CNN model with 5 convolutional layers obtained an accuracy of 85%, 69.5% precision, and 80.5% recall. To classify COVID-19, Alkas et al. [1] developed an LSTM network in another work. The experimental findings demonstrate that the proposed model has an accuracy of 86.66 %, F1-score of 91.89%, a precision of 86.75%, a recall of 99.42%, and an AUC of 62.50% in identifying patients with COVID-19 illness.

Xiangjun et al. [41] acquired chest CT pictures from 495 patients at three Chinese hospitals. They used a deep network (ResNet-50) to train a multi-view hybrid approach to identify patients with COVID-19 and obtained AUC, accuracy, sensitivity, and specificity of 0.819, 0.760, 0.811, and 0.615 in the test dataset respectively. However, on two-class classification of the same CXR dataset with different samples, the proposed CNN-HCA hybrid model achieved the highest accuracy of 90% (on test set), sensitivity of 92%, specificity of 89.10%, F-score of 90.25%, and AUC value of 97.94%.

6 Conclusion

Using the CXR dataset, this study proposed an effective hybrid classification approach. The suggested CNN-HCA model beats existing competitive hybrid ML models, according to a comprehensive simulation analysis. The filter size and the total number of neurons in first FCL were optimised using a specific meta-heuristic optimization algorithm called HCA. Due to the facility of automatic feature extraction, CNN-based optimization techniques are better than conventional methods. People inflamed with COVID-19 are probably to go through everlasting harm within the lungs, which may later initiate death. This takes a look and is aimed to differentiate humans with broken lungs as a result of COVID-19 from ordinary people or pneumonia. The detection of COVID-19 changed into the complete use of deep learning models. Since it’s vital to discover COVID-19 that unfold hastily and globally, AI strategies are used to carry out this correctly and quickly. The proposed model aims to provide quick and correct results.

The proposed approach is only suitable for two hyper parameter such as; kernel size and number of neurons in first Dense layer which is the limitation of work. If we will add more hyper-parameters such as training size, training rate, and activation functions in the process of optimization, the proposed model does not provide well performance in terms of accuracy (Less than 80% approximate). Selection of CNN layers and image enhancement algorithms are the threats to the internal validity of this design. If we will increase or decrease the number of CNN layers, then the performance of experimental result may vary. The effect of image enhancement algorithms will also impact on the performance of CNN models in deep learning and transfer learning.

Its been observed from literature survey, the HCA has been used more for feature extraction problem, weight initialization of CNN, and training of CNN, but the authors have not applied for tuning the hyper-parameter of CNN in in the domain of COVID-19 image classification. So, for the first time it has been applied for tuning the hyper-parameters of CNN in application to COVID-19 classification. PSO and Jaya have adopted hyper-parameters in a narrow sense including only the number of layers without changing the overall architecture but HCA has taken into it in a broader sense by considering the kernel size and number of neurons in first FCL in this work.

The proposed model is more efficient in terms of network size (only 9 number of layers) as compared to any pre-trained model trained for more than one purpose. In case of VGG16 it is trained for 1000 different categories and even if 2 categories, to train the whole model again, because layers can’t change the deep knowledge of VGG16.

The proposed model can be utilized in other domains with binary and multiclass datasets. The main advantage of CNN compared to its predecessors is that it automatically detects the important features without any human supervision. Also, another key feature is that deep convolutional networks are flexible and work well on image data. Convolutional layers exploit the fact that an interesting pattern can occur in any region of the image. There are many types of HCA are available such as simple, Steepest-Ascent, Stochastic. But the authors have used simple HCA in this work which required limited computational power as compared to other optimization techniques.

The best accuracy may not be attained if the dimension of the input photos in the dataset varies. So, regardless of the resize parameter, dealing with very low-resolution photographs remains a barrier for the suggested approach. The best accuracy may not be attained if the dimension of the input photos in the dataset varies. So, regardless of the resize parameter, dealing with very low-resolution photographs remains a barrier for the suggested approach to the future. The number of data samples utilized to learn the suggested approach could be increased in the future to improve its overall performance in the analysis of COVID-19. Furthermore, a wide range of illnesses that cause pneumonia can be accelerated, and the proposed method can be utilised to distinguish them from COVID-19.