# Early Diagnosis of Tuberculosis Using Deep Learning Approach for IOT Based Healthcare Applications

Authors: G. Simi Margarat; G. Hemalatha; Annapurna Mishra; H. Shaheen; K. Maheswari; S. Tamijeselvan; U. Pavan Kumar; V. Banupriya; Alachew Wubie Ferede
Journal: Computational Intelligence and Neuroscience
 (2022)

---

## Abstract

In the modern world, Tuberculosis (TB) is regarded as a serious health issue with a high rate of mortality. TB can be cured completely by early diagnosis. For achieving this, one tool utilized is CXR (Chest X-rays) which is used to screen active TB. An enhanced deep learning (DL) model is implemented for automatic Tuberculosis detection. This work undergoes the phases like preprocessing, segmentation, feature extraction, and optimized classification. Initially, the CXR image is preprocessed and segmented using AFCM (Adaptive Fuzzy C means) clustering. Then, feature extraction and several features are extracted. Finally, these features are given to the DL classifier Deep Belief Network (DBN). To improve the classification accuracy and to optimize the DBN, a metaheuristic optimization Adaptive Monarch butterfly optimization (AMBO) algorithm is used. Here, the Deep Belief Network with Adaptive Monarch butterfly optimization (DBN-AMBO) is used for enhancing the accuracy, reducing the error function, and optimizing weighting parameters. The overall implementation is carried out on the Python platform. The overall performance evaluations of the DBN-AMBO were carried out on MC and SC datasets and compared over the other approaches on the basis of certain metrics.


---

## Body

## 1. Introduction

In this world, TB (Tuberculosis) is regarded as one of the highest threats to humans and it is considered the fifth major cause of death [1]. It is caused due to Mycobacterium and it generally affects the lungs. Further, this bacterium can cause other organs like the brain and kidney. There are two types of TB; they are active and latent TB. In active TB, Mycobacterium shows symptoms and it is spread easily; whereas the latent TB, the bacterium stays in the body and does not show any symptoms. Nearly one-fourth of the population has latent TB. During, inhalation, this bacterium is transferred via air from person to person. When proper treatment is given, TB can be cured and prevented using antimicrobial drugs [2]. Based on the 2020 annual report of WHO (World Health Organization) about 11 million people are tested as TB positive. The countries like China, Indonesia, and India are seriously affected due to TB. In addition to this, HIV-affected people died because of TB. Early detection of TB can overcome the advanced explosion of the disease [3]. WHO suggests rapid fundamental tests for TB patients? Hence, automatic CAD (Computer Aided Diagnosis) tools are used for the efficient treatment of TB.Due to the advancement of computer vision approaches and the advancement of digital techniques several CAD techniques are used recently. With this advancement, TB can be detected quickly and overcome further transmission when it is determined early. CAD has the ability to speed up a mass screening in TB-spreading areas. Traditional examination of chest radiograph technique requires a high professional, is time-consuming, and leads to error. Imaging modalities such as CXR (Chest X-rays) and CT (computed tomography) are generally used to detect and screen for TB. However, the modality CT is not must use due to its cost and high radiation dosage Chest X-rays are mainly used for detecting and diagnosing TB. CXR is a fast, low cost and better tool for early diagnosis [4]. The existing research works on Machine learning (ML) and deep learning (DL) models. ML models are based on hand-crafted features and a DL model does not depend on hand-crafted features. Some of the ML classifiers used in the existing research work are EBT (ensemble baggage tree) [5], RF (Random Forest), [6], and SVM (Support Vector Machine) [7]. Certain research works attained excellent results in DL models. This enables DL as an effective model for medical analysis. Particularly, the DL model CNN (Convolutional Neural Network) has shown better results in TB classification [8–11].The major contributions of the proposed work are as follows:(i)
Introduces a fully automated optimized deep learning model for TB segmentation and classification(ii)
Segmentation is carried out by adaptive fuzzyc means (AFCM) clustering and features like texture and shape features are extracted(iii)
For improving the accuracy, optimizing weighting parameters, and reducing the error function, a Deep Belief network (DBN) with Adaptive Monarch butterfly optimization (AMBO) is usedThe rest of the research article is sorted as Section2 depicts recent related works based on TB detection; Section 3 explains the developed TB classification model; Section 4 gives the discussion of evaluated results and the entire work is concluded in Section 5.


## 2. Related Works

Some of the recent related works based on TB classification are listed as follows.Rahman et al. [12] presented a TL (Transfer Learning) with deep CNN for the automatic detection of TB using chest radiographs. The robustness of several CNN approaches was implemented for TB classification. Among the nine models, Chex Net attained better results. The results were evaluated with and without segmentation. It was proved that the classifier with segmentation obtained better outcomes. Win et al. [13] used hybridized feature learning model to screen TB automatically. DeepLabv3 was used for lung segmentation. Then, the optimization PSO (Particle swarm Optimization) was used for selecting features and given as input to optimized SVM. This classifier was used to classify normal and TB. Sahlol et al. [14] used CNN with AEO (Artificial Ecosystem Optimization) for TB detection. Initially, the input image was segmented using MobileNet and, feature selection was carried out by AEO. By this optimization 50,000 features were reduced to 19 and 29 features and classified as TB and Non-TB images.Pavani et al. [15] presented a new automated model for quick detection of pulmonary TB. At first, preprocessing was carried out and Chan-Vese active contour was used for segmenting the images. Several features were extracted and the pertinent feature was taken for classification by the NB classifier. Rahman et al. [16] integrated DL, a pretrained model, and XGBoost classifier to facilitate the quick diagnosis of TB. The major aim of this research work is to enhance recall and specificity of the classification of TB, furthermore, it minimized the training time in classification. Ayaz et al. [17] used a new TB detection model that integrated hand-crafted features with CNN via an ensemble model. Initially, the images were normalized and given to the feature extractor. GF and pretrained models were used to extract hand-crafted and deep features. Two benchmark datasets were used to obtain better ROC results. Dasanayaka and Dissanayake [18] used several CNN models for automatic TB detection using preprocessing and augmentation approaches. The parameters of the DL models were optimized using a genetic algorithm. Finally, this model attained a detection accuracy of 97.1%. Even though these approaches obtained better results, there were some challenges accompanied by these approaches. Optimization techniques used in these approaches suffered from local optima and the error rate was higher. Hence, there is a robust model is essential for TB detection. Among the top 10 infectious disease-related causes of death, tuberculosis (TB) is listed. In this study, convolutional neural networks are used to compare the effectiveness of two approaches for detecting pulmonary tuberculosis from patient chest X-ray pictures (CNN). The combination of different picture preparation techniques that produces the highest accuracy is examined. In addition, a hybrid strategy combining the first statistical computer-aided detection method with neural networks was also researched. On the basis of 394 abnormal photos and 406 abnormal images, simulations have been run. The simulations demonstrate that a clipped region of interest combined with contrast augmentation produces superior outcomes. Even better outcomes are obtained when the photos are further enhanced using the hybrid technique [19–28].


## 3. Proposed Methodology

Recently TB classification is carried out by CXR images. The major processes involved in classification are explained in this section. The datasets like Shenzhen China (SC) and Montgomery Country (MC) are used for the process. Initially, the image is resized and noise is removed using the WF filter. Then, the image is segmented using a clustering technique called AFCM. Then, GF, shape, texture, and HoG features are extracted. Finally, a DL model DBN-AMBO is used to classify the image as normal and TB. Figure1 delineates the framework of the proposed TB classification model.Figure 1
A framework of the proposed TB classification model.


### 3.1. Preprocessing

It is an initial phase in image processing. This process is used for removing noise and eliminating unnecessary information. Initially, the input images are resized to 512 × 512 pixels, and this resized image is used for further processing. Then, wiener filtering (WF) is used for removing the noise in a resized image. This filter eliminated an additive noise and removes blurriness at the same time. WF is optimal on the basis of MSE (mean square error). WF is a linear representation of a primary image. WF in Fourier transform (FT) is represented as follows [3]:(1)WFfa,fb=Gfa,fbTzzfa,fbGfa,fb2Tzzfa,fb+Tmmfa,fb,where Gfa,fbis blur filter,Tzzfa,fbis a power spectrum of an image and Tmmfa,fbis an additive noise.


### 3.2. Segmentation

The preprocessed image is segmented using AFCM. The dataset ofm samples are V=v1,v2....vm and it is partitioned into cjclusters. The objective solution of FCM is [7](2)KnU,V=∑l=1cj∑p=1mulpmdlp2,where ulpand dlpare the membership degree matrix and Euclidean distance of lthsample and pthcentre of cluster. dlp=yl−vpThe membership degree matrix should satisfy the following conditions:(3)∑l=1cjulp=1,l=1,2,....m,0≤ulp≤1,l=1,2,....m,p=1,2....cj,0<ulp<1,p=1,2....cj.According to Lagrange multiplier,Uand V are computed using the following expression [5]:(4)ulp=1∑l=1cjdlp/djp2/n−1,vp=∑p=1mulpnyp∑p=1mulpn.However, the normal FCM has the following limitations it needs an initial matrix of membership and the number of clusters to be declared theoretically. It is largely sensitive to the matrix of membership and number of clusters, therefore FCM generates unstable outcomes. In AFCM, sample densityρjand density rate γare initialized. The parameter γis utilized for adjusting the potential cluster of centres. In this, ρjis defined as follows:(5)ρj=χDlp−Dbo,where χy=1wheny<00elsewhere, Dlp is a Euclidean distance of lthsample and pthcentre of cluster and Dco is a break off distance. Hence, by using this clustering the TB images are segmented efficiently.


### 3.3. Feature Extraction

Features are used to represent the images in scalar or vector form. Classifiers can not verify an image directly rather than different features like texture and shape features are given as input to the network. In this work, feature extraction is carried out using GF, shape features, and HOG. The explanation about every technique is explained in the following section.


#### 3.3.1. Gaussian Function (GF)

2D GF is utilized for defining the Gaussian function inGfa,b spatial coordination domain. Let gx,yis a FT of Gfa,b as frequency component function and it is represented as follows [10]:(6)Gfa,b,θ,ω,α,μ=12πσaσbexp−12a2σ2+b2σ2+2πiμa,where θ and ω are the orientation and frequency of GF. In GF, Gaussian is convoluted in the Gaussian window and FT is managed using α, μis GF’s centre frequency. Then the FT of gx,y is represented as follows:(7)gx,y,θ,ω,α,μ=exp−12a−μ2σx2+b2σy2,where σx and σyare the constant distance from the Gaussian properties. a=a′cosθ+b′sinθ, b=−b′cosθ+b′cosθ. According to θ value several filters are obtained. θ value is varied from 45∘for obtaining text features.


#### 3.3.2. Shape Features

The flowing features like perimeter, area, Roundness, Eccentricity, Major and minor axes, Ratio of elongation, Solidity, and Equivalent diameter are extracted [4].(1) PerimeterP. It is a number of pixels in the border of object.(2) AreaA. It is a space occupied using object on the surface of plane.(3) RoundnessR. It is a computation of how closely an object shape to that of circle and it is given as follows:(8)R=4π×AP2.(4) EccentricityE. This parameter does not have roundness of the object which scales from 0 to 1.(5) Major and minor axes. These are the imaginary ellipse which limits the object.(6) Ratio of elongationRe. It is a ratio of lengths of major and minor axes and it is defined as follows:(9)Re=xy,where x and yare the lengths of minor and major axes.(7) SolidityS. It is a ratio among A of binary image and convex hull area. It is expressed as follows:(10)S=AAcon.hell.(8) Equivalent diameterEd: It is defined as diameter of the circle with a similar area as an object.


#### 3.3.3. HOG

The descriptor in HOG same as the Scale-invariant feature transform (SIFT) and it is obtained in four stages. They are gradient computation, HOG by cells, contrast normalization, and obtaining HOG descriptors. The features of HOG show the presence of TB in the lungs. Let the gradient in pixela,b in an image Ij is represented as a mask convolution with an original image.(11)Gaa,b=Maska×Ia,b,Gba,b=Maskb×Ia,b.The gradient magnitude and direction in every pixela,bare expressed as follows:(12)Ga,b=Gaa,b2Gba,b2,(13)φa,b=arctanGaa,bGba,b.Finally, all the three features are integrated and it is given to the classifier. There are 55 features extracted from these features.


### 3.4. Classification

The extracted features are provided as input to the DL classifier DBN. It has input, hidden, and output layers. There is a deep interconnection between input and hidden neurons. The interconnections among hidden and visible neurons are exclusive and symmetric. Since the output of neurons is stochastic in the Boltzmann network is probabilistic. The output is expressed in Equation (14) and the function of the sigmoid is expressed in the following equation:(14)Ps⟶ξ=11+exp−ξ/sp,(15)QR⟶=1,when1−Ps⟶ξ,0,whenPs⟶ξ.The deterministic model of stochastic method [8] is expressed as follows:(16)limsp⟶0Ps⟶ξ=limsp⟶011+exp−ξ/sp=0,whenξ<0,1/2,whenξ=01,whenξ>0,,where sp is a pseudotemperature? Figure 2 depicts the structure of DBN, in which the process of feature extraction is carried out by RBM (Restricted Boltzmann machine) and classified by MLP (Multilayer proton). The mathematical modeling which expresses the Boltzmann machine energy to form a binary phase is and it is expressed as follows:(17)Δebc=∑mbcum,c+φc,where ulis weight of every neuron and φ is bias.Figure 2
Classification using DBN-AMBO.The energy expression on the basis of integration of hiddeng,hand visible neurons are provided in equations (18)–(20).(18)Eg,h=∑c,mgchmum,c−∑ckcgc−∑mWmhc,(19)ΔEgc,h⟶=∑mgchm+kc,(20)ΔEhc,g⟶=∑mgcgc+Wc,where gc is binary phase of c, Wm is a binary phase of mhidden unit, kcand Wcare the bias provided to the network. For every pair of hidden and visible vector hi→,g→, possibility provided to RBM is given as follows:(21)Chi→,g→=1pfexp−Eg→,h→.This approach utilizes CD (contrastive divergence) and its procedure is: training samples are selected and given to visible neurons. Then, find the possibility of hidden neurons and determine the hidden state. Obtain the weight using(22)Δw=αϕ+−ϕ−,where αis a learning rate, ϕ+and −ϕ− are the positive and negative gradients? Every neuron error in mis given as follows:(23)ems=N→s−R→s,where N⟶sand R⟶s are the input and output vectors. Although DBN has optimized arrangements for classification, several layers are attained experimentally, which degrades its accuracy. So the output achieved by DBN is hybridized with AMBO for enhancing the efficiency of the system. Figure 2 indicates the classification of TB using DBN-AMBO. In MBO [29], butterflies positioned at land 1 and 2 are known as subpopulation SP1 and subpopulation SP2. It is computed on the basis of parameters s that are MS1Ceils×MS and MS2MS−MS1. The individuals of butterflies in SP1 is operated by migration parameter. It is represented as follows:(24)zk,lt+1=zr1,lt,where zr1,ltis an lthelement of zr1. Random position r1is chosen from SP1. When r≤s,zk,lt+1is produced using Equation (24). When r>s,zk,lt+1is produced using the following equation:(25)zk,lt+1=zr2,lt,where zr2,ltis an lthelement of zr2. Random position r2is chosen from SP2. Overall component in butterfly m, when rand≤s is given as follows:(26)zm,lt+1=zbest,,lt,where zm,lt+1 is an lthelement of zm at t+1. zbest,,ltis lthelement of best butterfly. When rand>s is given as follows:(27)zm,lt+1=zr3,,lt,where zr3,ltis an lthelement of zr3when rand>ARBt is further given as follows:(28)zm,lt+1=zm,lt+1+δazm−0.5,where ARBis adjusting rate of butterfly and azmwalking stage of the butterfly and δ is a weighting factor. However, this optimization suffered from slow convergence and was trapped by local optima. Hence, the crossover operator is introduced to improve the accuracy and to reduce error. In AMBO new individual zvt+1is given as follows:(29)zv2t+1=γ×Co+zv1t+1×1−Co,where Coand γare crossover mutation and reflection coefficient. These two parameters improve the performance of TB detection.


## 3.1. Preprocessing

It is an initial phase in image processing. This process is used for removing noise and eliminating unnecessary information. Initially, the input images are resized to 512 × 512 pixels, and this resized image is used for further processing. Then, wiener filtering (WF) is used for removing the noise in a resized image. This filter eliminated an additive noise and removes blurriness at the same time. WF is optimal on the basis of MSE (mean square error). WF is a linear representation of a primary image. WF in Fourier transform (FT) is represented as follows [3]:(1)WFfa,fb=Gfa,fbTzzfa,fbGfa,fb2Tzzfa,fb+Tmmfa,fb,where Gfa,fbis blur filter,Tzzfa,fbis a power spectrum of an image and Tmmfa,fbis an additive noise.


## 3.2. Segmentation

The preprocessed image is segmented using AFCM. The dataset ofm samples are V=v1,v2....vm and it is partitioned into cjclusters. The objective solution of FCM is [7](2)KnU,V=∑l=1cj∑p=1mulpmdlp2,where ulpand dlpare the membership degree matrix and Euclidean distance of lthsample and pthcentre of cluster. dlp=yl−vpThe membership degree matrix should satisfy the following conditions:(3)∑l=1cjulp=1,l=1,2,....m,0≤ulp≤1,l=1,2,....m,p=1,2....cj,0<ulp<1,p=1,2....cj.According to Lagrange multiplier,Uand V are computed using the following expression [5]:(4)ulp=1∑l=1cjdlp/djp2/n−1,vp=∑p=1mulpnyp∑p=1mulpn.However, the normal FCM has the following limitations it needs an initial matrix of membership and the number of clusters to be declared theoretically. It is largely sensitive to the matrix of membership and number of clusters, therefore FCM generates unstable outcomes. In AFCM, sample densityρjand density rate γare initialized. The parameter γis utilized for adjusting the potential cluster of centres. In this, ρjis defined as follows:(5)ρj=χDlp−Dbo,where χy=1wheny<00elsewhere, Dlp is a Euclidean distance of lthsample and pthcentre of cluster and Dco is a break off distance. Hence, by using this clustering the TB images are segmented efficiently.


## 3.3. Feature Extraction

Features are used to represent the images in scalar or vector form. Classifiers can not verify an image directly rather than different features like texture and shape features are given as input to the network. In this work, feature extraction is carried out using GF, shape features, and HOG. The explanation about every technique is explained in the following section.


### 3.3.1. Gaussian Function (GF)

2D GF is utilized for defining the Gaussian function inGfa,b spatial coordination domain. Let gx,yis a FT of Gfa,b as frequency component function and it is represented as follows [10]:(6)Gfa,b,θ,ω,α,μ=12πσaσbexp−12a2σ2+b2σ2+2πiμa,where θ and ω are the orientation and frequency of GF. In GF, Gaussian is convoluted in the Gaussian window and FT is managed using α, μis GF’s centre frequency. Then the FT of gx,y is represented as follows:(7)gx,y,θ,ω,α,μ=exp−12a−μ2σx2+b2σy2,where σx and σyare the constant distance from the Gaussian properties. a=a′cosθ+b′sinθ, b=−b′cosθ+b′cosθ. According to θ value several filters are obtained. θ value is varied from 45∘for obtaining text features.


### 3.3.2. Shape Features

The flowing features like perimeter, area, Roundness, Eccentricity, Major and minor axes, Ratio of elongation, Solidity, and Equivalent diameter are extracted [4].(1) PerimeterP. It is a number of pixels in the border of object.(2) AreaA. It is a space occupied using object on the surface of plane.(3) RoundnessR. It is a computation of how closely an object shape to that of circle and it is given as follows:(8)R=4π×AP2.(4) EccentricityE. This parameter does not have roundness of the object which scales from 0 to 1.(5) Major and minor axes. These are the imaginary ellipse which limits the object.(6) Ratio of elongationRe. It is a ratio of lengths of major and minor axes and it is defined as follows:(9)Re=xy,where x and yare the lengths of minor and major axes.(7) SolidityS. It is a ratio among A of binary image and convex hull area. It is expressed as follows:(10)S=AAcon.hell.(8) Equivalent diameterEd: It is defined as diameter of the circle with a similar area as an object.


### 3.3.3. HOG

The descriptor in HOG same as the Scale-invariant feature transform (SIFT) and it is obtained in four stages. They are gradient computation, HOG by cells, contrast normalization, and obtaining HOG descriptors. The features of HOG show the presence of TB in the lungs. Let the gradient in pixela,b in an image Ij is represented as a mask convolution with an original image.(11)Gaa,b=Maska×Ia,b,Gba,b=Maskb×Ia,b.The gradient magnitude and direction in every pixela,bare expressed as follows:(12)Ga,b=Gaa,b2Gba,b2,(13)φa,b=arctanGaa,bGba,b.Finally, all the three features are integrated and it is given to the classifier. There are 55 features extracted from these features.


## 3.3.1. Gaussian Function (GF)

2D GF is utilized for defining the Gaussian function inGfa,b spatial coordination domain. Let gx,yis a FT of Gfa,b as frequency component function and it is represented as follows [10]:(6)Gfa,b,θ,ω,α,μ=12πσaσbexp−12a2σ2+b2σ2+2πiμa,where θ and ω are the orientation and frequency of GF. In GF, Gaussian is convoluted in the Gaussian window and FT is managed using α, μis GF’s centre frequency. Then the FT of gx,y is represented as follows:(7)gx,y,θ,ω,α,μ=exp−12a−μ2σx2+b2σy2,where σx and σyare the constant distance from the Gaussian properties. a=a′cosθ+b′sinθ, b=−b′cosθ+b′cosθ. According to θ value several filters are obtained. θ value is varied from 45∘for obtaining text features.


## 3.3.2. Shape Features

The flowing features like perimeter, area, Roundness, Eccentricity, Major and minor axes, Ratio of elongation, Solidity, and Equivalent diameter are extracted [4].(1) PerimeterP. It is a number of pixels in the border of object.(2) AreaA. It is a space occupied using object on the surface of plane.(3) RoundnessR. It is a computation of how closely an object shape to that of circle and it is given as follows:(8)R=4π×AP2.(4) EccentricityE. This parameter does not have roundness of the object which scales from 0 to 1.(5) Major and minor axes. These are the imaginary ellipse which limits the object.(6) Ratio of elongationRe. It is a ratio of lengths of major and minor axes and it is defined as follows:(9)Re=xy,where x and yare the lengths of minor and major axes.(7) SolidityS. It is a ratio among A of binary image and convex hull area. It is expressed as follows:(10)S=AAcon.hell.(8) Equivalent diameterEd: It is defined as diameter of the circle with a similar area as an object.


## 3.3.3. HOG

The descriptor in HOG same as the Scale-invariant feature transform (SIFT) and it is obtained in four stages. They are gradient computation, HOG by cells, contrast normalization, and obtaining HOG descriptors. The features of HOG show the presence of TB in the lungs. Let the gradient in pixela,b in an image Ij is represented as a mask convolution with an original image.(11)Gaa,b=Maska×Ia,b,Gba,b=Maskb×Ia,b.The gradient magnitude and direction in every pixela,bare expressed as follows:(12)Ga,b=Gaa,b2Gba,b2,(13)φa,b=arctanGaa,bGba,b.Finally, all the three features are integrated and it is given to the classifier. There are 55 features extracted from these features.


## 3.4. Classification

The extracted features are provided as input to the DL classifier DBN. It has input, hidden, and output layers. There is a deep interconnection between input and hidden neurons. The interconnections among hidden and visible neurons are exclusive and symmetric. Since the output of neurons is stochastic in the Boltzmann network is probabilistic. The output is expressed in Equation (14) and the function of the sigmoid is expressed in the following equation:(14)Ps⟶ξ=11+exp−ξ/sp,(15)QR⟶=1,when1−Ps⟶ξ,0,whenPs⟶ξ.The deterministic model of stochastic method [8] is expressed as follows:(16)limsp⟶0Ps⟶ξ=limsp⟶011+exp−ξ/sp=0,whenξ<0,1/2,whenξ=01,whenξ>0,,where sp is a pseudotemperature? Figure 2 depicts the structure of DBN, in which the process of feature extraction is carried out by RBM (Restricted Boltzmann machine) and classified by MLP (Multilayer proton). The mathematical modeling which expresses the Boltzmann machine energy to form a binary phase is and it is expressed as follows:(17)Δebc=∑mbcum,c+φc,where ulis weight of every neuron and φ is bias.Figure 2
Classification using DBN-AMBO.The energy expression on the basis of integration of hiddeng,hand visible neurons are provided in equations (18)–(20).(18)Eg,h=∑c,mgchmum,c−∑ckcgc−∑mWmhc,(19)ΔEgc,h⟶=∑mgchm+kc,(20)ΔEhc,g⟶=∑mgcgc+Wc,where gc is binary phase of c, Wm is a binary phase of mhidden unit, kcand Wcare the bias provided to the network. For every pair of hidden and visible vector hi→,g→, possibility provided to RBM is given as follows:(21)Chi→,g→=1pfexp−Eg→,h→.This approach utilizes CD (contrastive divergence) and its procedure is: training samples are selected and given to visible neurons. Then, find the possibility of hidden neurons and determine the hidden state. Obtain the weight using(22)Δw=αϕ+−ϕ−,where αis a learning rate, ϕ+and −ϕ− are the positive and negative gradients? Every neuron error in mis given as follows:(23)ems=N→s−R→s,where N⟶sand R⟶s are the input and output vectors. Although DBN has optimized arrangements for classification, several layers are attained experimentally, which degrades its accuracy. So the output achieved by DBN is hybridized with AMBO for enhancing the efficiency of the system. Figure 2 indicates the classification of TB using DBN-AMBO. In MBO [29], butterflies positioned at land 1 and 2 are known as subpopulation SP1 and subpopulation SP2. It is computed on the basis of parameters s that are MS1Ceils×MS and MS2MS−MS1. The individuals of butterflies in SP1 is operated by migration parameter. It is represented as follows:(24)zk,lt+1=zr1,lt,where zr1,ltis an lthelement of zr1. Random position r1is chosen from SP1. When r≤s,zk,lt+1is produced using Equation (24). When r>s,zk,lt+1is produced using the following equation:(25)zk,lt+1=zr2,lt,where zr2,ltis an lthelement of zr2. Random position r2is chosen from SP2. Overall component in butterfly m, when rand≤s is given as follows:(26)zm,lt+1=zbest,,lt,where zm,lt+1 is an lthelement of zm at t+1. zbest,,ltis lthelement of best butterfly. When rand>s is given as follows:(27)zm,lt+1=zr3,,lt,where zr3,ltis an lthelement of zr3when rand>ARBt is further given as follows:(28)zm,lt+1=zm,lt+1+δazm−0.5,where ARBis adjusting rate of butterfly and azmwalking stage of the butterfly and δ is a weighting factor. However, this optimization suffered from slow convergence and was trapped by local optima. Hence, the crossover operator is introduced to improve the accuracy and to reduce error. In AMBO new individual zvt+1is given as follows:(29)zv2t+1=γ×Co+zv1t+1×1−Co,where Coand γare crossover mutation and reflection coefficient. These two parameters improve the performance of TB detection.


## 4. Results and Discussions

This analysis and validation of the DBN-AMBO are depicted in this section. The overall evaluation is carried out on a system with an Intel Core i5 CPU, 8 GB RAM, and 3.0 GHz speed. The overall evaluation is carried out in PYTHON 3.6 platform. The efficiency of the proposed TB classifier is compared against the traditional approaches like RNN (Recurrent Neural Network), CNN, GAN (Generative Adversarial Networks), and DBN. Furthermore, to test the efficiency of optimization techniques, the proposed model is compared with several optimization techniques.


### 4.1. Dataset Details

Shenzhen China (SC) [30] dataset was obtained by Shenzhen number 3 hospital. It comprises 662 frontal CXR images of TB positive images (335) and TB positive images (327). This dataset has images of all age groups of people and these images are in png format which is 0 for non-TB and 1 for TB images. The resolution changes from 998 × 1130 to 3001 × 3001. Montgomery Country (MC) Dataset of frontal CXR images was given by the Health and Human service department of the USA. It comprises 138 frontal CXR images. Among them, 58 are TB positive images and 80 are TB positive images. These images are in png format and their resolution is 4892 × 4020 [31–33].


### 4.2. Performance Measures

It is essential to implement the performance of classification in the studies of image classification. Otherwise, performance will remain incomplete. There are several performance metrics used for classification. In this work, the metrics like Accuracy (A), Recall ®, specificity (S), FNR (False Negative Rate), Precision (P), and NPV (negative predictive value) are measured. The introduced DBN-AMBO evaluated by True positive (exactly classified as TB)Tp, False positive (wrongly classified as TB) Fp, True negative (exactly classified as normal) Tn, and False negative (count of TB cases missed) Fn.


#### 4.2.1. Accuracy

One parameter for assessing classification models is accuracy. Informally, accuracy is the percentage of accurate predictions made by our model.(30)A=Tp+TnTp+Tn+Fp+Fn.


#### 4.2.2. Recall

The recall is determined by dividing the total number of Positive samples by the number of Positive samples that were correctly identified as Positive. The model’s capacity to identify positive samples is gauged by the recall. More positive samples are found when the recall is higher.(31)R=TpTp+Fn.


#### 4.2.3. Specificity

The percentage of true negatives that the model correctly predicts is known as specificity.(32)S=TnTn+Fp.


#### 4.2.4. Precision

Precision, or the degree of a successful prediction made by the model, is one measure of the model’s performance. Precision is calculated by dividing the total number of positive predictions by the proportion of genuine positives (i.e., the number of true positives plus the number of false positives).(33)P=TpTp+Fp.In Figure3 illustrates the qualitative analysis of experimental results of the MC Dataset. It shows the preprocessed, segmented images, and classified images.Figure 3
Qualitative analysis: (a) input image, (b) preprocessed image, (c) segmented image, and (d) classification.
(a)(b)(c)(d)Table1 represents the entire performance of the proposed DBN-AMBO with various DL techniques. The approaches like CNN, RNN, GAN, and DBN are exploited for comparison. It is validated from the table that the proposed DBN-AMBO approach obtained better performance in all performance metrics. Specifically, the value of NPV is found to be very low, hence it is efficiently utilized in TB classification.Table 1
Performance of proposed DBN-AMBO with other classifiers.
DatasetsPerformanceRNNCNNGANDBNDBN-AMBOShenzhen ChinaAccuracy0.8950.7920.9720.9730.992Precision0.8930.9270.9700.9810.978Recall0.9350.8580.9320.9340.954Specificity0.9610.7180.8560.9610.991NPV0.2140.3470.1750.2830.06FNR0.8500.9230.9710.8560.998Montgomery CountryAccuracy0.9830.8940.9520.9150.987Precision0.8530.9140.9060.9130.966Recall0.9530.8840.9260.9540.989Specificity0.8620.7760.8710.9640.994NPV0.2210.3430.0740.3270.02FNR0.8520.9130.9650.9310.972In Table2 indicates the entire performance of the DBN-AMBO with recent optimization techniques on the two datasets. DBN-AMBO is compared over DBN-EPO (Emperor penguin optimization), DBN-BOA (Butterfly optimization Algorithm), and DBN- MBO. The accuracy of DBN-AMBO is 9.2%, 5.2%, and 3.1% superior over DBN-BOA, DBN-EPO, and DBN- MBO, respectively.Table 2
Performance of proposed DBN-AMBO with other classifiers.
DatasetsPerformanceDBN-BOADBN-EPODBN-MBODBN-AMBOShenzhen ChinaAccuracy0.8520.9270.9310.992Precision0.8710.9520.9670.978Recall0.9150.9470.9240.954Specificity0.9210.8710.9410.991NPV0.2010.1650.2750.06FNR0.8530.9610.8520.998Montgomery CountryAccuracy0.9740.9220.9140.987Precision0.8250.9050.9350.966Recall0.8460.9280.9410.989Specificity0.8620.8110.7450.994NPV0.1410.0650.8130.02FNR0.8820.8350.9230.972The CM (confusion matrix) of two datasets for TB classification is provided in Figure4. This metric is used for evaluating the classification efficiency of the proposed DBN-AMBO. It is the comparison of predicted and true labels in a classification. In a normal case, both datasets provided better outcomes.Figure 4
CM: (a) SC dataset and (b) MC dataset.
(a)(b)Table3 illustrates the comparison of the running time of several techniques. It is noted from the table that the computational time of the DBN-AMBO is very less when compared with other techniques. That is proposed that DBN-AMBO takes only 0.426 s to complete the implementation process.Table 3
Execution time of various approaches
MethodsComputation time (s)DBN1.52GAN3.242RNN2.75CNN1.348DBN-BOA1.771DBN-EPO2.721DBN-MBO1.74DBN-AMBO0.426Table4 represents the comparison of the performance with recently published works. When compared to these models, the proposed DBN-AMBO attained better results. This is due to the optimal weight selection by AMBO. This optimizer reduces the loss function and enhances the accuracy.Table 4
Comparison of the performance with recently published works.
MethodsAccuracyRecallSpecificityPavani et al. [15]0.9550.9330.98Islam et al. [12]0.900.880.92Santhosh et al. [6]0.860.900.80Rahman et al. [16]0.9640.966—Proposed (Shenzhen China)0.9920.9540.991Proposed (Montgomery Country)0.9870.9890.994


## 4.1. Dataset Details

Shenzhen China (SC) [30] dataset was obtained by Shenzhen number 3 hospital. It comprises 662 frontal CXR images of TB positive images (335) and TB positive images (327). This dataset has images of all age groups of people and these images are in png format which is 0 for non-TB and 1 for TB images. The resolution changes from 998 × 1130 to 3001 × 3001. Montgomery Country (MC) Dataset of frontal CXR images was given by the Health and Human service department of the USA. It comprises 138 frontal CXR images. Among them, 58 are TB positive images and 80 are TB positive images. These images are in png format and their resolution is 4892 × 4020 [31–33].


## 4.2. Performance Measures

It is essential to implement the performance of classification in the studies of image classification. Otherwise, performance will remain incomplete. There are several performance metrics used for classification. In this work, the metrics like Accuracy (A), Recall ®, specificity (S), FNR (False Negative Rate), Precision (P), and NPV (negative predictive value) are measured. The introduced DBN-AMBO evaluated by True positive (exactly classified as TB)Tp, False positive (wrongly classified as TB) Fp, True negative (exactly classified as normal) Tn, and False negative (count of TB cases missed) Fn.


### 4.2.1. Accuracy

One parameter for assessing classification models is accuracy. Informally, accuracy is the percentage of accurate predictions made by our model.(30)A=Tp+TnTp+Tn+Fp+Fn.


### 4.2.2. Recall

The recall is determined by dividing the total number of Positive samples by the number of Positive samples that were correctly identified as Positive. The model’s capacity to identify positive samples is gauged by the recall. More positive samples are found when the recall is higher.(31)R=TpTp+Fn.


### 4.2.3. Specificity

The percentage of true negatives that the model correctly predicts is known as specificity.(32)S=TnTn+Fp.


### 4.2.4. Precision

Precision, or the degree of a successful prediction made by the model, is one measure of the model’s performance. Precision is calculated by dividing the total number of positive predictions by the proportion of genuine positives (i.e., the number of true positives plus the number of false positives).(33)P=TpTp+Fp.In Figure3 illustrates the qualitative analysis of experimental results of the MC Dataset. It shows the preprocessed, segmented images, and classified images.Figure 3
Qualitative analysis: (a) input image, (b) preprocessed image, (c) segmented image, and (d) classification.
(a)(b)(c)(d)Table1 represents the entire performance of the proposed DBN-AMBO with various DL techniques. The approaches like CNN, RNN, GAN, and DBN are exploited for comparison. It is validated from the table that the proposed DBN-AMBO approach obtained better performance in all performance metrics. Specifically, the value of NPV is found to be very low, hence it is efficiently utilized in TB classification.Table 1
Performance of proposed DBN-AMBO with other classifiers.
DatasetsPerformanceRNNCNNGANDBNDBN-AMBOShenzhen ChinaAccuracy0.8950.7920.9720.9730.992Precision0.8930.9270.9700.9810.978Recall0.9350.8580.9320.9340.954Specificity0.9610.7180.8560.9610.991NPV0.2140.3470.1750.2830.06FNR0.8500.9230.9710.8560.998Montgomery CountryAccuracy0.9830.8940.9520.9150.987Precision0.8530.9140.9060.9130.966Recall0.9530.8840.9260.9540.989Specificity0.8620.7760.8710.9640.994NPV0.2210.3430.0740.3270.02FNR0.8520.9130.9650.9310.972In Table2 indicates the entire performance of the DBN-AMBO with recent optimization techniques on the two datasets. DBN-AMBO is compared over DBN-EPO (Emperor penguin optimization), DBN-BOA (Butterfly optimization Algorithm), and DBN- MBO. The accuracy of DBN-AMBO is 9.2%, 5.2%, and 3.1% superior over DBN-BOA, DBN-EPO, and DBN- MBO, respectively.Table 2
Performance of proposed DBN-AMBO with other classifiers.
DatasetsPerformanceDBN-BOADBN-EPODBN-MBODBN-AMBOShenzhen ChinaAccuracy0.8520.9270.9310.992Precision0.8710.9520.9670.978Recall0.9150.9470.9240.954Specificity0.9210.8710.9410.991NPV0.2010.1650.2750.06FNR0.8530.9610.8520.998Montgomery CountryAccuracy0.9740.9220.9140.987Precision0.8250.9050.9350.966Recall0.8460.9280.9410.989Specificity0.8620.8110.7450.994NPV0.1410.0650.8130.02FNR0.8820.8350.9230.972The CM (confusion matrix) of two datasets for TB classification is provided in Figure4. This metric is used for evaluating the classification efficiency of the proposed DBN-AMBO. It is the comparison of predicted and true labels in a classification. In a normal case, both datasets provided better outcomes.Figure 4
CM: (a) SC dataset and (b) MC dataset.
(a)(b)Table3 illustrates the comparison of the running time of several techniques. It is noted from the table that the computational time of the DBN-AMBO is very less when compared with other techniques. That is proposed that DBN-AMBO takes only 0.426 s to complete the implementation process.Table 3
Execution time of various approaches
MethodsComputation time (s)DBN1.52GAN3.242RNN2.75CNN1.348DBN-BOA1.771DBN-EPO2.721DBN-MBO1.74DBN-AMBO0.426Table4 represents the comparison of the performance with recently published works. When compared to these models, the proposed DBN-AMBO attained better results. This is due to the optimal weight selection by AMBO. This optimizer reduces the loss function and enhances the accuracy.Table 4
Comparison of the performance with recently published works.
MethodsAccuracyRecallSpecificityPavani et al. [15]0.9550.9330.98Islam et al. [12]0.900.880.92Santhosh et al. [6]0.860.900.80Rahman et al. [16]0.9640.966—Proposed (Shenzhen China)0.9920.9540.991Proposed (Montgomery Country)0.9870.9890.994


## 4.2.1. Accuracy

One parameter for assessing classification models is accuracy. Informally, accuracy is the percentage of accurate predictions made by our model.(30)A=Tp+TnTp+Tn+Fp+Fn.


## 4.2.2. Recall

The recall is determined by dividing the total number of Positive samples by the number of Positive samples that were correctly identified as Positive. The model’s capacity to identify positive samples is gauged by the recall. More positive samples are found when the recall is higher.(31)R=TpTp+Fn.


## 4.2.3. Specificity

The percentage of true negatives that the model correctly predicts is known as specificity.(32)S=TnTn+Fp.


## 4.2.4. Precision

Precision, or the degree of a successful prediction made by the model, is one measure of the model’s performance. Precision is calculated by dividing the total number of positive predictions by the proportion of genuine positives (i.e., the number of true positives plus the number of false positives).(33)P=TpTp+Fp.In Figure3 illustrates the qualitative analysis of experimental results of the MC Dataset. It shows the preprocessed, segmented images, and classified images.Figure 3
Qualitative analysis: (a) input image, (b) preprocessed image, (c) segmented image, and (d) classification.
(a)(b)(c)(d)Table1 represents the entire performance of the proposed DBN-AMBO with various DL techniques. The approaches like CNN, RNN, GAN, and DBN are exploited for comparison. It is validated from the table that the proposed DBN-AMBO approach obtained better performance in all performance metrics. Specifically, the value of NPV is found to be very low, hence it is efficiently utilized in TB classification.Table 1
Performance of proposed DBN-AMBO with other classifiers.
DatasetsPerformanceRNNCNNGANDBNDBN-AMBOShenzhen ChinaAccuracy0.8950.7920.9720.9730.992Precision0.8930.9270.9700.9810.978Recall0.9350.8580.9320.9340.954Specificity0.9610.7180.8560.9610.991NPV0.2140.3470.1750.2830.06FNR0.8500.9230.9710.8560.998Montgomery CountryAccuracy0.9830.8940.9520.9150.987Precision0.8530.9140.9060.9130.966Recall0.9530.8840.9260.9540.989Specificity0.8620.7760.8710.9640.994NPV0.2210.3430.0740.3270.02FNR0.8520.9130.9650.9310.972In Table2 indicates the entire performance of the DBN-AMBO with recent optimization techniques on the two datasets. DBN-AMBO is compared over DBN-EPO (Emperor penguin optimization), DBN-BOA (Butterfly optimization Algorithm), and DBN- MBO. The accuracy of DBN-AMBO is 9.2%, 5.2%, and 3.1% superior over DBN-BOA, DBN-EPO, and DBN- MBO, respectively.Table 2
Performance of proposed DBN-AMBO with other classifiers.
DatasetsPerformanceDBN-BOADBN-EPODBN-MBODBN-AMBOShenzhen ChinaAccuracy0.8520.9270.9310.992Precision0.8710.9520.9670.978Recall0.9150.9470.9240.954Specificity0.9210.8710.9410.991NPV0.2010.1650.2750.06FNR0.8530.9610.8520.998Montgomery CountryAccuracy0.9740.9220.9140.987Precision0.8250.9050.9350.966Recall0.8460.9280.9410.989Specificity0.8620.8110.7450.994NPV0.1410.0650.8130.02FNR0.8820.8350.9230.972The CM (confusion matrix) of two datasets for TB classification is provided in Figure4. This metric is used for evaluating the classification efficiency of the proposed DBN-AMBO. It is the comparison of predicted and true labels in a classification. In a normal case, both datasets provided better outcomes.Figure 4
CM: (a) SC dataset and (b) MC dataset.
(a)(b)Table3 illustrates the comparison of the running time of several techniques. It is noted from the table that the computational time of the DBN-AMBO is very less when compared with other techniques. That is proposed that DBN-AMBO takes only 0.426 s to complete the implementation process.Table 3
Execution time of various approaches
MethodsComputation time (s)DBN1.52GAN3.242RNN2.75CNN1.348DBN-BOA1.771DBN-EPO2.721DBN-MBO1.74DBN-AMBO0.426Table4 represents the comparison of the performance with recently published works. When compared to these models, the proposed DBN-AMBO attained better results. This is due to the optimal weight selection by AMBO. This optimizer reduces the loss function and enhances the accuracy.Table 4
Comparison of the performance with recently published works.
MethodsAccuracyRecallSpecificityPavani et al. [15]0.9550.9330.98Islam et al. [12]0.900.880.92Santhosh et al. [6]0.860.900.80Rahman et al. [16]0.9640.966—Proposed (Shenzhen China)0.9920.9540.991Proposed (Montgomery Country)0.9870.9890.994


## 5. Conclusion

TB is a viral infection disease and many countries are affected due to this disease. Hence, each and every TB-positive case should be cured. In this work, a hybrid model was introduced for TB classification using CXR images. This work undergoes four major phases. Initially, the images were preprocessed and segmented. Then, 55 features were extracted and given as input to the classifier. Finally, TB is classified using DBN-AMBO. The overall evaluations were carried out on MC and SC datasets. When comparing these two datasets, the SC dataset obtained better accuracy of 0.992. It is sure that this methodology will facilitate the radiologist in TB classification. Hence, 99% accuracy was achieved by the proposed work while comparing it to other state-of-the-art approaches. In the future, CXR images can be used for TB-affected people who are affected by COVID-19 and pneumonia.



---

*Source: 3357508-2022-09-28.xml*