Radiology Image Data Augmentation and Image Enhancement in Respiratory Disease Infection Detection Using Machine Learning Approach

: Medical imaging plays an important role in medical diagnosis and treatment. It is also useful in medical applications. The proposed concept's goal is to understand the importance of data balancing, data augmentation, and segmentation in the clinical field, to improve image data balancing using data augmentation and edge detection techniques, to improve radiology image preprocessing to locate regions of interest (ROI), and to construct custom-built Deep Neural Networks (DNN) in diagnosing respiratory illness using Machine Learning approaches. Images of varying quality from multiple machine types are frequently included in different datasets. This study used four datasets, three of which are online datasets from Kaggle and the fourth is real-time radiology pictures of COVID and Pneumonia-infected persons from neighboring local hospitals. We proposed RESP_DATA_BALANCE for image data balance in dataset construction, and RDD_ROI (Respiratory Disease Detection Region of Interest) algorithm, which combines improved image feature extraction technique using a GLCM and unsupervised K-means clustering for segmentation to identify the region of interest in the detection of respiratory diseases. Our suggested custom-built 28-layer Respiratory Disease Detection Deep Neural Network (RDD_DNN) is used for further training, testing, and validation. Furthermore, experimental results focus on performance characteristics using various data augmentation, edge detection, and preprocessing strategies. The experimental purpose of our research study is to aid in the classification and early diagnosis of respiratory disorders.


Introduction
Lung trouble is another name for a respiratory ailment.The essential point is that this condition may be identified, and evaluated in various patterns, and forms of lung disease.Pneumonia, COVID-19, and TB are the most common types of lung illness.The primary issue in many nations with this condition is a shortage of radiologists [1].DL (Deep Learning) and ML (Machine Learning) may be used to classify, identify, and quantify medical pictures [2].CXR (Chest X-ray) pictures and chest radiography are processed for the respiratory illness medical imaging system.Machine learning approaches are setting new criteria in the field of medical pictures and detecting respiratory illness.Many big chest radiographs are used in the computer assistance diagnostic for respiratory illness [3].ML techniques for medical image application for respiratory disease detection have reached tremendous heights.In lung disease, interstitial infiltrate changes are very predictive and limited [4].Moreover, examining different machine learning with image processing and classification is based on several attributes [5,6].The medical images dataset has different perspectives and uses CAD with machine learning algorithms the existing scholars have chest x-ray images to deliver significant knowledge regarding COVID-19 from CXR images, which should come from every remote location in different countries.If we talk about COVID-19, symptoms are cough, fatigue, and fever.On the other hand, diarrhea and sputum for excess [7].In multiple cases, pneumonia leads to deprivation of oxygen.
Many Image categorization is a prominent research topic in the science of computer vision.Despite the fact that the emergence of deep learning technology has accelerated the development of the image field, with the continuous breakthrough of deep learning in the field of computer vision, the deep neural network has improved various image recognition evaluation indicators with its powerful learning ability [8].However, diverse picture datasets in the enormous data have their own unique difficulties that restrict their identification ability.Furthermore, the imbalance problem in picture classification tasks is highly widespread in real-world applications and has emerged as a major issue in the fields of machine learning and data mining [9].The classification network directs training based on the training set samples and then classifies the test samples using the trained classification network [10].
The categorization of imbalanced highdimensional picture data remains a big issue, especially with relatively small samples of some minority classes [11].It is worth mentioning that many real-world data are prone to the phenomena of category imbalance, which occurs when the quantity of samples in various categories is substantially varied.This is known as the imbalance problem, and it has long plagued academics and industry.There is an issue.In a class-imbalanced dataset, the dominant class has more samples than the minority class.A number of outstanding classification algorithms have arisen as a consequence of the efforts of numerous researchers, and some practical results have been obtained.However, the vast majority of the current existing classification methods perform poorly when the training dataset displays an imbalanced distribution; they are primarily intended for datasets with balanced class distributions.Thus, it is a cormance is maintained while simultaneously improving the minority hallenging task to ensure that the majority class's classification perfclass's classification performance in these unbalanced classification tasks [12].Extraneous characteristics or picture areas reduce the model's performance; hence, it is critical to train a model with only the most significant features.As a result, the most critical step prior to the training stage is establishing the Region of Interest (ROI).For this reason, segmentation is useful since it may separate the irrelevant and unneeded elements of an image.There is a variety of open-source automatic segmentation methods available, including region-based, edge-based, clustering, and so on.Unnecessary features or image areas detract from the model's performance.As a result, the most critical step prior to the training stage is establishing the Region of Interest (ROI).For this reason, segmentation is useful since it may separate the irrelevant and unneeded elements of an image.A large amount of modern medical data is represented by images or other types of digital signals, such as X-rays, MRI, computer tomography (CT), positron emission tomography, single-photon emission computed tomography, electrical impedance tomography, and ultrasound [13,14].Massive volumes of sophisticated picture data have resulted in the development of automated medical image processing and analysis.The editing and analysis of images produced by discretizing continuous signals is the focus of digital image processing [15,16].
Medical imaging segmentation is important for obtaining information about the status of various tissues, organs, and Medical imaging segmentation is critical for determining the state of various tissues, organs, and other bodily parts [17].The segmentation accuracy and decision confidence value of any lung analysis system for spotting anomalies are strongly reliant on an appropriate lung segmentation technique.As a result, lung images are critical to the performance of segmentation-based algorithms.Due to poor image contrast and artifacts that result in missing or diffuse organ/tissue borders, medical image segmentation is problematic.As a result, this task necessitates the incorporation of as much prior information as possible, such as texture, shape, organ spatial position, and so on.Manual segmentation is not only time intensive and tedious, but it is also prone to error.Expert segmentation has been discovered to be effective.Expert segmentation has been observed to vary by up to 20% [18].As a result, numerous automatic and semiautomatic procedures have been presented.Because most existing algorithms for segmenting medical images only work on a specific type of image, they have limitations.As a result, a method medical imaging becomes more important.The main advantage of using unsupervised segmentation over supervised segmentation is that it does not require tagged training data.This is an important factor to consider in medical imaging and related applications [19].
The novel contribution of this work is outlined as follows: • Extraction and interpretation of radiological pictures in the detection of respiratory disease • Understanding the importance of data balancing, data augmentation and image enhancement using Machine Learning.
• Proposition of improved data balancing algorithm RESP_DATA_BALANCING using data augmentation • Proposition of improvement in image enhancement and preprocessing of radiology images in the detection of respiratory diseases with RDD_ROI algorithm

• Proposition of Custom Built Deep Neural
Network model in the detection of respiratory diseases.
• Comparative performance analysis and experimental evaluation of classification models to understand the effectiveness of image data balancing data augmentation techniques, image data segmentation, and different respiratory datasets etc.

Related Work
The literature review focuses on principles and previous research work on data balance, data augmentation, ROI detection, segmentation, and so on.

Survey on different data balancing and data augmentation
One of the most significant difficulties encountered in the radiology pictures classification problem is the scarcity of images, making the datasets unbalanced.In this section, we have discussed different data balancing technique for classification • Oversampling: Oversampling is the most commonly used method in multi-class imbalanced data preprocessing techniques, which solves the multi-class imbalance problem by introducing new minority class instances, thereby realizing the rebalancing of the original skewed data [20].However, random copying of samples does not introduce new information, and excessive copying of minority class samples will generate a large number of repeated samples, making the network overfitting.Oversampling is the most commonly used method in multi-class imbalanced data preprocessing techniques.
• Undersampling : Undersampling, as opposed to oversampling, preserves class balance by limiting the quantity of samples from the dominant class [21].The presence of a class overlap problem in multi-class imbalanced data will lead the classifier to fail to identify class borders efficiently, lowering the classifier's performance.Hartono presented the LOFCUS undersampling approach, which employs the LOF local outlier factor and boxplot to clean the noisy samples in the training data set and removes the samples that play a vital part in the classification based on the class overlap.Undersampling enhances classifier accuracy by increasing the retention of the original data distribution [22].
• Hybrid Sampling: The oversampling and undersampling algorithms each have advantages and downsides in the class unbalanced data preparation approach.To reduce data imbalance, some researchers combine the two types of sampling and process the majority and minority classes at the same time [23].
In [24], the author proposed SMOTE, a minority class sample synthesis approach.First, a minority class sample is chosen at random as the main sample, then the K nearest neighbor samples of the main sample are chosen from the remaining minority class samples, and finally, a minority class sample is chosen at random from the nearest neighbor samples, and the sample is randomly connected to the main sample.Sampling, and then using the obtained locations as synthetic minority class samples.However, due to the creation of incorrect samples, the minority class is over-generalized to the majority class region, impairing the learnability of minority class samples [24].Wang Xiao devised SSCMIO, a synthetic minority oversampling approach based on k-nearest neighbors, to improve SMOTE.When processing data, the k-nearest neighbor direction of each instance is provided a selection weight, and the neighboring direction that may cause severe overgeneralization is given a lower selection weight.This method uses safer nearby directions to synthesize instances and employs NBDOS clustering to avoid calculating the selection weights of some minority class examples.Simultaneously, two-loop filtering is employed to reduce the calculation of the distance between a large number of instances [25].SSCMIO also presents a strategy to avoid over-generalization, oversampling based on the safety factor of instance neighborhoods, and assigns lower weights to regions that may cause over-generalization, which can effectively limit the incidence of class overlap.
Hartono presented LOFCUS, a class overlapbased undersampling approach that employs the LOF local outlier factor and boxplot to clean the noisy samples in the training data set and removes the samples that play a vital role in the classification based on the class overlap.Undersampling enhances classifier accuracy by maximizing the preservation of the original data distribution [26].In imbalanced datasets, clustering algorithms paired with undersampling can efficiently manage majority classes.CUS is a clustering-based undersampling method suggested by Krawczyk.After clustering the majority of class instances, the instances with the most information are undersampled to generate numerous balanced datasets.Experiments show that this strategy is useful in classifying instances of the majority and minority classes, with high accuracy [27].Arefeen uses multi-class unbalanced data that has been trained and balanced, and offers a two-stage OCSV-US [28] algorithm that combines undersampling and genetic algorithms.The first stage involves training M singleclass classifiers based on the number of multi-classes, and each classifier returns a set of class instances with the highest informative value for sampling in the next stage.In the second stage, several random under sampled data subsets are produced based on the class instances from the previous phase, and the subsets are evolved using the genetic algorithm until their fitness function can no longer be improved.The most suitable dataset for categorization.The results suggest that this method's two-stage strategy can enhance computing time efficiency classification accuracy.
Combining SMOTE with various under sampling algorithms is a typical approach in mixed sampling preprocessing approach, first undersampling the most influential majority class samples and then oversampling the most important minority class samples by examining the safety level created by their nearby regions.It turns out that the proposed algorithm can limit the creation of noisy or overlapping data [29].Random Balance is a two-class imbalanced data preparation approach that randomly undersamples and SMOTE oversamples data.Janicka proposed the Multi Rand Bal technique based on this, which employs randomly generated priors for sampling instead of class proportions [30].In his suggested HAR-MI approach, Rodriguez coupled dynamic ensemble selection with Multi Rand Bal, preserving the diversity of data and classifiers while employing a minimal number of classifiers to obtain improved performance.With its tremendous learning capabilities, the classifier-based method combined with oversampling has proved its advantages in handling unbalanced issues [30].
Data Augmentation is effective for preventing models from overfitting, improving model accuracy, and lowering the operational cost of labeling and cleaning the raw dataset.Devaraj & Madian [31] reported new pneumonia medical imaging and infection detection methods.In one of the trials, data augmentation was used.Although data augmentation was promised to improve classification accuracy, most projects lacked data mining techniques.Anand et al. [32] correctly described persons and their cardiovascular conditions and took appropriate measures to prevent cardiac absconds.Alternate biological and actual constraints, such as age, gender, cholesterol level, blood pressure, pulse, and location of chest discomfort, can be estimated.The preparation and examination dataset was taken from kaggle.com and includes fourteen separate ascribes.Data is frequently at the center of AImanaged computations.[31] reported new pneumonia medical imaging and infection detection methods.In one of the trials, data augmentation was used.Although data augmentation was promised to improve classification accuracy, most projects lacked data mining techniques.Aggelides et al. [33] presented an interdisciplinary Gesture Recognition case study for recognizing and categorizing motions associated with allergic rhinitis.Allergy diseases, particularly allergic rhinitis, are among the most frequent maladies globally and significantly impede daily activities, including job productivity.Chowdhury et al. [34]  Khan The authors used data augmentation and DarkCovidNet, which was inspired by DarkNet, to diagnose pneumonia in their study [37].The dataset included 127 COVID-19 Pneumonia pictures, 500 Pneumonia samples, and 500 No-Finding samples.COVID-19 Pneumonia and No-Finding classes attained sensitivity of 0.951, specificity of 0.953, precision of 0.980, F-Score of 0.965, and accuracy of 0.980.When all photos were considered, the findings showed a sensitivity of 0.853, a specificity of 0.921, a precision of 0.899, an F-Score of 0.873, and an accuracy of 0.870.[38] employed data augmentation to balance the dataset and scaled the pictures (300 300).They used ImageNet transfer learning on the Exception and Resnet50 architectures.The collection includes 180 photographs of COVID-19 Pneumonia, 6.054 images of Pneumonia, and 8.851 images of normal type.The obtained data has an accuracy of 0.914.Despite the small number of COVID-19 Pneumonia pictures, the outcome was representative; nevertheless, cross-validation was not performed in the study.Medical imaging segmentation is important for obtaining information about the status of various tissues, organs, and other parts of the body [39].Any lung analysis system's segmentation accuracy and greater decision confidence value for identifying anomalies rely heavily on an effective lung segmentation technique.As a result, the performance of segmentation-based systems is dependent on lung pictures.Medical picture segmentation is difficult due to weak image contrast and artefacts that result in missing or diffuse organ/tissue borders.As a result, this task requires incorporating as much prior information as feasible, such as texture, shape, spatial position of organs, and so on.Manual segmentation is not only time consuming and boring, but it can also be erroneous at times.Expert segmentation has been found to be varied by up to 20% [40].Therefore, many automatic and semiautomatic techniques have been proposed.

Survey on Region of Interest (ROI) and segmentation in Radiology Images
The precision of the segmentation method used to segment the region determines the accuracy in identifying anomalies present in a specific region of medical pictures.As a result, the development of an efficient approach for segmenting numerous regions of medical images is required.The existing approaches for segmenting medical images have limitations because most of them only function on a single type of image.As a result, a strategy for distinguishing several regions of various sorts of medical imaging is more significant.The key advantage of adopting an unsupervised segmentation strategy over a supervised approach is that it is not dependent on labelled training data.This is an essential consideration in medical imaging and related applications [41].
Paper elaborates on the process of segmenting the lung volume within image data using grey level thresholding techniques [42].The volume criterion is then used in conjunction with multiple grey-level thresholds to identify a collection of three-dimensional module candidates.
The author of the paper proposed a Texture distinctiveness (TD) lesion segmentation technique [43,44].It captures textural dissimilarity, distribution by breaking an image into smaller parts, and classification as lesion or skin based on TD map.The lesion region has a high degree of distinction, while the skin region has a low degree of distinction.The authors of paper [45] suggest a Fuzzy Logic-based Bitplane algorithm (FLBP) for extracting lungs from the backdrop of a CT lung picture [45][46][47].The collected lungs are then used to identify nodules and undertake additional investigation.Paper [46] proposed a better and automatic approach of extracting skin lesions in a publication.They extracted the ROI region in their technique by integrating pixel and region-based approaches.The authors also used a region-growing strategy to generate results that were related to doctors.In segmenting skin lesions, their system achieves a precision rate of 94.1 percent, a recall rate of 95.3 percent, and a sensitivity rate of 80 percent.
The Paper [48] proposed a unique ultrasonic image segmentation approach based on the curvelet and GLCM features using a spectral clustering algorithm.Gray level co-occurrence matrix-based features and a particle swarm optimization trained feedforward neural network are used.Because the improved GLCM algorithm may improve segmentation accuracy, it has become a frequent way to utilise the optimization algorithm to the optimal segmentation threshold of the multi-threshold algorithm in order to better improve the image segmentation accuracy of the algorithm.
According to the most recent research, imbalanced datasets constitute a key difficulty in the diagnosis of respiratory illnesses using ML approaches.Multi-class imbalance learning on data streams is a relatively unexplored area, with the majority of accessible data stream classification techniques created for the two-class imbalance problem.Some scholars have examined multi-class unbalanced data flow with positive outcomes.However, the problem of uncertainty that may occur in multi-class unbalanced data flow has not been resolved.The amount of data generated in realworld applications is vast, and the complexity is increased.Then there is the issue of notion drift.However, the majority of extant multi-class imbalanced data processing solutions only address one or two of these issues.In this complicated context, more efficient and comprehensive categorization systems must be created.Because early detection of respiratory illness is vital in clinical therapy, locating the Region of Interest (ROI) in radiological images is critical.Real-time radiography images can be low in quality and unclear at times, therefore improving their quality and enhancing their characteristics is crucial in diagnosing respiratory illness at an early stage.
The proposed ML-based technology model will serve as an assisting tool in the medical area by providing solution to image dataset imbalance problem, improvising preprocessing technique to locate ROI and detecting various respiratory ailments using proposed DNN even at the early stages of infection.photos are necessary to construct robust systems.Because of the noisy, inconsistent, and fragmentary data, pre-processing [24] is also required.It is one of the preparatory operations necessary for high step accuracy.Extraneous features or picture areas diminish the model's performance in the case of radiology pictures.As a result, calculating ROI is the most critical step before the training stage.To achieve the goal of pre-processing medical imaging data into improve classification and detection of respiratory illness infection in the human body prior to machine learning algorithms.The suggested system RESDETECT is developed for the identification and analysis of respiratory disease infections in the human body using radiological pictures and is based on machine learning methodologies:

Proposed Methodology
The proposed methodology followed in this research study consists of 5 stages:

Step1: Radiology Image Acquisition
For this study, four medical imaging datasets are taken and a brief detail about these three datasets, namely, CXR images & CT images dataset and RESP dataset are given below.[51] The SARS-CoV-2 The SARS-CoV-2 data set may be seen at https://www.kaggle.com/datasets/plameneduardo/sarscov2-ctscan-dataset [52] 3) RESP Dataset (X-ray images): The complete dataset consisted of labeled 316 chest X-ray images with 102 normal images, 110 bacterial pneumonia images, and 104 viral images of COVID-19 in shown in Table 3 and 60 unlabeled images 20 from each label class are used for the proposed system validation purposes.The entire dataset was acquired from a local hospital that contained chest X-ray images of various conditions.The dataset was quite imbalanced and limited.

Image Data augmentation
One of the most significant difficulties encountered in the chest radiology image classification problem is the scarcity of images, making the datasets unbalanced.We adopted data augmentation to overcome this problem, which encompasses techniques that improve the size and quality of training datasets.In this way, deep learning models can improve learning by enhancing generalization.
Data Augmentation is useful to prevent models from overfitting, if the initial training set is too small, to improve the model accuracy, and to Reduce the operational cost of labelling and cleaning the raw dataset during the literature survey, different data augmentation techniques were studied.By understanding, features and usability proposed system uses four types of data augmentation methods to overcome unbalanced datasets.

Rotation considers transformation matrix RT
The transformation matrix is a 2 x 3 matrix, which is multiplied by [x y 1] where (x,y) are coordinates of the point.The idea of having a 1 is to facilitate shearing, multiplying a 2 x 3 matrix with a 3 x 1 matrix leaves us with a 2 x 1 matrix containing the new point coordinates.The transformation matrix can be also used to get the coordinates of a point after rotation about the center of the image.The transformation matrix for rotating a point by angle looks like.This the point situated at the coordinates (x, y) in the new image is equal to the point (xp, yp) in the input image: This can be used to do a rotation; however, the center of the rotation will be at coordinate (0, 0).To change the coordinates of the center of the rotation, we need to shift the coordinates before the rotation and after the rotation:

Flipping the images horizontally
A flip (mirror effect) is done by reversing the pixels horizontally or vertically.For the horizontal flip, the pixel situated at coordinate (x, y) will be situated at coordinate.

Translation
It considers the translation matrix (translation matrix) using a 2x3 NumPy array.The first row represents the x-shift (horizontal shift), and the second row represents the y-shift (vertical shift)

Image Edge detection
Edge detection is a very important task for healthcare industries, deep learning image classification projects, and Object detection projects.During the literature review, different edge detection techniques like Histogram equalization, Gaussian blurring, Bilateral filter, and Adaptive masking are studied, and the experiment is carried out with different techniques to check the performance of the proposed system and it has been observed the that RESDETECT system performs well with Gaussian blurring edge detection technique which can be presented in below mentioned Table 7.
Figure 2 shows radiology image dataset before data augmentation and Figure 3 displays images after application of data augmentation techniques like rotation, flipping, translation & Gaussian Blurring image edge detection technique to generate augmented images.

Image Data Balancing
In medical imaging datasets, most often the data is collected from various sources, and not all diseases  In the proposed method, oversampling should be done on trainingning data, and not on test data as if test data contains artificially generated images, the classifier results we will see would not be a proper interpretation of how much the network learned.So, the better method is to first split the train and test data and then oversample only the training data.
As displayed in Figure 4, the training set has 81 normal images, 88 bacterial pneumonia images, and 83 viral pneumonia images.So finally, we have a balance in the training dataset.We have 88 images in all three classes displayed in Figure 5. So, we have solved the Class Imbalance Problem with this step.

Image Enhancement and Segmentation using the proposed RDD_ROI algorithm
Image enhancement increases the raw data's quality and informational content before processing.Several levels of compression were utilized to store digitized pictures in this method.GLCM is an excellent discriminator when comparing various images, although this cannot be said for image quality.Ultrasound pictures often exhibit many granular features like texture, and the study of ultrasound images is akin to the challenge of texture analysis.However, the image's textural properties include qualities like smoothness, fitness, & coarseness of a particular pattern.There are several texture feature analyses approaches available.Earlier results show GLCM performs better in image feature extraction.

GLCM (Gray-Level Co-occurrence Matrix)
It is a typical technique for defining texture by analysing spatial correlation properties of grayscale.Due to the repetitive occurrence of grey distribution in spatial position, there would be a special gray connection among 2 pixels at a given distance, i.e., spatial correlation features of grey in the image.A grayscale histogram is a statistical outcome of a single pixel on the image having a given grayscale; however, GLCM is formed by statistically establishing a state in which 2 pixels divided by a specified distance on the image each have a particular grayscale [28].
Take each point (x, y) in the picture (N × N) as well as the point that deviates from it (x + a, y + b) & set the gray value of the point pair to (g1, g2).When a point (x, y) is moved throughout the image, many (g1, g2) values are acquired.K-square describes the sequence of grayscale values and the combination (g1, g2).Count no. of occurrences of each (g1, g2) value & assemble them in a square matrix; next, normalize total no. of (g1, g2) to occurrence probability P (g1, g2); this is referred to as GLCM.Under certain conditions, distance difference values (a, b) may be combined with other variables to produce a joint probability matrix.The texture's periodic distribution defines values (a, b).Finer textures use small difference values like (1, 0), (1, 1), as well as (2, 0); when a = 1 and b = 0, a pixel pair is horizontal, which corresponds to 0° scanning.When a = 0 and b = 1, a pixel pair is vertical, known as 90° scanning.When a = 1 and b = 1, the pixel pair is right diagonal, sometimes referred to as 45-degree scanning.The left diagonal pixel pair corresponds to 135° of scanning when a = -1 and b = 1.This approach transforms (x, y) spatial coordinates to the description of a "gray pair" (g1, g2) based on the likelihood of simultaneous occurrence of two gray levels per pixel, producing GLCM.
The following is an approach for normalizing GLCM (1, 2) = (1,2)  (7) The calculation process of If the picture consists of blocks of pixels with comparable gray values, the diagonal elements of GLCM would have relatively large values; if grey values of image pixels vary locally, the elements that deviate from the diagonal can have larger values.
In the case of respiratory disease diagnosis using radiology images.To locate Region of Interest (ROI) is important, (Respiratory Disease Detection Region of Interest) RDD_ROI algorithm is proposed in image enhancement and segmentation relies on a statistical correlation between neighbouring pixels.Linear dependency is the most basic type of dependency, and the proposed method considers linear dependency of neighbouring pixels of a given kernel window size.Features extracted for important pixels are then given to all pixels in their surrounding a weight matrix hence it reduces overall computation time during the image feature extraction.The feature vector related to every non-key pixel is a weighted sum of feature vectors for all weighting kernel windows containing that pixel.To speed up the calculation and decrease the amount of time spent on it, we compute Gray-level cooccurrence matrix (GLCM) features for essential pixels also then utilize interpolation to estimate GLCM features for other pixels.

f(p) ∑ 𝑎𝑖(𝑝)𝑓(𝑥𝑖)
=1 (9) where, f(p)= feature vector of non-key pixel p xi = is the key pixel located at the center of each of the overlapping weighting windows which include p; ai(p) = weight associated with pixel p in the weighting window centered at xi Before being sent to the classifiers, features are normalized such that they fall within the range 0-1, and the classifiers all get the identical set of features.In this work, the GLCM method extracts seven texture features like homogeneity, correlation, dissimilarity, contrast, entropy, energy, and ASM of the radiology images.

K-means clustering
The clustering of a picture is the most effective image segmentation method.After extracting features, they are grouped into well-separated clusters depending on each image class.The objective of the clustering method is to generate partitioning decisions depending upon an initial set of clusters that is updated after every iteration.K-means is an effective approach for clustering.Based on initial cluster centroids, it is utilized to split related data into groups.This algorithm first selects k data values as initial cluster centres, then calculates the distance among every cluster centre & every data value and assigns it to the nearest cluster, updates the average of each cluster, and repeats until the condition is no longer satisfied.K-means clustering aims to split data into k clusters where every data value belongs to the cluster with the closest mean [30].The algorithm for k-means (in algorithm1), where every cluster's center is denoted by the mean value of objects in a cluster [31].

Algorithm: K-Means Algorithm
Input: k: No. of clusters.

D: Dataset containing n objects.
Output: A set of k clusters.

Method:
Step1.Select at random k objects from D to serve as first cluster centers.
Step 2. Repeat Step 3. Re (assign) every object to the cluster to which it is most closely related depends upon the mean value of objects in the cluster, using the following formula.
Step 4. Determine the average value of every cluster's objects and update cluster means.12. Compute the distance between every data point and the cluster's center.
13. Based on the distance between every data point and cluster, reassign data points to clusters closest to them.Therefore, enhanced and segmented images displayed in Figure 7 shows that, RDD_ROI improvises existing GLCM followed by K-means Clustering for image enhancement and segmentation to prepare any respiratory diseases radiology images ready for training testing and validation, using Deep Neural Network (DNN).

Feature Extraction & Classification using Respiratory Disease Detection_DeepNeural Netwok (RDD_DNN)
The proposed Deep Neural Network model, RDD_DNN custom-built DCNN model designed by understanding importance of DNN layers and setting parameters to achieve efficient performance of model.
RDD_DNN is suitable for image classification tasks with multiple classes.The architecture includes multiple convolutional layers with pooling and dropout, followed by fully connected layers and an output layer with a sigmoid activation function.The model uses Batch Normalization to stabilize training and improve generalization.Figure 8 displays the proposed RDD_DNN model by setting the parameters.Different layers are used in this architecture, and their description discussed below.

Max Pooling Layer
• The pooling layer controls overfitting by slowly decreasing the spatial dimension of representation, no. of parameters, memory footprint, and amount of processing in the network.
• Pooling is a crucial part of CNNs for object identification.

Batch Normalization
• The batch normalization procedure restricts the layer's output to a defined range, imposing zero mean & one standard deviation.
• This acts as regularization, enhancing the neural network's stability and expediting the training process.

ReLu Layer
• ReLU is an acronym for Rectified Linear Unit that uses non-saturating activation function f(x)=max (0, x).
• It imparts nonlinearities to decision function & network without influencing the receptive fields of convolution layers.
• ReLU is frequently favoured over other functions since it trains neural networks multiple times quicker while maintaining generalization accuracy.• "Loss layer" or "loss function" explains how training penalizes the difference between the network's projected output and actual data labels.
• Based on an individual task, different loss functions may be used.

Dropout Layer
• A dropout layer is a regularisation layer initially described in [32].
• It may be implemented on any network layer.
• The primary goal of regularisation is to reduce to zero weights that do not contribute to the accuracy of the model.

Fully Connected (FL) Layer/Dense Layer
• FC layers are utilized to make categorizations.
• The primary goal of this layer is to categorize the original picture based on all the information retrieved from the preceding layers.
• A SoftMax or sigmoid function is used to output target probability after a network.

Working Principle
The working principle of the RDD_DNN model for layer-wise operation is outlined as follows: • First input image of size 256 x 256 is fed to the Input Layer.
• Convolutional layer Conv1 uses 32 filters to generate the features map.
• The model starts with a 2D convolutional layer with 32 filters of size (3, 3), using the ReLU activation function.It employs zero-padding ('same') to keep the spatial dimensions unchanged after the convolution and Batch Normalization to normalize the activations.
• MaxPooling2D layer with pool size (3, 3) is applied to reduce the spatial dimensions and control overfitting through the Dropout layer with a dropout rate of 0.25.
• The model continues with two more sets of Convolutional, Activation, Batch Normalization, MaxPooling, and Dropout layers.The second set has 64 filters, and the third set has 128 filters.
• After these convolutional layers, the model adds a flattened layer to convert the 3D output into a 1D vector.
• A fully connected layer (Dense) with 1024 units and ReLU activation is added.Batch Normalization and Dropout (dropout rate of 0.5) are applied after this layer to further regularize the model.
• The output layer consists of a Dense layer with several neurons equal to the number of classes in the classification problem.It uses the sigmoid activation function to produce probabilities for each class independently.
Deep Learning features of the model helps in the identification of the early stage of respiratory diseases and helps radiology person to label unknown sample and diagnose the disease.

Labelling/ Respiratory Disease Prediction
The final step of RESPDETECT system considers classification/prediction of unknown radiology image samples for the presence or absence of respiratory disease in human body.

Results and Analysis
The experiments have been done using Python programming.These experiments have been done on CXR images & CT scan images and RESPDATASET xray images and analysed results for Covid-19 classification.The section displayed the results of segmented images and classified results of different collected image data.

Experimental Setup
The experiments have been run on the Jupyter Notebook environment.It is an initial step to gather radiology images.In the initial step of the process, a set of X-ray & CT images (infected & non-infected) are extracted from the public database at [50][51][52].The picture obtained is in its raw format.An abundance of noise is detected in the acquired picture.It must be preprocessed to enhance contrast transparency and background noise separation.The dataset is partitioned into 3 parts with 60% training, 20% validation & 20% test set.For the classification model, some hyperparameters like binary cross entropy as loss function, Adam optimizer, 32 batch size & 100 epochs are tuned for the image dataset.This is the process of making predictions using the trained model on unlabelled data.We then measure the accuracy with which the model made these predictions for classification tasks.

Accuracy
Accuracy is a metric that may be used to evaluate classification methods.Informally, accuracy is the proportion of correct predictions made by our model.It is a correlation between the accuracy of value and information

Precision
It measures the proportion of positively categorized occurrences or samples that were accurately classified.Therefore, the precision calculation formula is as follows:

Recall
It is a measure utilized to assess the prediction performance of the classification model on a certain class of interest, commonly named positive.AUC is an acronym for "Area under the ROC Curve."Thus, AUC evaluates the full 2D area under the complete ROC curve (consider integral calculus) from (0,0) to (1,1).(1,1).AUC is a metric that assesses the capacity of the classifier to differentiate between different types of data.The larger the AUC, the greater the model's capacity to distinguish between positive and negative classifications.The receiver Operating Characteristic (ROC) curve shows the performance of the classification model across all classification levels.The graph illustrates two factors: • True Positive Rate (TPR) TPR is a synonym for recall; hence it is described by this formula, which is given below: The formula for FPR is described below A ROC curve compares TPR to FPR at various classification levels.

Results and Comparison
In the analysis of the results, conventional CT scans & CXR pictures were compared with those of COVID-19-affected individuals.This section discusses the preprocessing and classification results after applying the proposed techniques to radiology scan images from datasets.Performance is observed with the RDD_DNN model based on the accuracy and loss curve and other classification results.

Experimental Analysis of RDD_DNN with diffèrent datasets
Experimental evaluation presented in Table 4 and Table 5        In Table 9, we provide the outcomes of the proposed model using models presented in Reference [53,54].On both datasets, including SARS-Cov-2 and CT-Covid, it is possible to notice that EfficientNet-B0 has worse performance when compared to EfficientNet-B3, which is discussed in the literature.We present a deeper network to avoid overfitting while training existing models.When a deeper network (see "Proposed RDD DNN" in Table 4) is used as opposed to existing models, an improvement in all reported figures is noticed.The best model utilizes the Proposed RDD_DNN input size of 256x256.However, EfficientNet-B3 provides good training and validation accuracy with loss results but has not performed better than the proposed RDD_DNN model.
The best-suggested model is compared to other models shown in Table 10.Despite the accuracy results presented for EfficientNetB0 and EfficientNetB3 with the proposed model in table 4 on both datasets of CT scan, both evaluated their models with additional performance parameters to classify the performance of covid detection (COVID (+) and Covid (-)) also, thus, they cannot be directly contrasted to the proposed work.Therefore, references [34] give the best results already found in this setup.Using a slightly smaller model, the work presented here surpasses it in terms of accuracy & F1-score on the SARS-Cov-2 pictures dataset.The existing model provided in Reference [34]  of accuracy & loss.Four total models are compared, including the proposed model on the X-ray images dataset.This comparison shows that the InceptionV3 model acquired more than 90% training and testing accuracy, which is higher than ResNet.Still, it is not better than the Xception model, which has 93.49% training accuracy and 92.93% validation/testing accuracy.However, the results of InceptionV3 and Xception models were performed well by achieving more than 90% accuracy, but it was insufficient; therefore, the proposed RDD_DNN model was proposed and obtained 99.94% training accuracy and 93.97% testing accuracy, which was the top most among all models.

Table 12 represents
the comparative classification results of the proposed RDD_DNN with three existing deep CNN pre-trained models [55] to compare the training and validation results in terms of precision, recall, and f1-score.These findings were compared to the X-ray images dataset.This comparison shows that the InceptionV3 model achieved 91% precision, 90% recall, and f1-score, but the ResNet model achieved 91% f1-score, 90% recall, and precision.Still, it is not well that the Xception model has 93% precision, 92% recall & f1-score.However, the results of the ResNet and Xception model were performed well by achieving more than 90% classification results, but the proposed RDD_DNN model obtained 94% precision, 91% recall, and 93% f1score.This comparison found that the proposed model outperforms existing models in terms of precision & f1score but the recall was not higher compared to these existing models.
From this comparative analysis, it has been summoned that the proposed model beats many existing DL models of CNN in terms of accuracy and other classification parameters for both CT scan images & Xray images.The results of the proposed RDD_DNN model are approx.94% Covid detection rate for X-ray images, but this detection rate was high for CT scan images of Covid, i.e., 95.10%.Thus, overall, we can say the proposed RDD_DNN model achieved 93% to 95% accuracy results for COVID-19 patients' detection.

Conclusions & Future Work
Our research study contributes in identification of importance of data balancing in clinical study with the experimental case study respiratory disease.It has designed and proposed an improvised image data balancing algorithm using data augmentation techniques like rotation, flipping, translation, and edge detection techniques to resolve real-time unbalanced image data in the clinical field.Also, we have contributed in proposition of improvised image enhancement and segmentation in the pre-processing of radiology pictures with the RDD_ROI technique which considers statistical correlation ship between neighbouring pixels and captures image features using GLCM.The GLCM method was used to capture feature values in a Graylevel image and texture features from the matrix and Unsupervised Learning K-mean clustering method to extract foreground and background regions.The experiments have been analysed on the two online radiology image datasets of COVID (x-ray & CT scan images) and one real time radiology image dataset for the research experimental evaluation and validation.The proposed work and experimental results focused on improving the pre-processing of radiology images to detect the spread of respiratory disease.Further, the pre-processed images are trained with our custom built RDD_DNN 28 DNN layers custom model for early detection of the spread of respiratory disease infection in human body by using machine learning approaches to benefit society.Some future research contributions are outlines that can be further implemented to achieve a prediction model of respiratory disease: 1) Analysis and performance measure of the proposed model with existing classification models 2) Improvised prediction results in the detection of respiratory disease infection.
3) Analysis of different respiratory diseases using machine-learning techniques 4) Single technical tool in detecting respiratory disease at an early stage and benefit society.
It is vital to train a model using only the most important features, as extraneous features or picture regions degrade the model's performance.As a result, determining the Region of Interest (ROI) is the most important step prior to the training stage.Segmentation comes in handy for this reason because it can separate the irrelevant and superfluous Images or other types of digital signals, such as X-rays, MRI, computer tomography (CT), positron emission tomography, singlephoton emission computed tomography, electrical Int.Res.J. Multidiscip.Technovation, 6(2) (2024) 133-155 | 137 impedance tomography, and ultrasound, are used to represent a major portion of modern medical data.The collection of massive amounts of such sophisticated image data has resulted in the development of automated medical image processing and analysis.
Researchers developed effective and robust classifiers for distinguishing instances of non-COVID and COVID pneumonia in CT and CXR images using AIbased illness detection approaches.COVID and non-COVID pneumonia Detectors that can categorize and diagnose by drawing bounding boxes on diseased Int.Res.J. Multidiscip.Technovation, 6(2) (2024) 133-155 | 138

Figure 6 .
Figure 6.displayed four Lk×Lk weighting kernel windows (Kwi) with the overlap of length Lo.Here, features of pixel p are the weighted sum of that of xi.

Step 5 . 2 .
Until no changeℎ  = distance (intra) between data point   m as well as the cluster center   , it indicates the distance between the cluster center and their n data points.Intra-term is employed to quantify the density of clusters.Inter-term represents a minimal distance between cluster centroids.Algorithm: Respiratory Disease Detection Region of Interest (RDD_ROI) Input: Radiology images datasets (X-ray images & CT images) Output: Enhanced and segmented radiology Images Transform the input image into a grayscale image 3. Requantize Grayscale Image 4. Image resizing into 256X256 5. Characterize the texture of picture using the GLCM method 6. Generate Feature Matrices for the key pixel value of specified Kernel Windows size 7. Extract features like Correlation, Contrast, Homogeneity, Energy, Variance, and entropy, are features extracted from GLCM matrices Repeat steps 3 to 5 for the remaining neighboring key pixels at a distance of L 8. Calculate the weight associated with non-key pixels 9. Select no. of clusters that correspond to k.For the proposed algorithm, K=2 is considered.a. Cluster 1=Foreground Bright Area b.Cluster 2= Background Dark Area 10.Allocate data points at random to any of the k clusters.11.Next, compute the clusters' centers.

14 .
Calculate the new center of the cluster once again.❖ Repeat steps 10, 11, & 12 until data points no longer alter clusters or until the allotted number of iterations has been reached.Output: Enhanced and segmented radiology images.

Figure 7 .
Figure 7. Enhanced and segmented radiology images after the RDD_ROI algorithm

Figure 9 (
Figure 9 (a) are unknown radiology image samples from Validation dataset and Figure 9(b) displays prediction of class label for each unknown sample.In this way proposed RDD_DNN model able to label unknown samples and detect the presence or absence of respiratory diseases like COVID, Pneumonia etc.
The classification performance report evaluates the quality of a proposed classification model.It works both for binary and multi-class classification of COVID-19 detection.This report is generated for RDD_DNN model or as a comparison.
It represents the harmonic mean of precision & recall.It integrates recall & precision into a single number.We calculate an average of recall and precision for the F1 score.−  =  *  *  ( + )(14)

Figure 11 .Figure 12 .Figure 13 .
Figure 11.Training & validation accuracy & loss of proposed RDD_DNN model on X-ray images Figure.10,11 &12 depict training & validation loss & accuracy analyses of the RDD_DNN model applied to our selected datasets.Fig. 10 (a),11(a) and 12(a) depict model accuracy for the RDD_DNN model as it increases with successive epochs; training accuracy is greater than validation accuracy.Figures 10(b),11(b) and 12(b) depict validation loss for the RDD_DNN model as it decreases with successive epochs, whereas training loss was continuously reduced from 0-100 iterations.Training & validation loss curve results for the proposed model are 0.0204 and 0.5954for CT images; the comparison results found that the proposed model has achieved 95% precision, 93% recall, 94% F1-score, and 0.94 AUC on CT images Figure.13(a) shows the normalized binary confusion matrix on the CT scan test set using the RDD_DNN model to predictCOVID (+) or COVID (-).This matrix plotted between a true label and a predicted label for these two classes of COVID from 0.0 to 1.0 scale.The matrix shows a true positive value of 0.95 for the COVID (+) class and a true negative value of 0.93 for the COVID (-) class.Figure.13(b) demonstrates the normalized confusion matrix of a testing set of the RDD_DNN model to multiclassification on the x-ray images dataset.This matrix plotted among normal, COVID-19, and Pneumonia classes from 0.0 to 1.0.The matrix shows the highest true positive value for the normal class getting 0.85, for the COVID class getting 0.91, and 0.98 for the pneumonia class.Also, Fig. 13(c) demonstrates the normalized confusion matrix of a testing set of the RDD_DNN model to multiclassification on the x-ray images dataset.This matrix plotted among normal, Viral Pneumonia (COVID-19), and Bacterial Pneumonia classes from 0.0 to 1.0.The matrix shows the highest true positive value for the normal class getting 0.89, for the Viral Pneumonia (COVID-19), class getting 0.93, and 0.84 for the Bacterial pneumonia class.

Table 3 .
RESP Dataset image data information

Table 2 .
CT image data information Int. Res.J. Multidiscip.Technovation, 6(2) (2024) 133-155 | 140 Image Segmentation (IS) is a technique of splitting the digital image into discrete sections containing pixels (also called superpixels) with appropriate attributes.Numerous studies have been conducted in the field of IS using clustering.During the literature survey, multiple image segmentation techniques like K-Means Clustering, Adaptive Thresholding, Watershed, and Canny Edge Detection were studied.Our research study proposes Respiratory Disease Detection Region of Interest (RDD_ROI) image segmentation technique, which considers pixel correlations followed by K-means clustering for the image segmentation locate Region of Interest (ROI).The pixels with similar properties are clustered together in image segmentation.RDD_ROI performs better with RESDETECT system compared to other image segmentation techniques.

Table 4 .
presents performance analysis of RDD_DNN with Datasets mentioned above.It acheives 99.12% and 99.94% training accuracy with CT images and Xray images also 99% with RESP Dataset and 95.17%, 93.97% and 93.75% as Validation accuracy respectively Analysis of RDD_DNN performance with all the dataset

Table 5 .
Classification performance results of RDD_DNN with radiology datasets Figure 10.Training & validation accuracy & loss of proposed RDD_DNN model on CT images

Table 6 .
Experimental Analysis of RDD_DNN with Different Image Enchantement and Segmentation Techniques

Table 7 .
Experimental Analysis of RDD_DNN with Different Image Edge detection techniques

Table 8 .
Experimental Analysis of RDD_DNN with RESP_DATA_BALANCE Algorithmes with different radiology datasets

Table 9 .
Comparative analysis of the proposed model with other techniques for CT-scan images

Table 11 .
Comparative analysis of the proposed model with other techniques for X-ray images

Table 12 .
Classification performance results in comparison of X-ray images

Table 8
requires 14,149,480 and 4,779,038 parameters, but the model presented here requires just 58,088,770 parameters.Training & validation loss curve results for the proposed model are 0.0204 and 0.5954for SARS-Cov-2 images; the comparison results found that the proposed model has achieved 95% precision, 93% recall, 94% F1-score and 0.94 AUC on SARS-Cov-2.Table 11 represents the comparison results of the proposed RDD_DNN with existing state-of-art deep learning models to evaluate training & validation results