Introduction

Human survival is a challenging task in the pandemic situation where doctors hesitate to come to inspect COVID patient. The motivation is to innovate a solution, integrating image processing and machine learning techniques to inspect chest CT scan and predict the stage and level of infection in a short time with promising results reducing the manual physician dependency and assisting physicians in accurate decision-making (Geetha and Thilagam 2021).

The majority of people who infect with COVID-19 develop mild to severe respiratory illness, while some develop devastating pneumonia. It is believed that old age people with serious clinical problems such as cardiovascular disease, diabetes, persistent respiratory infections, kidney or liver disease, and malignant growths are mostly affected with this disease.

However, the virus is still widespread, creating difficult for radiotherapists to differentiate COVID-19 from other pneumonia viruses. COVID-19 will cause respiratory disease such as viral pneumonia which sometimes leads to misdiagnosis in the current state when medical clinics are overloaded and operating continuously. Therefore, a misdiagnosis could lead to viral pneumonia without COVID-19 which could be classified as highly suspicious for COVID-19, thereby delaying the treatment, resulting in the costs, efforts, and risks of presenting a positive patient with COVID-19. Manual inspection and dependency are leading to increased mortality rates. This is the current pandemic situation in which still there is no machine learning based solution been implemented.

Significance of the proposed system

The main objective of the system is to examine traces of COVID-19 on chest X-rays. Since COVID-19 infections affected worldwide, different techniques have been recognized for positive COVID-19 cases. The aim is to develop deep learning design studies to study architectural design, starting with original deep learning designs and engineering prototypes to find COVID-19 in an easier way.

A major contribution of this paper includes the following: proposed approach having an open source and tools to identify COVID-19 and other respiratory issues. It uses a machine-driven design exploration to learn the design which starts by design prototype and requirements. It takes input as a chest X-ray image and outputs a prediction of normal and abnormalities and easy decision making assisting physicians.

Artificial Neural Network (ANN)

Like the human brain, ANN transmits and receives signal to other neuron. As shown in Fig. 1, ANN has three-layer input, hidden, and output layer. The output of neuron is computed by weight which determines the strength of the signal at a connection. Neuron has a threshold value, signal sent only if aggregate signal crosses that threshold.

Fig. 1
figure 1

Artificial neural network

The proposed system is designed to support the traditional RT-PCR methodology for accurate clinical diagnosis. Screening for COVID-19 can be received with X-ray images or CT-scans of human lungs. Here, a new multi-image augmentation system is proposed based on convolutional neural networks (CNN) which is a variant of artificial neural network to detect COVID-19 in the chest using chest X-rays or scanned images of people, suspected of having the coronavirus. In this way, our proposed system produces promising results in no time.

Typically, image-processing systems involve treating the image as a two-dimensional signal using predefined signal processing techniques. Today, with its applications in various business areas, it is one of the fastest growing technologies. Image processing is an important research area in engineering and computer science. “Optimizing a performance criterion using example data and past experience,” said by E. Alpaydin gives brief introduction about machine learning. In machine learning, data plays an vital role and learning algorithms are used to determine and examine facts or data properties. The quality or quantity of data sets affects learning outcomes and forecasts. The splitting process is shown in Fig. 2.

Fig. 2
figure 2

Splitting process

Considering training sets and test sets in machine learning, it is assumed that there is an unknown universal dataset containing all possible data pairs and their probability distributions for their occurrence in the real world. In real time applications, a subset of the universal data set is observed due to lack of memory. These recorded data sets are known as training data sets (training data are used to examine the properties and knowledge of universal data sets). In general, vectors in the training set are received independently and identical samples (i.e.) are drawn from the universal data set. In machine learning, this property is required not only to describe a training set but also to be used to predict invisible samples or future events (Das et al. 2021). To learn about the effectiveness of training, other data sets can be ordered, which are called test sets or test data. For example, teachers can ask students some practice questions (training set), before the final exam, and their way of assessing student performance is by checking them with another set of problems (test set).

The clinical text reports gave researchers and hospitals open access to data related to this epidemic to identify the virus with the created data sets. Castiglioni and Ippolito (2021) designed to develop a computer diagnostic system (DEEPLIR) based on a convolutional neural network. It can automatically perform the first screening task in a satisfactory way and healthy chest X-ray to solve the problem motivating this project. AlexNet has great potential for knowledge transfer on chest X-rays and deep learning from CNN is considered as the number one candidate in a major visual recognition task.

Narin et al. (2021) have trained five neural network-based convolution models (ResNet50, ResNet101, ResNet152, InceptionV3, and Inception-ResNetV2) which is used to check patients with coronary pneumonia using chest X-rays. Different binary classifications under four categories (COVID-19, normal (healthy), viral pneumonia and bacterial pneumonia) using fivefold validation. In the study, one of the most applicable steps to achieve this goal is to complete radiographic checkup. According to Das et al. (2021), chest X-ray is the easiest and cheapest option. In this research, a solution based on a deep convolutional neural network is proposed that could identify COVID-19 positive patients using chest X-ray images. To examine the effectiveness of the solution, authors used publicly available chest X-rays of COVID positive and negative cases. It is used to put into practice that convolutional neural networks were evaluated to detect affected patients from chest X-ray images. For Makris et al. (2021), dataset of X-ray images with positive COVID-19 disease, pneumonia patients, and normal persons is compared. Empirical results illustrate the classification performance.

According to Mangal et al. (2020), deep neural network-based model is used to screen patient for the appropriate examinations. The results show AUROC is one of the method to identify COVID-19 from X-ray images. The proposed CoroNet automatically detects COVID-19 infection from chest X-ray images. According to Khan et al. (2020a), a model is built on an exception architecture that uses image dataset prepared by collecting COVID-19 confirmed patients and chest X-ray images of pneumonia.

According to Abraham and Nair (2020), the effectiveness of the set CNNs is a combination of several pre-trained CNNs, for automatic detection of COVID-19 from images of X-rays. It uses a functions which is extracted from multiple CNNs with correlation-based function identification technology (CFS) and Bayesnet classifier to predict COVID-19. Out of 38 experiments carried out using convolutional neural networks, out of five machine learning models, 10 experiments were performed and 14 experiments were performed using the most modern pre-trained networks to impart learning. According to Sekeroglu (2019), the convolutional neural network without pretreatment and micro-layers is able to detect COVID-19 in a restricted quantity of unbalanced chest X-rays.

Ouchicha et al. (2020) proposed CVDNet, a novel deep learning architecture to identify COVID-19 infection using chest X-ray images. It is fully based on residual neural network and it is created with two unlike planes of different cores to capture the local and global features of the input. It is trained to work with minimal dataset. Cozzi et al. (2020), proposed a retrospective study involving patients with clinically suspected epidemiological COVID-19 infection and performed CXRs in the emergency department (ED) of thier University Hospital from March 1 to March 31, 2020.

Hussain et al. (2020) suggested a CNN model called CoroDet which detects COVID-19 using digital X-rays and CT image scans. It was developed to be an accurate diagnosis for two categories (COVID and normal), classification of 3 categories (COVID, common pneumonia, and non-COVID), and classification of 4 categories (COVID, common viral pneumonia, non-COVID, and non-COVID bacterial pneumonia). Gilaniea et al. (2021), used publicly available and locally developed datasets which are obtained from the Department of Radiology (Diagnostics), Bhawal Victoria Hospital, Bahawalpur (BVHB), Pakistan. This model has been trained on a large data set and is being used in Department of Radiology, BVHB, Pakistan.

According to Apostolopoulos and Mpesiana (2020), dataset of chest images, pneumonia patients, confirmed COVID-19 disease, and healthy individuals is used to automatically detect the coronavirus. The goal is to calculate the performance of the latest proposed CNN structures over modern years for health images classification. Data were collected from X-ray images available in public medical warehouses.

According to Arias-Londoño et al. (2019), the current typical method used to diagnose COVID-19 includes molecular or antigen tests, which are generally supplemented with regular chest X-rays. It represents techniques based on a neural network. These are the first steps for automatically developing a COVID-19 diagnostic tool using chest X-ray images to distinguish between control groups, pneumonia, or COVID-19 groups. A specially designed deep convolutional neural network to detect COVID-19 cases from chest X-ray (CXR) images is available as non-proprietary images. According to Wang and Wong (2019), datasets are used to train and calculate the proposed COVID-Net network, which is referred to as COVIDx. This result gives an accuracy of 89% for positive cases of the virus.

A learning-based transport method to detect COVID-19 infection in a chest X-ray using the Inception (Xception) model is used. According to Narayan Das et al. (2020), trained weights on large data sets as well as set weights of pre-trained networks on small datasets are used. According to Reddy (2020), classified normal and abnormal cases, a CAD system has been developed with GUI-based support vector machine classifier (SVM).

A deep learning-based automatic discrimination was performed by analyzing patterns of COVID-19 pneumonia on a chest X-ray. According to Khan et al. (2020b), classification is performed using CNN new construct, suitable for COVID-19 pneumonia analysis. Present methods used metrics such as curve ROC and confusion matrix. A preliminary test is carried out using image texture feature descriptors, CNN on dataset of COVID-19 images. Varela-Santos and Melin (2020), established a goal for the upcoming change of a system which is capable of automatically spotting COVID-19 disease on its manifestations on chest X-rays and CT images of the lungs. Minaee et al. (2020) have detected disease through X-rays and imaging is the easy way to cure COVID-19 patients. First, a dataset of 5000 chest X-rays is prepared from publicly available datasets. The images show the presence of COVID-19 identified by a well-trained radiologist.

Asif et al. (2020) aimed to identify viral pneumonia patients using digital chest X-rays while increasing the correctness of detection using deep convolutional neural networks (DCNN). Results show that learning to transfer has proven effective, demonstrated good results and best method to detect COVID-19. Mahmud et al. (2020), proposed a deep convolutional neural network (CNN) architecture is proposed for the use of deep torsion with varying stretch rates to efficiently extract various features from a chest X-ray. The training phase learning starts by fully tuned layers that are further compared with chest X-rays corresponding to COVID-19 and other viral pneumonia. According to Kaushik et al. (2020), pneumonia has got a variety of types which is identified by gradient-based differential localization. It helps to distinguish abnormal areas of the X-ray images. The research introduces convolutional neural network models identify lung infection from chest X-rays accurately, a better way to treat viral pneumonia. Trials were performed on a chest X-ray (pneumonia) dataset available on Kaggle. CNN models were generated and well-trained on dataset.

For Kusakunniran et al. (2021), the ResNet-101 architecture has been adopted as the main network with over 44 million factors. It is a large-size network trained with 1500 × 1500 1500 × 1500 X-ray images. The assessment is based on COVID-19-infected person and healthy individuals. It is also tested on invisible classes to validate the organization of the complex model. The result is that COVID-19 is detected in a chest X-ray. Heat map and detection confidence are displayed so that expertise can use it for final conclusion in practical use. For Qi et al. (2019), newly designed multi-feature convolutional neural network architecture (CNN) for improved multi-class classification of COVID-19 from CXR images is developed. CXR images were optimized using a phase-based local image enhancement method. The optimized images, along with the novel CXR data, are used as inputs into the proposed CNN architecture. It provides a quantitative evaluation of two data sets and qualitative findings of visual examination.

According to Pathak et al. (2020), transfer learning technology is used to identify infected patients. An activation function called Softmax is used. For Minaee et al. (2020) and Asif et al. (2020), automatic method to detect COVID 19 patients with pneumonia using digital chest X-ray images is used. DCNN is used to increase accuracy. The DCNN Inception V3-based model is a transfer learning model to detect coronary-infected persons using chest X-ray images. Their results show that learning to transfer has proven effective, demonstrated good deployable approach to detect COVID-19.

According to Oh et al. (2020), patch-based convolutional neural network with a small amount of the data set is proposed as a method which is inspired by their statistical analysis of biomarkers for potential radiographs CXR. Ceylan (2020) explored new technological possibilities to help cure the coronavirus. Robots and drones have been used to non-invasively transport food and medicine to hospitals. It facilitated the monitoring of the curfew on the administrative department. This type of application has reduced the need for human resources in common tasks and leads to efficient utilization.

Table1 shows the comparison of the previous works in the detection of COVID-19.

Table 1 Comparison of the related work with methodology and limitation

As of 1 May 2020, approximately 3,401,002 infected cases were confirmed in more than 210 countries, with 239,602 deaths recorded, 1,081,599 recovered, 2,028,446 mild case,s and 51,355 critical cases. Machine-learning chest X-rays are gaining popularity because they are easy to use with inexpensive imaging techniques and there is a wealth of training data on a wide range of machine learning models during the pandemic while providing physicians with accurate decision support.

Methods

The proposed system is designed to support the traditional RT-PCR methods for accurate clinical diagnosis. Screening for COVID-19 can be received with chest X-ray images or CT-scans of human lungs. The images are collected from the Kaggle website for research purposes which are then pre-processed as grayscale, medium filter, and binary mask. The image is then refined to extract properties using wavelet transforms. The texture value is generated as a classifier input. Here, the dataset has been divided into training and testing sets, the training set is used for generating the neural network model, and the test set are used to make decisions.

COVID detection: deep convolutional neural networks-based diagnosis model

A new multi-image augmentation system based on convolutional neural networks (CNN) is used to detect COVID-19 in the chest using chest X-rays or CT scan for the people who are suspected to have coronavirus. In this way, the proposed system produces promising results in no time as shown in Fig. 2.

Dataset identification

The input dataset images are obtained from https://www.kaggle.com/paultimothymooney/chest-xray-pneumonia? for analysis. The dataset is publicly available for research analysis. In general, this repository contains chest X-rays/CT photos of patients with acute respiratory distress syndrome (ARDS), COVID-19, and others. There is currently no larger and more reliable sample. The same number of samples for each class was selected for the experimental approach.

Pre-processing

Random image rotation

The pre-processing method includes random image rotation (maximum rotation angle of 30°), horizontal rotation, cropping, scaling, cropping, and small random noise. Image processing improves summary and model learning capabilities.

The pseudocode for this system has been listed below:

1. Collect the dataset and define the dataset path, epoch and batch-size value

2. Fetch images and class labels from files

3. Visualize few images from the dataset

4. Normalize the array of pixel values

5. Network initialization: select a random startup weight

6. Select the first pair of exercises

7. Forward calculation, which includes the following steps:

a. Connect the input to the network

b. Compute the result for each neuron from the input layer through the hidden layer to the output layer

c. Calculate the output error

8. Countdown, including the following steps:

a. Use the result error to calculate the error signal for the pre-output layer

b. Use the error signal to calculate the weight correction

c. Make adjustments to body weight

d. Repeat the calculation back and forth for the other pairs of exercises

e. Periodically evaluate network performance

9. Repeat the calculation back and forth until the network approaches the target exit

Feature extraction

When extracting features, new classifiers are trained from scratch based on previously trained model. Representations were studied from trained models, treated as random feature extractors which were used to extract significant features from new samples. The kernel convolution network already contains generally useful classification features so that the entire model does not need to be retrained. On the other hand, to increase productivity when fine-tuning, the top layer weights of the pre-trained model are “fine-tuned” together with the newly added classification layer. This will adjust the weight of the general feature map to the features specific to the provided data set. The fine-tuning is adapted to add certain features to tasks rather than to replace general training. Tailored learning experiments are much faster and more accurate than trained models.

CNN for the training model

Machine-learning models require large amounts of data to accurately extract and classify features. When it comes to analysing medical data, especially when the disease is still in its first stage, such as in COVID-19, the main disadvantage is that the data analyzed is very limited. To overcome these limitations, the concept of machine learning with transfer learning was adopted. Trained models are networks that have previously been trained on large data sets, usually for large-scale image classification tasks. The divination behind image classification transfer training is that when a model is trained on a common large data set, it in turn functions as a general model. This allows models to be trained and compared.

Inception-v3 is a convolutional architecture for neural networks in the inception family that makes several enhancements, including the use of label smoothing, 7 × 7 convolution factors, and the use of additional classifiers to distribute label information across the network. Inception modules are joined into convolutional neural network (CNNs) as a method of diminishing computational cost. The architecture of Inception V3 is shown in Fig. 3. As a neural net arrangements with an immense range of pictures with wide variety in the included picture content, otherwise called the notable parts, they should be planned suitably. The most improved on adaptation of an initiation module works by playing out a convolution on a contribution with not one but rather three distinct sizes of channels (1 × 1, 3 × 3, 5 × 5). Likewise, max pooling is performed. At that point, the subsequent yields are linked and shipped off the following layer. By organizing the CNN to play out its convolutions on a similar level, the organization gets logically more extensive, not more profound (Fig. 4).

Fig. 3
figure 3

Architecture of automatic detection of COVID-19 using chest x-ray images

Fig. 4
figure 4

Architecture of Inception v3

The layers are used in convolutional neural networks to accommodate more skilled calculations and more detailed networking by reducing the size with stacked 1 × 1 loops. The module is designed to solve the problem of computing costs among various problems. Therefore, the setup is to take multiple CNN channel sizes and instead set them up one by one, requiring that they operate at the same rate. To make the process computationally more intensive, neural networks can be designed so that additional 1 × 1 convolutions are added before the 3 × 3 and 5 × 5 layers. Thus, the number of input channels is limited and 1 × 1 times is much cheaper than 5 × 5 times. However, it is important to note that the 1 × onefold was added after the maximum combined layer, not before.

Results and discussion

The proposed system ensures a classification representation for each CNN. To evaluate the output, the following parameters such as performance curve with true positives and false positives, computation of confusion matrix, accuracy, and loss were considered for each class (COVID/pneumonia, normal) that were taken from the CT images of the lungs. Python package integration provides promising results for our proposed methodology.

Performance curve

The performance curve is a graph showing the performance of the classification model across all classification thresholds. The various metrics to compare the performance of CNN are namely accuracy, loss, true positive rate, and false positive rate.

$$\mathrm{True\;positive\;rate\;is\;given\;as\;TPR}=\left(\mathrm{TP}/\left(\mathrm{TP}+\mathrm{FN}\right)\right)$$
$$\mathrm{False\;positive\;rate\;is\;defined\;as\;FPR}=\left(\mathrm{FP}/\left(\mathrm{FP}+\mathrm{TN}\right)\right)$$

where TP is true positive and FP is false positive.

In the aforementioned study, the images with COVID and non-COVID have been assigned with the positive and negative cases. Hence, TPR indicates the number of correctly diagnosed images and FPR represents the incorrectly diagnosed COVID-19 and non-COVID-19 chest X-ray images, respectively. Apart from this, the performance curve has been computed for representing the overall performance of the CNNs.

The percentage of true positives and false positives of the classified chest images is represented in Y and X coordinates as shown in Fig. 5. Added to this is classified as positive, increasing false positives and true positives.

Fig. 5
figure 5

Performance curve

Computation of confusion matrix

Confusion matrix is a useful machine-learning method that lets you experience recall, precision, accuracy, and performance curves. In the field of machine learning and especially in the field of statistical classification, the confusion matrix, also called the error matrix, can be a specific table layout that allowing visualization of the normal function of an algorithm. Confusion matrices can be tables that often do not explain how a classification (or “classifier”) model works for a set of test data that is a known truth value. The confusion matrix itself is relatively easy to learn but the terminology associated with it is often confused. The confusion matrix without normalization and with normalized values for COVID and non-COVID labels are shown in Figs. 6 and 7.

Fig. 6
figure 6

Confusion matrix without normalization

Fig. 7
figure 7

Confusion matrix with normalization

Accuracy and loss

The graph in Fig. 8 shows the accuracy of the model where the x-axis represents epoch and y-axis accuracy. Figure 9 shows the loss shown by the model with the representation of x-axis with epoch and y-axis with loss.

Fig. 8
figure 8

Model accuracy

Fig. 9
figure 9

Model loss

In this examination, Inception v3 which is the variant of CNN has been deployed to present a gist of the role of deep learning in detecting the COVID infection. The result provided proves that deep learning is able to differentiate itself from other models with high accuracy and improved loss.

Conclusion

In this proposed system, some preliminary results are found to detect positive cases of COVID-19 from chest X-rays using an in-depth training model. The system demonstrates a significant performance improvement over the publicly maintained COVID-19 positive X-ray classification kit, the same dataset of pneumonia chest X-rays. The optimal selection of slices/features has led to obtain best results for accuracy and loss. In addition to that, the parameter selection reflected optimal true positive rate and false positive rates. The results look promising even with the small publicly available data set in a short period of time. In future, an application will be created for patients to view their reports and send reports to their registered mobile number.