Get 20M+ Full-Text Papers For Less Than $1.50/day. Start a 14-Day Trial for You or Your Team.

Learn More →

A Novel and Robust Approach to Detect Tuberculosis Using Transfer Learning

A Novel and Robust Approach to Detect Tuberculosis Using Transfer Learning Hindawi Journal of Healthcare Engineering Volume 2021, Article ID 1002799, 10 pages https://doi.org/10.1155/2021/1002799 Research Article A Novel and Robust Approach to Detect Tuberculosis Using Transfer Learning 1 1 1 1 1 Omar Faruk , Eshan Ahmed , Sakil Ahmed , Anika Tabassum, Tahia Tazin , 2 1 Sami Bourouis , and Mohammad Monirujjaman Khan Department of Electrical and Computer Engineering, North South University, Bashundhara, Dhaka-1229, Bangladesh Department of Information Technology, College of Computers and Information Technology, Taif University, P.O. Box 11099, Taif 21944, Saudi Arabia Correspondence should be addressed to Mohammad Monirujjaman Khan; monirujjaman.khan@northsouth.edu Received 11 October 2021; Revised 8 November 2021; Accepted 12 November 2021; Published 25 November 2021 Academic Editor: Deepak Garg Copyright © 2021 Omar Faruk et al. *is is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. Deep learning has emerged as a promising technique for a variety of elements of infectious disease monitoring and detection, including tuberculosis. We built a deep convolutional neural network (CNN) model to assess the generalizability of the deep learning model using a publicly accessible tuberculosis dataset. *is study was able to reliably detect tuberculosis (TB) from chest X-ray images by utilizing image preprocessing, data augmentation, and deep learning classification techniques. Four distinct deep CNNs (Xception, InceptionV3, InceptionResNetV2, and MobileNetV2) were trained, validated, and evaluated for the classi- fication of tuberculosis and nontuberculosis cases using transfer learning from their pretrained starting weights. With an F1-score of 99 percent, InceptionResNetV2 had the highest accuracy. *is research is more accurate than earlier published work. Ad- ditionally, it outperforms all other models in terms of reliability. *e suggested approach, with its state-of-the-art performance, may be helpful for computer-assisted rapid TB detection. can be cured with therapy. Antibiotics are often given for a 1. Introduction six-month period [4]. TB is the world’s second most lethal infectious disease, Chest X-ray screening for TB in the lungs is the simplest trailing only human immunodeficiency virus (HIV), with an and most frequently used technique of tuberculosis detec- estimated 1.4 million deaths in 2019 [1]. Although it is most tion. Another alternative is to have chest radiographs ex- often associated with the lungs, it may also affect other amined by a physician, which is a time-consuming clinical organs such as the stomach (abdomen), glands, bones, and procedure [5]. Tuberculosis is often misclassified as other the neurological system. *e top thirty tuberculosis-bur- illnesses with similar radiographic patterns as a result of dening countries accounted for 87% of tuberculosis cases in CXR imaging, resulting in ineffective treatment and dete- 2019 [2]. Two-thirds of the overall is made up of India, riorating clinical conditions [6]. In this context, a transfer Indonesia, China, the Philippines, Pakistan, Nigeria, Ban- learning approach based on convolutional neural networks gladesh, and South Africa, with India leading the way, may be critical. CXR pictures were chosen as a sample followed by Indonesia, China, the Philippines, Pakistan, dataset in this research because they are cost-effective and Nigeria, Bangladesh, and South Africa. In 2019, an estimated time-efficient, as well as compact and readily accessible in 10 million people worldwide developed TB. *ere are 5.6 nearly every clinic. As a consequence, fewer poor nations million men, 3.2 million women, and 1.2 million children in will profit from this study. *e main motivation for this the country. Tuberculosis may be cured if diagnosed early study is to diagnose tuberculosis without any delay. *is and treated appropriately [3]. Almost always, tuberculosis method will aid in the fast diagnosis of tuberculosis via the 2 Journal of Healthcare Engineering tuberculosis bacilli is much more precise [13]. Vishnu use of CXR images. False result problems may be resolved if a model is designed with a high degree of precision. If this Makkapati et al. were the first to diagnose TB using the form characteristics of Mycobacterium tuberculosis bacteria. *ey test were adopted, the system would be more robust and allow for the evaluation of a greater number of individuals in proposed a method based on hue color components for a shorteramount oftime,significantlydecreasing the spread. segmenting bacilli through adaptive hue range selection. *e existence of a beaded structure inside the bacilli, as well as the thread length and breadth parameters, indicates the 1.1. Existing Work. Several research groups used CXR pic- validity or invalidity of the bacilli [14]. Sadaphal et al. de- tures to identify tuberculosis (TB) and normal patients using veloped a method in 2008 that incorporated (1) Bayesian a standard machine learning method. But the objective of segmentation, which relied on prior knowledge of ZN stain this article is to get a better understanding of the issue. We colors to estimate the likelihood of a pixel having a “TB reviewed current papers and articles and considered strat- item,” and (2) shape/size analysis [15]. egies for improving the accuracy of our deep learning model. In the majority of studies, researchers claimed around To compare our efforts, we utilized an existing dataset and 90% accuracy. However, the major contribution of this examined their model. Using a deep learning approach, research is that several pretrained models were utilized. Hooda et al. classified CXR images into tuberculosis and InceptionV3 was 96 percent accurate and 97.57 percent non-TB groups with an accuracy of 82.09 percent. Evan- validated, MobileNetV2 was 98 percent accurate and 97.93 gelista and Guedes developed a computer-assisted technique percent validated, and InceptionResNetV2 was 99 percent based on intelligent pattern recognition [7]. By modifying accurate and 99.36 percent validated. *is study presents a the settings of deep-layered CNNs, it has been shown that novel method for detecting tuberculosis-infected individuals deep machine learning techniques may be used to diagnose using deep learning. TB. Transfer learning was used in the context of deep CNN (convolutional neural networking) is a technique learning to identify TB by utilizing pretrained models and that is well suited for this kind of issue. *is method will aid their ensembles [8]. in the rapid detection of tuberculosis from chest X-ray Pasa et al. proposed a deep network architecture with an pictures. accuracy of 86.82 percent for TB screening. Additionally, *e remaining portion of the article is organized as they demonstrated an interactive visualization application follows: Section 2 addressed the approach and methodology. for patients with TB [9]. Chhikara et al. investigated whether Sections 3 and 4 addressed the analysis of the results and the CXR pictures might be used to detect pneumonia. *ey used conclusion, respectively. preprocessing methods like filtering and gamma correction to evaluate the performance of pretrained models (Resnet, 2. Method and Materials ImageNet, Xception, and Inception) [10]. *e paper “Reli- able TB Detection Using Chest X-ray with Deep Learning, Open-source Kaggle provided the dataset used in this Segmentation, and Visualization” was authored by Tawsifur study. Patients with tuberculosis and those without the Rahman. He used deep convolutional neural networks and disease were represented in the dataset. For feature the modules ResNet18, ResNet50, ResNet101, ChexNet, extraction, a CNN is used. A flatten layer, two dense InceptionV3, Vgg19, DenseNet201, SqueezeNet, and layers, and a ReLU activation function are all included in MobileNet to differentiate between tuberculosis and normal the model. It also includes four Conv2D layers and three images. In the identification of tuberculosis using X-ray MaxPooling2D layers. SoftMax, the last and most thick images, the top-performing model, ChexNet, had accuracy, layer, serves as an activation layer. Transfer learning is precision, sensitivity, F1-score, and specificity of 96.47 also utilized in this study to compare the accuracy of the percent, 96.62 percent, 96.47 percent, 96.47 percent, and created model with the accuracy of the pretrained 96.51 percent, respectively [11]. model. With a few changes in the final layers, Mobile- Stefanus Kieu Tao Hwa showed deep learning for TB NetV2, InceptionResNetV2, Xception, and InceptionV3 diagnosis using chest X-rays; according to the data, the were utilized for pretrained models. Layers such as suggested ensemble method achieved the highest accuracy of average pooling, flatten, dense, and dropout are used to 89.77 percent, sensitivity of 90.91 percent, and specificity of create bespoke end results. When it comes to extracting 88.64 percent [12]. Priya Ebenezer et al. have extended all visual details, the CNN model works effectively. *e current TB detection proposals. *ey designed a new model learns and distinguishes between images by method for identifying overlapping TB items. To determine extracting characteristics from the input images. Fig- the boundaries between the single bacterium area, the ure 1 shows the workflow diagram of the TB and normal overlapping bacilli zone, and the nonbacilli region, form image detection. characteristics such as eccentricity, compactness, circularity, Python is the perfect programming language for data and tortuosity were examined. A novel proposal for an analysis. Because of Python’s extensive library access, deep overlapping bacilliarea was madebased onconcavities in the learning problems are very successful in the Python pro- region. Because concavities imply overlapping, the optimum gramming language. On a personal GPU, Anaconda Nav- separation line is determined by the concavity’s deepest igator and Jupyter Notebook were used for dataset concavity point. *is provides an additional advantage. preparation, as well as Google Colab for handling large When the separation is overlapped, the overall count of datasets and online model training. Journal of Healthcare Engineering 3 TB Images Images TB/Normal Detection Features Prediction Disease Image Model Output Input Figure 1: Workflow diagram of the TB or normal image detection. 2.1. Dataset. *issystem’sdatasetismadeupof3500TBand divided into three batches: 70 percent training data, 20 3500 normal images. For this study, the Tuberculosis (TB) percent validation data, and the remaining testing data. Each Chest X-ray Database has been used [16]. *e visualization load contains both normal and TB images. Several increments were used to add variety to the original of this dataset is shown in Figures 2 and 3. Figure 2 depicts a healthy chest X-ray, whereas Figure 3 images. Because lung X-rays are generally symmetrical with a few minor characteristics, increases such as vertical images depicts a disease chest X-ray caused by tuberculosis. *e pictures in the collection have varying starting heights and were used. However, the main goal was for TB and associated widths. *ose provided pictures have a predetermined form symptoms to occur in either lung and be detectable in both of thanks to the model. *e Tuberculosis (TB) Chest X-ray our models. To provide more variety, these improved images Database is a balanced medical dataset. *e total number of have been gently rotated and illuminated or dimmed. tuberculosis and nontuberculosis cases is equal (3500 each). Figure4 displays the totalnumberof TBand non-TB records 2.4. Convolutional Neural Network and Transfer Learning. in this dataset. In artificial intelligence, CNNs (convolutional neural net- works) are often employed for image categorization [17]. 2.2. Block Diagram. A dataset with two subsections is Before the input is sent through a neural network, it handles provided as input in the block design shown in Figure 5. *is data convolution, maximum pooling, and flattening. It system underwent some preprocessing before fitting the works because the various weights are set up using various model, such as importing pictures of a certain size, dividing inputs. Once the data have passed through the hidden layers, the dataset, and using data augmentation methods. Better weights are computed and assessed. Following input from accuracy was achieved after fitting and fine-tuning the the cost function, the network goes through a back prop- model. It was possible to see how loss and accuracy evolve agation phase [18]. During this procedure, the input layer over time by plotting a confusion matrix and a model of loss weight is readjusted once again, and the process is repeated and accuracy. As a final step, the classification result section until it finds an optimal position for weight adjustment shows how well the model did in distinguishing between there. Epochs show how many times the cycle has repeated pictures of TB and those not associated with the disease. itself. It takes a long time to train a model using neural *e entire system is shown in the block diagram in the networks, which is a major disadvantage. To get around this, simplest possible manner. In this research, the decision- we will utilize transfer learning, another hot subject in making component of the system plays a very important computer vision research [19]. To learn from a dataset, we role. An enormous quantity of data is used to train the use transfer learning, which makes use of a pretrained model, which then uses that data to make a conclusion. model. It saves us a lot of time in training and takes care of a lot of different important things at the same time. As time 2.3. Preprocessing. *e preprocessing phase occurs before passes, we will be able to fine-tune our networks for im- the training and testing of the data. Picture dimensions are proved accuracy and simplicity. redimensioned, images are transformed to an array, input is Transfer learning is to preserve knowledge from one area and apply it to another. Training takes a long time since preprocessed using MobileNetV2, and hot labels are finally encoded throughout the four preparation stages. Because of model parameters are all initialized using a random Gaussian distribution and a convergence of at least 30 the effectiveness of the training model, picture scaling is an important preprocessing step in computer vision. *e epochs with a lot of dimensions of 50 pictures is generated. smaller the image, the smoother it runs. In this research, an *e problem stems from the fact that big, well-noted pic- image was resized to 256 by 256 pixels. Following that, all of tures may be difficult to obtain in the medical profession. the images in the dataset will be processed into an array. For Due to a paucity of medical data, it is sometimes difficult to calling, the image is converted into a loop function array. correctly predict models. One of the most difficult problems *e image is then used in conjunction with MobileNetV2 to for medical researchers is the shortage of medical data or preproceed input. *e last step is hot coding on labels, since datasets. Data are an important factor in deep learning many computer learning algorithms cannot operate directly methods. Data processing and labelling are both time- consuming and costly. *e advantage of transfer learning is on datalabelling. *is method, aswell as all input and output variables, must be numerical. *e tagged data are trans- that it does not require vast datasets. Computations are becoming easier and less costly. Transfer learning is a formed into a numerical label in order to be interpreted and analyzed. Following the preprocessing step, the data are technique in which the knowledge from a pretrained model 4 Journal of Healthcare Engineering Figure 2: Non-TB X-ray images. Figure 3: Tuberculosis X-ray images. Normal 0 TB 1 Figure 4: Total number of TB and non-TB records. Input Pre-trained Classification Preprocessing Fine Tuning Post Process Dataset model Result Non- Tuberculosis Tuberculosis Figure 5: Block diagram of the proposed system. that was trained on a large dataset is transferred to a new method started CNN training with a tiny dataset, which model that has to be trained, incorporating fresh data that is included a large-scale dataset that had previously been comparatively less than needed. For a specific job, this trained in the pretrained models. count Journal of Healthcare Engineering 5 2.5. Overview of the Proposed Model. Four CNN-based study’s performance measures are all mentioned below. True pretrained models were used in this research to classify chest positives (TP) are tuberculosis images that were correctly X-ray pictures. Xception, InceptionV3, MobileNetV2, and identified as such; true negatives (TN) are normal images that InceptionResNetV2 are the models used. *ere are two types werecorrectly identifiedas such; falsepositives(FP) arenormal of chest X-ray pictures: one is unaffected by tuberculosis, images that were incorrectly identified as tuberculosis images; whereas the other is. *is study also utilized a transfer and false negatives (FN) are normal tuberculosis images. learning technique that can perform well with sparse data by Accuracy simply indicates how close our expected result utilizing ImageNet data and is efficient in terms of training is to the actual result [24]. It is represented as a percentage. It time. *e symmetric system architecture of the transfer is determined by adding true positive and true negative and learning method is shown in Figure 6. dividing the overall number of potential outcomes by the InceptionResNetV2 was developed by merging two of number of possible outcomes: the most well-known deep convolutional neural networks, TP + FN (2) Inception [20] and ResNet [21], and using batch normali- Accuracy � . TP + TF + FP + FN zation rather than summation for the traditional layers. *e popular transfer learning model, InceptionResNetV2, was Precision is a measure of how close predicted outcomes trained on data from the ImageNet database from various are to each other [25]. True positive is obtained by dividing sources and classifications, and it is definitely making waves. true positive by the sum of true and false positives: When include top �“False”, it simply indicates that the fully TP (3) connected layer will not be included, even if the input shape Precision � . TP + FP is specified. 224 ×224 ×3. When training �“False”, the weights in a particular layer are not changed during training. Recall is determined by dividing the total number of true *e dropout layer, which aids in overfitting prevention, positives by the total number of true positives and false randomly sets input units to 0 at a rate frequency at each step negatives: during training time. Dropout (0.5) represents a dropout TP (4) effect of 50 percent. Flattening is the process of converting Recall � . TP + FN data into a one-dimensional array for use in the next layer. *e output of the convolutional layers is flattened to gen- *e F1-score combines a classifier’s accuracy and recall erate a single large feature vector. It is also linked to the final into a single measure by calculating their harmonic mean. It classification model, forming what is known as a fully is most commonly used to compare the results of two connected layer. Batch normalization is a method for im- different classifiers. Assume classifier A has greater recall proving the speed and stability of artificial neural networks and classifier B has greater precision. In this case, the F1- by recentering and rescaling the inputs of the layers. When scores of both classifiers may be used to determine which building the pretrained models, Table 1 indicates that the performs better. *e F1-score of a classification model is batch size is 32, the maximum epoch is 25, and a loss computed as follows: function of “binary cross-entropy” is used. 2(Precision xRecall) *e sigmoid function is an activation function that as- (5) F1 � . Precision + Recall sists a neuron in making choices. *ese routines produce either a 0 or a 1. It employs probability to generate a binary It evaluates the correctness of the model dataset. Although output [22]. *e outcome is determined by determining who accuracy is difficult to grasp, the F1-score idea becomes more has the highest probability value. *is function outperforms useful in situations of uneven class distribution. It is used by the threshold function and is more useful for categorization. many machine learning models. It is utilized when false *is activation function is often applied to the last dense negatives and false positives are more important in the dataset block. *e equation for the sigmoid function is than genuine positives and true negatives. When the data are wrongly categorized, it produces better results. X � . (1) − Y *e confusion matrix displays the total number of right 1 + e and erroneous outcomes. It is possible to see all true-pos- ReLU is an activation function that operates on the itive, false-positive, true-negative, and false-negative num- concept of rectification. *is function’s output stays at 0 bers [26].*e greater the frequency of genuine positive and from the start until a specified point. After crossing or true-negative outcomes, the greater the accuracy. reaching a certain value, the output changes and continues to rise as the input changes [23]. Because it is only activated 3. Result and Analysis when there is a significant or significant input inside the In classifying normal images and TB, we experimented with neurons, this function works extremely well. a variety of models and methods in order to assess their utility and efficacy. Four pretrained CNN models were 2.6. Evaluation Criteria. Following the completion of the employed to classify chest X-ray pictures. *e models that training phase, all models were evaluated on the test dataset. are relevant include MobileNetV2, Xception, Inception- *e performance of these systems was evaluated using the ResNetV2, and Inception V3. *ere are two kinds of chest accuracy, precision, recall, F1-score, and AUC range. *is X-ray pictures. *e first is TB, whereas the second is normal. 6 Journal of Healthcare Engineering InceptionResNetV2 Normal Binary Class Tuberculosis TB Normal weights = 'imagenet', TB include_top = False, input_shape = (224, 224, 3) Chest X-Ray Images (TB/Normal) Load Pre-trained Model Training Phase Output Figure 6: System architecture with InceptionResNetV2. Table 1: Parameters used for compiling various models. *is study also used ImageNet data to use a transfer learning method that is successful in terms of training times when Parameters Value there is insufficient data. Batch size 32 Several network designs, including Xception, Incep- Shuffling Each epoch tionV3, InceptionResNetV2, and MobileNetV2, are tested Optimizer Adam −3 before deciding on a network architecture. A bespoke 19- Learning rate 1e −3 layer ConvNet is also tried, but it performs badly. *e Decay 1e /epoch Loss Binary_crossentropy InceptionResNetV2 performed the best of all networks, and Epoch 25 the findings based on that design are included. Table 2 shows Execution environment GPU the accuracy and loss history of four tried models. According to Table 2, the InceptionResNetV2 model achieves a validation or testing accuracy of 99.36 percent, with a validation loss of 2.37 percent. Normal images have 99 as “TB,” while predicting 1 percent of photographs as percent accuracy, 98 percent recall, and 99 percent F1- “normal.” Additionally, this research included genuine testing, which scores, whereas TB images have 98 percent precision, 99 percent recall, and 99 percent F1-scores. provided input to the model through chest X-ray images. When the model is complete, a file with the hdf5 extension is Figures 7 and 8 indicate that, at epoch 1, the training accuracy was pretty low in the first few epochs. *e starting created containing the produced model. Four hdf5 files rep- training accuracy is 57.20 percent, the training loss is 69.01 resenting four different models were created for this study. percent, the validation accuracy is 74.79 percent, and the Following that, a new notebook file is created with the ipynb loss is also huge (905.03 percent), indicating that the model test extension. Four models were included in this test file, and learns very slowly at first. *e training accuracy improves then, individual chest X-ray images were provided as input. as the number of epochs increases and the loss function Figures 10 and 11 show the prediction results in real time. begins to decrease. *e model evaluates the results at the *e result shown in Figure 10 is normal. *e input image end of 25 epochs; InceptionResNetV2 has a 99.12 percent was normal, and the model correctly predicted it. Figure 11 shows a tuberculosis chest X-ray image as an input. *e train accuracy and a 99.643 percent validation accuracy, with a train loss of 3.40 percent and a validation loss of 1.71 model then returned a valid result, indicating that the input percent. picture was of a TB chest X-ray. In Table 3, classification In identifying normal and tuberculosis (TB) images, results have been compared with the above reference papers. Figure 9 illustrates true-positive, true-negative, false-posi- In this article, using MobileNet, we achieved 97.93 tive, and false-negative scenarios. percent accuracy, but in [11], the authors achieved 94.33 According to the results, the InceptionResNetV2 model percent accuracy by using the same algorithm. But the correctly identifies imagesas “normal” 98 percent ofthe time difference between their work and our work is that we fine- and incorrectly labels normal photos as “TB” 2 percent of the tuned the model to increase its accuracy, whereas they used time. Additionally, the confusion matrix shows that the the general MobileNet algorithm in their work. Using algorithm accurately classifies 99 percent of TB photographs InceptionV3, they achieved higher accuracy than our model, Dropout Flatten BatchNormalization Dense with Relu Dense with Sigmoid Journal of Healthcare Engineering 7 Table 2: Comparison of pretrained models. Model Train accuracy Val accuracy Train loss Val loss Images Precision Recall F1-score Normal 1.00 0.90 0.95 Xception 0.9596 0.9543 0.1155 0.1213 TB 0.91 1.00 0.95 Normal 0.95 0.97 0.96 InceptionV3 0.9800 0.9757 0.1160 0.1243 TB 0.97 0.95 0.96 Normal 0.96 1.00 0.98 MobileNetV2 0.9930 0.9793 0.0220 0.0548 TB 1.00 0.96 0.98 Normal 0.99 0.98 0.99 InceptionResNetV2 0.9912 0.9936 0.0340 0.0237 TB 0.98 0.99 0.99 Model Accuracy 1.0 0.9 0.8 0.7 0.6 0.5 05 10 15 20 25 Epochs Train Val Figure 7: Training and validation accuracy. Model Loss 0 5 10 15 20 25 Epochs Train Val Figure 8: Training and validation loss. Accuracy Loss 8 Journal of Healthcare Engineering 687 13 (0.98) (0.02) (0.01) (0.99) predicted label Figure 9: Confusion matrix. Predicted Class Label: Normal 0 100 200 300 400 500 Figure 10: Normal prediction. Predicted Class Label: Tuberculosis 0 100 200 300 400 500 Figure 11: TB prediction. true label Journal of Healthcare Engineering 9 Table 3: Model comparison with other research. *is paper (model name) Accuracy (%) References paper (model name) Accuracy (%) 97.93 MobileNet Ref [11] MobileNet 94.33 (Validation or testing) Ref [12] InceptionV3 83.57 InceptionV3 98.00 Ref [11] InceptionV3 98.54 Xception 95.96 Ref model VGG16 87.71 99.36 Ref [12] Model ChexNet 96.47 InceptionResNetV2 (Validation or testing) Ref [12] Model DenseNet201 98.6 MobileNet 97.93 Ref [27] GoogleNet 89.6 but overall in this article, InceptionResnetV2 achieved the Acknowledgments highest accuracy of 99.36 percent, which is greater than any *e authors are thankful for the support from Taif Uni- previous work reported before. versity Researchers Supporting Project (TURSP-2020/26), Taif University, Taif, Saudi Arabia. 4. Conclusion A framework for deep learning analysis may be very beneficial References for individuals who do not get regular screening or checkups in countries with insufficient healthcare facilities. Deep [1] R.Ramya andP.S.Babu,“Automatictuberculosisscreeningusing learning in clinical imaging is particularly apparent in early canny Edge detection method,” in Proceedings of the 2nd Inter- analyses that may recommend preventive therapy. Due to a national Conference on Electronics and Communication Systems (ICECS), pp. 282–285, Coimbatore, India, February 2015. shortage of radiologists in resource-limited areas, technology- [2] Who, “Tuberculosis,” WHO, Geneva, Switzerland, 2020, assisted tuberculosis diagnosis is required to help reduce the https://www.who.int/news-room/fact-sheets/detail/ time and effort spent on tuberculosis detection. Medical tuberculosis. analysis powered by deep learning is still not as remarkable as [3] S. K. Sharma and A. Mohan, “Tuberculosis: from an incurable experts would want. *is study suggests that we may ap- scourge to a curable disease - journey over a millennium,” Indian proach that the level of accuracy by integrating many recent Journal of Medical Research, vol. 137, no. 9, pp. 455–93, 2013. breakthroughs in deep learning and applying them to suitable [4] “Overview tuberculosis (TB),” 2019, https://www.nhs.uk/ situations. In this research, we utilized the pretrained model conditions/tuberculosis-tb/ NHS. InceptionResNetV2 to develop an automated tuberculosis [5] C. Silverman, “An appraisal of the contribution of mass radi- detection method. With a validation accuracy of 99.36 per- ography in the discovery of pulmonary Tuberculosis,” American cent, the InceptionResNetV2 model has finally reached the Review of Tuberculosis, vol. 60, no. 4, pp. 466–482, 1949. [6] M. van Cleeff, L. E. K. Ndugga, H. Meme, J. Odhiambo, and new state of the art in identifying tuberculosis illness. Given P. Klatser, “*e role and performance of chest X-ray for the the following, an automated TB diagnosis system would be diagnosis of tuberculosis: a cost-effectiveness analysis in very helpful in poor countries where trained pulmonologists Nairobi, Kenya,” BMC Infectious Diseases, vol. 5, no.1, p.111, are in limited supply. *ese approaches would improve access to health care by reducing both the patient’s and the pul- [7] R. Hooda, S. Sofat, and A. Mittal, “Deep-learning: a potential monologist’s time and screening expenses. *is advancement method for tuberculosis detection using chest radiography,” will have a profound effect on the medical profession. Tu- in Proceedings of the IEEE International Conference on Signal berculosis patients may be readily identified with this method. and Image Processing Applications (ICSIPA), pp. 497–502, Diagnostics will benefit from this kind of approach in the Kuching, Malaysia, September 2017. future. Numerous deep learning methods may be used to [8] A. Rohilla, R. Hooda, and A. Mittal, “TB Detection in chest improve the parameters and generate a trustworthy model radiograph using deep learning,” International Journal of Advance Research in Science and Engineering, vol. 6, no. 8, that benefits mankind. Additionally, we may experiment with pp. 1073–1085, 2017. a number of image processing techniques in the future to aid [9] F. Pasa, V. Golkov, F. Pfeiffer, D Cremers, and D Pfeiffer, the model in learning the picture pattern more accurately and “Efficient deep network architectures for fast chest X-ray provide improved performance. Tuberculosis screening and visualization,” Scientific Reports, vol. 9, no. 1, pp. 6268-6269, 2019. Data Availability [10] P. Chhikara, P. Singh, P. Gupta, and T. Bhatia, “Deep con- volutional neural network with transfer learning for detecting *e data utilized to support these research findings are ac- Pneumonia on Chest X-rays,” Advances in Intelligent Systems cessible online at:https://www.kaggle.com/tawsifurrahman/ and Computing, vol. 1064, pp. 155–168, 2019. tuberculosis-tb-chest-xray-dataset. [11] T. Rahman, A. Khandakar, M. A. Kadir et al., “Reliable Tu- berculosis detection using chest X-ray with deep learning, Conflicts of Interest segmentation and visualization,” IEEE Access, vol. 8, pp. 191586–191601, 2020. *e authors declare that they have no conflicts of interest to [12] S. Kieu, T. Hwa, M. H. A. Hijazi, A. Bade, R. Yaakob, and report regarding this study. M. S. Jeffree, “Ensemble deep learning for tuberculosis 10 Journal of Healthcare Engineering detection using chest X-ray and canny edge detected images,” [27] Y. Cao, C. Liu, B. Liu et al., “Improving tuberculosis diag- IAES International Journal of Artificial Intelligence, vol. 8, nostics using deep learning and mobile health technologies among resource-poor and marginalized communities,” in no. 4, pp. 429–435, 2019. [13] E. Priya and S. Srinivasan, “Separation of overlapping bacilli Proceedings of the 2016 IEEE First International Conference on Connected Health: Applications, Systems and Engineering in microscopic digital TB images,” Biocybernetics and Bio- Technologies (CHASE), pp. 274–281, Washington, DC USA, medical Engineering, vol. 35, no. 2, pp. 87–99, 2015. June 2016. [14] R. A. A. Vishnu Makkapati, “Segmentation and classification of tuberculosis bacilli from ZN-stained sputum smear im- ages,” in Proceedings of the IEEE International Conference on Automation Science and Engineering, pp. 217–220, Bangalore, India, August 2009. [15] P. Sadaphal, J. Rao, G. W. Comstock, and M. F. Beg, “Image processing techniques for identifying mycobacterium tuber- culosis in ziehl-neelsen stains,” International Journal of Tu- berculosis & Lung Disease: 9e Official Journal of the International Union Against Tuberculosis and Lung Disease, vol. 12, no. 5, pp. 579–582, 2008. [16] “Tuberculosis (TB) chest X-ray database,” Kaggle, https://www. kaggle.com/tawsifurrahman/tuberculosis-tb-chest-xray-dataset. [17] E. Paul, P. Gowsalya, N. Devadarshini, M. P. Indhumathi, and M. Iniyadharshini, “Plant leaf perception using convolutional neural network,” International Journal of Psychosocial Re- habilitation, vol. 24, no. 5, pp. 5753–5762, 2020. [18] M. Sarıgul, ¨ B. M Ozyildirim, and M Avci, “Differential convolutional neural network,” Neural Networks: 9e Official Journal of the International Neural Network Society, vol. 116, no. 9, pp. 279–287, 2019. [19] H. Shouno, A. Suzuki, S. Suzuki, and S. Kido, “Deep con- volution neural network with 2-stage transfer learning for medical image classification,” 9e Brain & Neural Networks, vol. 24, no. 1, pp. 3–12, 2017. [20] C. Szegedy, V. Vanhoucke, S. Ioffe, J. Shlens, and Z. Wojna, “Rethinking the inception architecture for computer vision,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 2818–2826, Las Vegas, NV, USA, June 2016. [21] K. He, X. Zhang, S. Ren, and J. Sun, “Deep residual learning for image recognition,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 770–778, Las Vegas, NV, USA, June 2016. [22] G. Lewicki and G. Marino, “Approximation by superpositions of a sigmoidal function,” Zeitschrift fur ¨ Analysis und ihre Anwendungen, vol. 22, no. 2, pp. 463–470, 2003. [23] D. R. Nayak, D. Das, R. Dash, S. Majhi, and B. Majhi, “Deep extreme learning machine with leaky rectified linear unit for multiclass classification of pathological brain images,” Mul- timedia Tools and Applications, vol. 79, no. 21-22, pp. 15381–15396, 2019. [24] M. S. Faridi, M. A. Zia, Z. Javed, I. Mumtaz, and S. Ali, “A comparative analysis using different machine learning: an efficient approach for measuring accuracy of face recogni- tion,” International Journal of Machine Learning and Com- puting, vol. 11, no. 2, pp. 115–120, 2021. [25] W. Zhang, J. Chien, J. Yong, and R. Kuang, “Network-based machine learning and graph theory algorithms for precision oncology,” Npj Precision Oncology, vol. 1, no. 1, p. 25, 2017. [26] V. M. Patro and M. R. Patra, “Augmenting weighted average with confusion matrix to enhance classification sccuracy,” Transactions on Machine Learning and Artificial Intelligence, vol. 2, no. 4, 2014. http://www.deepdyve.com/assets/images/DeepDyve-Logo-lg.png Journal of Healthcare Engineering Hindawi Publishing Corporation

A Novel and Robust Approach to Detect Tuberculosis Using Transfer Learning

Loading next page...
 
/lp/hindawi-publishing-corporation/a-novel-and-robust-approach-to-detect-tuberculosis-using-transfer-mr9wW7P0ks

References (29)

Publisher
Hindawi Publishing Corporation
Copyright
Copyright © 2021 Omar Faruk et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
ISSN
2040-2295
eISSN
2040-2309
DOI
10.1155/2021/1002799
Publisher site
See Article on Publisher Site

Abstract

Hindawi Journal of Healthcare Engineering Volume 2021, Article ID 1002799, 10 pages https://doi.org/10.1155/2021/1002799 Research Article A Novel and Robust Approach to Detect Tuberculosis Using Transfer Learning 1 1 1 1 1 Omar Faruk , Eshan Ahmed , Sakil Ahmed , Anika Tabassum, Tahia Tazin , 2 1 Sami Bourouis , and Mohammad Monirujjaman Khan Department of Electrical and Computer Engineering, North South University, Bashundhara, Dhaka-1229, Bangladesh Department of Information Technology, College of Computers and Information Technology, Taif University, P.O. Box 11099, Taif 21944, Saudi Arabia Correspondence should be addressed to Mohammad Monirujjaman Khan; monirujjaman.khan@northsouth.edu Received 11 October 2021; Revised 8 November 2021; Accepted 12 November 2021; Published 25 November 2021 Academic Editor: Deepak Garg Copyright © 2021 Omar Faruk et al. *is is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. Deep learning has emerged as a promising technique for a variety of elements of infectious disease monitoring and detection, including tuberculosis. We built a deep convolutional neural network (CNN) model to assess the generalizability of the deep learning model using a publicly accessible tuberculosis dataset. *is study was able to reliably detect tuberculosis (TB) from chest X-ray images by utilizing image preprocessing, data augmentation, and deep learning classification techniques. Four distinct deep CNNs (Xception, InceptionV3, InceptionResNetV2, and MobileNetV2) were trained, validated, and evaluated for the classi- fication of tuberculosis and nontuberculosis cases using transfer learning from their pretrained starting weights. With an F1-score of 99 percent, InceptionResNetV2 had the highest accuracy. *is research is more accurate than earlier published work. Ad- ditionally, it outperforms all other models in terms of reliability. *e suggested approach, with its state-of-the-art performance, may be helpful for computer-assisted rapid TB detection. can be cured with therapy. Antibiotics are often given for a 1. Introduction six-month period [4]. TB is the world’s second most lethal infectious disease, Chest X-ray screening for TB in the lungs is the simplest trailing only human immunodeficiency virus (HIV), with an and most frequently used technique of tuberculosis detec- estimated 1.4 million deaths in 2019 [1]. Although it is most tion. Another alternative is to have chest radiographs ex- often associated with the lungs, it may also affect other amined by a physician, which is a time-consuming clinical organs such as the stomach (abdomen), glands, bones, and procedure [5]. Tuberculosis is often misclassified as other the neurological system. *e top thirty tuberculosis-bur- illnesses with similar radiographic patterns as a result of dening countries accounted for 87% of tuberculosis cases in CXR imaging, resulting in ineffective treatment and dete- 2019 [2]. Two-thirds of the overall is made up of India, riorating clinical conditions [6]. In this context, a transfer Indonesia, China, the Philippines, Pakistan, Nigeria, Ban- learning approach based on convolutional neural networks gladesh, and South Africa, with India leading the way, may be critical. CXR pictures were chosen as a sample followed by Indonesia, China, the Philippines, Pakistan, dataset in this research because they are cost-effective and Nigeria, Bangladesh, and South Africa. In 2019, an estimated time-efficient, as well as compact and readily accessible in 10 million people worldwide developed TB. *ere are 5.6 nearly every clinic. As a consequence, fewer poor nations million men, 3.2 million women, and 1.2 million children in will profit from this study. *e main motivation for this the country. Tuberculosis may be cured if diagnosed early study is to diagnose tuberculosis without any delay. *is and treated appropriately [3]. Almost always, tuberculosis method will aid in the fast diagnosis of tuberculosis via the 2 Journal of Healthcare Engineering tuberculosis bacilli is much more precise [13]. Vishnu use of CXR images. False result problems may be resolved if a model is designed with a high degree of precision. If this Makkapati et al. were the first to diagnose TB using the form characteristics of Mycobacterium tuberculosis bacteria. *ey test were adopted, the system would be more robust and allow for the evaluation of a greater number of individuals in proposed a method based on hue color components for a shorteramount oftime,significantlydecreasing the spread. segmenting bacilli through adaptive hue range selection. *e existence of a beaded structure inside the bacilli, as well as the thread length and breadth parameters, indicates the 1.1. Existing Work. Several research groups used CXR pic- validity or invalidity of the bacilli [14]. Sadaphal et al. de- tures to identify tuberculosis (TB) and normal patients using veloped a method in 2008 that incorporated (1) Bayesian a standard machine learning method. But the objective of segmentation, which relied on prior knowledge of ZN stain this article is to get a better understanding of the issue. We colors to estimate the likelihood of a pixel having a “TB reviewed current papers and articles and considered strat- item,” and (2) shape/size analysis [15]. egies for improving the accuracy of our deep learning model. In the majority of studies, researchers claimed around To compare our efforts, we utilized an existing dataset and 90% accuracy. However, the major contribution of this examined their model. Using a deep learning approach, research is that several pretrained models were utilized. Hooda et al. classified CXR images into tuberculosis and InceptionV3 was 96 percent accurate and 97.57 percent non-TB groups with an accuracy of 82.09 percent. Evan- validated, MobileNetV2 was 98 percent accurate and 97.93 gelista and Guedes developed a computer-assisted technique percent validated, and InceptionResNetV2 was 99 percent based on intelligent pattern recognition [7]. By modifying accurate and 99.36 percent validated. *is study presents a the settings of deep-layered CNNs, it has been shown that novel method for detecting tuberculosis-infected individuals deep machine learning techniques may be used to diagnose using deep learning. TB. Transfer learning was used in the context of deep CNN (convolutional neural networking) is a technique learning to identify TB by utilizing pretrained models and that is well suited for this kind of issue. *is method will aid their ensembles [8]. in the rapid detection of tuberculosis from chest X-ray Pasa et al. proposed a deep network architecture with an pictures. accuracy of 86.82 percent for TB screening. Additionally, *e remaining portion of the article is organized as they demonstrated an interactive visualization application follows: Section 2 addressed the approach and methodology. for patients with TB [9]. Chhikara et al. investigated whether Sections 3 and 4 addressed the analysis of the results and the CXR pictures might be used to detect pneumonia. *ey used conclusion, respectively. preprocessing methods like filtering and gamma correction to evaluate the performance of pretrained models (Resnet, 2. Method and Materials ImageNet, Xception, and Inception) [10]. *e paper “Reli- able TB Detection Using Chest X-ray with Deep Learning, Open-source Kaggle provided the dataset used in this Segmentation, and Visualization” was authored by Tawsifur study. Patients with tuberculosis and those without the Rahman. He used deep convolutional neural networks and disease were represented in the dataset. For feature the modules ResNet18, ResNet50, ResNet101, ChexNet, extraction, a CNN is used. A flatten layer, two dense InceptionV3, Vgg19, DenseNet201, SqueezeNet, and layers, and a ReLU activation function are all included in MobileNet to differentiate between tuberculosis and normal the model. It also includes four Conv2D layers and three images. In the identification of tuberculosis using X-ray MaxPooling2D layers. SoftMax, the last and most thick images, the top-performing model, ChexNet, had accuracy, layer, serves as an activation layer. Transfer learning is precision, sensitivity, F1-score, and specificity of 96.47 also utilized in this study to compare the accuracy of the percent, 96.62 percent, 96.47 percent, 96.47 percent, and created model with the accuracy of the pretrained 96.51 percent, respectively [11]. model. With a few changes in the final layers, Mobile- Stefanus Kieu Tao Hwa showed deep learning for TB NetV2, InceptionResNetV2, Xception, and InceptionV3 diagnosis using chest X-rays; according to the data, the were utilized for pretrained models. Layers such as suggested ensemble method achieved the highest accuracy of average pooling, flatten, dense, and dropout are used to 89.77 percent, sensitivity of 90.91 percent, and specificity of create bespoke end results. When it comes to extracting 88.64 percent [12]. Priya Ebenezer et al. have extended all visual details, the CNN model works effectively. *e current TB detection proposals. *ey designed a new model learns and distinguishes between images by method for identifying overlapping TB items. To determine extracting characteristics from the input images. Fig- the boundaries between the single bacterium area, the ure 1 shows the workflow diagram of the TB and normal overlapping bacilli zone, and the nonbacilli region, form image detection. characteristics such as eccentricity, compactness, circularity, Python is the perfect programming language for data and tortuosity were examined. A novel proposal for an analysis. Because of Python’s extensive library access, deep overlapping bacilliarea was madebased onconcavities in the learning problems are very successful in the Python pro- region. Because concavities imply overlapping, the optimum gramming language. On a personal GPU, Anaconda Nav- separation line is determined by the concavity’s deepest igator and Jupyter Notebook were used for dataset concavity point. *is provides an additional advantage. preparation, as well as Google Colab for handling large When the separation is overlapped, the overall count of datasets and online model training. Journal of Healthcare Engineering 3 TB Images Images TB/Normal Detection Features Prediction Disease Image Model Output Input Figure 1: Workflow diagram of the TB or normal image detection. 2.1. Dataset. *issystem’sdatasetismadeupof3500TBand divided into three batches: 70 percent training data, 20 3500 normal images. For this study, the Tuberculosis (TB) percent validation data, and the remaining testing data. Each Chest X-ray Database has been used [16]. *e visualization load contains both normal and TB images. Several increments were used to add variety to the original of this dataset is shown in Figures 2 and 3. Figure 2 depicts a healthy chest X-ray, whereas Figure 3 images. Because lung X-rays are generally symmetrical with a few minor characteristics, increases such as vertical images depicts a disease chest X-ray caused by tuberculosis. *e pictures in the collection have varying starting heights and were used. However, the main goal was for TB and associated widths. *ose provided pictures have a predetermined form symptoms to occur in either lung and be detectable in both of thanks to the model. *e Tuberculosis (TB) Chest X-ray our models. To provide more variety, these improved images Database is a balanced medical dataset. *e total number of have been gently rotated and illuminated or dimmed. tuberculosis and nontuberculosis cases is equal (3500 each). Figure4 displays the totalnumberof TBand non-TB records 2.4. Convolutional Neural Network and Transfer Learning. in this dataset. In artificial intelligence, CNNs (convolutional neural net- works) are often employed for image categorization [17]. 2.2. Block Diagram. A dataset with two subsections is Before the input is sent through a neural network, it handles provided as input in the block design shown in Figure 5. *is data convolution, maximum pooling, and flattening. It system underwent some preprocessing before fitting the works because the various weights are set up using various model, such as importing pictures of a certain size, dividing inputs. Once the data have passed through the hidden layers, the dataset, and using data augmentation methods. Better weights are computed and assessed. Following input from accuracy was achieved after fitting and fine-tuning the the cost function, the network goes through a back prop- model. It was possible to see how loss and accuracy evolve agation phase [18]. During this procedure, the input layer over time by plotting a confusion matrix and a model of loss weight is readjusted once again, and the process is repeated and accuracy. As a final step, the classification result section until it finds an optimal position for weight adjustment shows how well the model did in distinguishing between there. Epochs show how many times the cycle has repeated pictures of TB and those not associated with the disease. itself. It takes a long time to train a model using neural *e entire system is shown in the block diagram in the networks, which is a major disadvantage. To get around this, simplest possible manner. In this research, the decision- we will utilize transfer learning, another hot subject in making component of the system plays a very important computer vision research [19]. To learn from a dataset, we role. An enormous quantity of data is used to train the use transfer learning, which makes use of a pretrained model, which then uses that data to make a conclusion. model. It saves us a lot of time in training and takes care of a lot of different important things at the same time. As time 2.3. Preprocessing. *e preprocessing phase occurs before passes, we will be able to fine-tune our networks for im- the training and testing of the data. Picture dimensions are proved accuracy and simplicity. redimensioned, images are transformed to an array, input is Transfer learning is to preserve knowledge from one area and apply it to another. Training takes a long time since preprocessed using MobileNetV2, and hot labels are finally encoded throughout the four preparation stages. Because of model parameters are all initialized using a random Gaussian distribution and a convergence of at least 30 the effectiveness of the training model, picture scaling is an important preprocessing step in computer vision. *e epochs with a lot of dimensions of 50 pictures is generated. smaller the image, the smoother it runs. In this research, an *e problem stems from the fact that big, well-noted pic- image was resized to 256 by 256 pixels. Following that, all of tures may be difficult to obtain in the medical profession. the images in the dataset will be processed into an array. For Due to a paucity of medical data, it is sometimes difficult to calling, the image is converted into a loop function array. correctly predict models. One of the most difficult problems *e image is then used in conjunction with MobileNetV2 to for medical researchers is the shortage of medical data or preproceed input. *e last step is hot coding on labels, since datasets. Data are an important factor in deep learning many computer learning algorithms cannot operate directly methods. Data processing and labelling are both time- consuming and costly. *e advantage of transfer learning is on datalabelling. *is method, aswell as all input and output variables, must be numerical. *e tagged data are trans- that it does not require vast datasets. Computations are becoming easier and less costly. Transfer learning is a formed into a numerical label in order to be interpreted and analyzed. Following the preprocessing step, the data are technique in which the knowledge from a pretrained model 4 Journal of Healthcare Engineering Figure 2: Non-TB X-ray images. Figure 3: Tuberculosis X-ray images. Normal 0 TB 1 Figure 4: Total number of TB and non-TB records. Input Pre-trained Classification Preprocessing Fine Tuning Post Process Dataset model Result Non- Tuberculosis Tuberculosis Figure 5: Block diagram of the proposed system. that was trained on a large dataset is transferred to a new method started CNN training with a tiny dataset, which model that has to be trained, incorporating fresh data that is included a large-scale dataset that had previously been comparatively less than needed. For a specific job, this trained in the pretrained models. count Journal of Healthcare Engineering 5 2.5. Overview of the Proposed Model. Four CNN-based study’s performance measures are all mentioned below. True pretrained models were used in this research to classify chest positives (TP) are tuberculosis images that were correctly X-ray pictures. Xception, InceptionV3, MobileNetV2, and identified as such; true negatives (TN) are normal images that InceptionResNetV2 are the models used. *ere are two types werecorrectly identifiedas such; falsepositives(FP) arenormal of chest X-ray pictures: one is unaffected by tuberculosis, images that were incorrectly identified as tuberculosis images; whereas the other is. *is study also utilized a transfer and false negatives (FN) are normal tuberculosis images. learning technique that can perform well with sparse data by Accuracy simply indicates how close our expected result utilizing ImageNet data and is efficient in terms of training is to the actual result [24]. It is represented as a percentage. It time. *e symmetric system architecture of the transfer is determined by adding true positive and true negative and learning method is shown in Figure 6. dividing the overall number of potential outcomes by the InceptionResNetV2 was developed by merging two of number of possible outcomes: the most well-known deep convolutional neural networks, TP + FN (2) Inception [20] and ResNet [21], and using batch normali- Accuracy � . TP + TF + FP + FN zation rather than summation for the traditional layers. *e popular transfer learning model, InceptionResNetV2, was Precision is a measure of how close predicted outcomes trained on data from the ImageNet database from various are to each other [25]. True positive is obtained by dividing sources and classifications, and it is definitely making waves. true positive by the sum of true and false positives: When include top �“False”, it simply indicates that the fully TP (3) connected layer will not be included, even if the input shape Precision � . TP + FP is specified. 224 ×224 ×3. When training �“False”, the weights in a particular layer are not changed during training. Recall is determined by dividing the total number of true *e dropout layer, which aids in overfitting prevention, positives by the total number of true positives and false randomly sets input units to 0 at a rate frequency at each step negatives: during training time. Dropout (0.5) represents a dropout TP (4) effect of 50 percent. Flattening is the process of converting Recall � . TP + FN data into a one-dimensional array for use in the next layer. *e output of the convolutional layers is flattened to gen- *e F1-score combines a classifier’s accuracy and recall erate a single large feature vector. It is also linked to the final into a single measure by calculating their harmonic mean. It classification model, forming what is known as a fully is most commonly used to compare the results of two connected layer. Batch normalization is a method for im- different classifiers. Assume classifier A has greater recall proving the speed and stability of artificial neural networks and classifier B has greater precision. In this case, the F1- by recentering and rescaling the inputs of the layers. When scores of both classifiers may be used to determine which building the pretrained models, Table 1 indicates that the performs better. *e F1-score of a classification model is batch size is 32, the maximum epoch is 25, and a loss computed as follows: function of “binary cross-entropy” is used. 2(Precision xRecall) *e sigmoid function is an activation function that as- (5) F1 � . Precision + Recall sists a neuron in making choices. *ese routines produce either a 0 or a 1. It employs probability to generate a binary It evaluates the correctness of the model dataset. Although output [22]. *e outcome is determined by determining who accuracy is difficult to grasp, the F1-score idea becomes more has the highest probability value. *is function outperforms useful in situations of uneven class distribution. It is used by the threshold function and is more useful for categorization. many machine learning models. It is utilized when false *is activation function is often applied to the last dense negatives and false positives are more important in the dataset block. *e equation for the sigmoid function is than genuine positives and true negatives. When the data are wrongly categorized, it produces better results. X � . (1) − Y *e confusion matrix displays the total number of right 1 + e and erroneous outcomes. It is possible to see all true-pos- ReLU is an activation function that operates on the itive, false-positive, true-negative, and false-negative num- concept of rectification. *is function’s output stays at 0 bers [26].*e greater the frequency of genuine positive and from the start until a specified point. After crossing or true-negative outcomes, the greater the accuracy. reaching a certain value, the output changes and continues to rise as the input changes [23]. Because it is only activated 3. Result and Analysis when there is a significant or significant input inside the In classifying normal images and TB, we experimented with neurons, this function works extremely well. a variety of models and methods in order to assess their utility and efficacy. Four pretrained CNN models were 2.6. Evaluation Criteria. Following the completion of the employed to classify chest X-ray pictures. *e models that training phase, all models were evaluated on the test dataset. are relevant include MobileNetV2, Xception, Inception- *e performance of these systems was evaluated using the ResNetV2, and Inception V3. *ere are two kinds of chest accuracy, precision, recall, F1-score, and AUC range. *is X-ray pictures. *e first is TB, whereas the second is normal. 6 Journal of Healthcare Engineering InceptionResNetV2 Normal Binary Class Tuberculosis TB Normal weights = 'imagenet', TB include_top = False, input_shape = (224, 224, 3) Chest X-Ray Images (TB/Normal) Load Pre-trained Model Training Phase Output Figure 6: System architecture with InceptionResNetV2. Table 1: Parameters used for compiling various models. *is study also used ImageNet data to use a transfer learning method that is successful in terms of training times when Parameters Value there is insufficient data. Batch size 32 Several network designs, including Xception, Incep- Shuffling Each epoch tionV3, InceptionResNetV2, and MobileNetV2, are tested Optimizer Adam −3 before deciding on a network architecture. A bespoke 19- Learning rate 1e −3 layer ConvNet is also tried, but it performs badly. *e Decay 1e /epoch Loss Binary_crossentropy InceptionResNetV2 performed the best of all networks, and Epoch 25 the findings based on that design are included. Table 2 shows Execution environment GPU the accuracy and loss history of four tried models. According to Table 2, the InceptionResNetV2 model achieves a validation or testing accuracy of 99.36 percent, with a validation loss of 2.37 percent. Normal images have 99 as “TB,” while predicting 1 percent of photographs as percent accuracy, 98 percent recall, and 99 percent F1- “normal.” Additionally, this research included genuine testing, which scores, whereas TB images have 98 percent precision, 99 percent recall, and 99 percent F1-scores. provided input to the model through chest X-ray images. When the model is complete, a file with the hdf5 extension is Figures 7 and 8 indicate that, at epoch 1, the training accuracy was pretty low in the first few epochs. *e starting created containing the produced model. Four hdf5 files rep- training accuracy is 57.20 percent, the training loss is 69.01 resenting four different models were created for this study. percent, the validation accuracy is 74.79 percent, and the Following that, a new notebook file is created with the ipynb loss is also huge (905.03 percent), indicating that the model test extension. Four models were included in this test file, and learns very slowly at first. *e training accuracy improves then, individual chest X-ray images were provided as input. as the number of epochs increases and the loss function Figures 10 and 11 show the prediction results in real time. begins to decrease. *e model evaluates the results at the *e result shown in Figure 10 is normal. *e input image end of 25 epochs; InceptionResNetV2 has a 99.12 percent was normal, and the model correctly predicted it. Figure 11 shows a tuberculosis chest X-ray image as an input. *e train accuracy and a 99.643 percent validation accuracy, with a train loss of 3.40 percent and a validation loss of 1.71 model then returned a valid result, indicating that the input percent. picture was of a TB chest X-ray. In Table 3, classification In identifying normal and tuberculosis (TB) images, results have been compared with the above reference papers. Figure 9 illustrates true-positive, true-negative, false-posi- In this article, using MobileNet, we achieved 97.93 tive, and false-negative scenarios. percent accuracy, but in [11], the authors achieved 94.33 According to the results, the InceptionResNetV2 model percent accuracy by using the same algorithm. But the correctly identifies imagesas “normal” 98 percent ofthe time difference between their work and our work is that we fine- and incorrectly labels normal photos as “TB” 2 percent of the tuned the model to increase its accuracy, whereas they used time. Additionally, the confusion matrix shows that the the general MobileNet algorithm in their work. Using algorithm accurately classifies 99 percent of TB photographs InceptionV3, they achieved higher accuracy than our model, Dropout Flatten BatchNormalization Dense with Relu Dense with Sigmoid Journal of Healthcare Engineering 7 Table 2: Comparison of pretrained models. Model Train accuracy Val accuracy Train loss Val loss Images Precision Recall F1-score Normal 1.00 0.90 0.95 Xception 0.9596 0.9543 0.1155 0.1213 TB 0.91 1.00 0.95 Normal 0.95 0.97 0.96 InceptionV3 0.9800 0.9757 0.1160 0.1243 TB 0.97 0.95 0.96 Normal 0.96 1.00 0.98 MobileNetV2 0.9930 0.9793 0.0220 0.0548 TB 1.00 0.96 0.98 Normal 0.99 0.98 0.99 InceptionResNetV2 0.9912 0.9936 0.0340 0.0237 TB 0.98 0.99 0.99 Model Accuracy 1.0 0.9 0.8 0.7 0.6 0.5 05 10 15 20 25 Epochs Train Val Figure 7: Training and validation accuracy. Model Loss 0 5 10 15 20 25 Epochs Train Val Figure 8: Training and validation loss. Accuracy Loss 8 Journal of Healthcare Engineering 687 13 (0.98) (0.02) (0.01) (0.99) predicted label Figure 9: Confusion matrix. Predicted Class Label: Normal 0 100 200 300 400 500 Figure 10: Normal prediction. Predicted Class Label: Tuberculosis 0 100 200 300 400 500 Figure 11: TB prediction. true label Journal of Healthcare Engineering 9 Table 3: Model comparison with other research. *is paper (model name) Accuracy (%) References paper (model name) Accuracy (%) 97.93 MobileNet Ref [11] MobileNet 94.33 (Validation or testing) Ref [12] InceptionV3 83.57 InceptionV3 98.00 Ref [11] InceptionV3 98.54 Xception 95.96 Ref model VGG16 87.71 99.36 Ref [12] Model ChexNet 96.47 InceptionResNetV2 (Validation or testing) Ref [12] Model DenseNet201 98.6 MobileNet 97.93 Ref [27] GoogleNet 89.6 but overall in this article, InceptionResnetV2 achieved the Acknowledgments highest accuracy of 99.36 percent, which is greater than any *e authors are thankful for the support from Taif Uni- previous work reported before. versity Researchers Supporting Project (TURSP-2020/26), Taif University, Taif, Saudi Arabia. 4. Conclusion A framework for deep learning analysis may be very beneficial References for individuals who do not get regular screening or checkups in countries with insufficient healthcare facilities. Deep [1] R.Ramya andP.S.Babu,“Automatictuberculosisscreeningusing learning in clinical imaging is particularly apparent in early canny Edge detection method,” in Proceedings of the 2nd Inter- analyses that may recommend preventive therapy. Due to a national Conference on Electronics and Communication Systems (ICECS), pp. 282–285, Coimbatore, India, February 2015. shortage of radiologists in resource-limited areas, technology- [2] Who, “Tuberculosis,” WHO, Geneva, Switzerland, 2020, assisted tuberculosis diagnosis is required to help reduce the https://www.who.int/news-room/fact-sheets/detail/ time and effort spent on tuberculosis detection. Medical tuberculosis. analysis powered by deep learning is still not as remarkable as [3] S. K. Sharma and A. Mohan, “Tuberculosis: from an incurable experts would want. *is study suggests that we may ap- scourge to a curable disease - journey over a millennium,” Indian proach that the level of accuracy by integrating many recent Journal of Medical Research, vol. 137, no. 9, pp. 455–93, 2013. breakthroughs in deep learning and applying them to suitable [4] “Overview tuberculosis (TB),” 2019, https://www.nhs.uk/ situations. In this research, we utilized the pretrained model conditions/tuberculosis-tb/ NHS. InceptionResNetV2 to develop an automated tuberculosis [5] C. Silverman, “An appraisal of the contribution of mass radi- detection method. With a validation accuracy of 99.36 per- ography in the discovery of pulmonary Tuberculosis,” American cent, the InceptionResNetV2 model has finally reached the Review of Tuberculosis, vol. 60, no. 4, pp. 466–482, 1949. [6] M. van Cleeff, L. E. K. Ndugga, H. Meme, J. Odhiambo, and new state of the art in identifying tuberculosis illness. Given P. Klatser, “*e role and performance of chest X-ray for the the following, an automated TB diagnosis system would be diagnosis of tuberculosis: a cost-effectiveness analysis in very helpful in poor countries where trained pulmonologists Nairobi, Kenya,” BMC Infectious Diseases, vol. 5, no.1, p.111, are in limited supply. *ese approaches would improve access to health care by reducing both the patient’s and the pul- [7] R. Hooda, S. Sofat, and A. Mittal, “Deep-learning: a potential monologist’s time and screening expenses. *is advancement method for tuberculosis detection using chest radiography,” will have a profound effect on the medical profession. Tu- in Proceedings of the IEEE International Conference on Signal berculosis patients may be readily identified with this method. and Image Processing Applications (ICSIPA), pp. 497–502, Diagnostics will benefit from this kind of approach in the Kuching, Malaysia, September 2017. future. Numerous deep learning methods may be used to [8] A. Rohilla, R. Hooda, and A. Mittal, “TB Detection in chest improve the parameters and generate a trustworthy model radiograph using deep learning,” International Journal of Advance Research in Science and Engineering, vol. 6, no. 8, that benefits mankind. Additionally, we may experiment with pp. 1073–1085, 2017. a number of image processing techniques in the future to aid [9] F. Pasa, V. Golkov, F. Pfeiffer, D Cremers, and D Pfeiffer, the model in learning the picture pattern more accurately and “Efficient deep network architectures for fast chest X-ray provide improved performance. Tuberculosis screening and visualization,” Scientific Reports, vol. 9, no. 1, pp. 6268-6269, 2019. Data Availability [10] P. Chhikara, P. Singh, P. Gupta, and T. Bhatia, “Deep con- volutional neural network with transfer learning for detecting *e data utilized to support these research findings are ac- Pneumonia on Chest X-rays,” Advances in Intelligent Systems cessible online at:https://www.kaggle.com/tawsifurrahman/ and Computing, vol. 1064, pp. 155–168, 2019. tuberculosis-tb-chest-xray-dataset. [11] T. Rahman, A. Khandakar, M. A. Kadir et al., “Reliable Tu- berculosis detection using chest X-ray with deep learning, Conflicts of Interest segmentation and visualization,” IEEE Access, vol. 8, pp. 191586–191601, 2020. *e authors declare that they have no conflicts of interest to [12] S. Kieu, T. Hwa, M. H. A. Hijazi, A. Bade, R. Yaakob, and report regarding this study. M. S. Jeffree, “Ensemble deep learning for tuberculosis 10 Journal of Healthcare Engineering detection using chest X-ray and canny edge detected images,” [27] Y. Cao, C. Liu, B. Liu et al., “Improving tuberculosis diag- IAES International Journal of Artificial Intelligence, vol. 8, nostics using deep learning and mobile health technologies among resource-poor and marginalized communities,” in no. 4, pp. 429–435, 2019. [13] E. Priya and S. Srinivasan, “Separation of overlapping bacilli Proceedings of the 2016 IEEE First International Conference on Connected Health: Applications, Systems and Engineering in microscopic digital TB images,” Biocybernetics and Bio- Technologies (CHASE), pp. 274–281, Washington, DC USA, medical Engineering, vol. 35, no. 2, pp. 87–99, 2015. June 2016. [14] R. A. A. Vishnu Makkapati, “Segmentation and classification of tuberculosis bacilli from ZN-stained sputum smear im- ages,” in Proceedings of the IEEE International Conference on Automation Science and Engineering, pp. 217–220, Bangalore, India, August 2009. [15] P. Sadaphal, J. Rao, G. W. Comstock, and M. F. Beg, “Image processing techniques for identifying mycobacterium tuber- culosis in ziehl-neelsen stains,” International Journal of Tu- berculosis & Lung Disease: 9e Official Journal of the International Union Against Tuberculosis and Lung Disease, vol. 12, no. 5, pp. 579–582, 2008. [16] “Tuberculosis (TB) chest X-ray database,” Kaggle, https://www. kaggle.com/tawsifurrahman/tuberculosis-tb-chest-xray-dataset. [17] E. Paul, P. Gowsalya, N. Devadarshini, M. P. Indhumathi, and M. Iniyadharshini, “Plant leaf perception using convolutional neural network,” International Journal of Psychosocial Re- habilitation, vol. 24, no. 5, pp. 5753–5762, 2020. [18] M. Sarıgul, ¨ B. M Ozyildirim, and M Avci, “Differential convolutional neural network,” Neural Networks: 9e Official Journal of the International Neural Network Society, vol. 116, no. 9, pp. 279–287, 2019. [19] H. Shouno, A. Suzuki, S. Suzuki, and S. Kido, “Deep con- volution neural network with 2-stage transfer learning for medical image classification,” 9e Brain & Neural Networks, vol. 24, no. 1, pp. 3–12, 2017. [20] C. Szegedy, V. Vanhoucke, S. Ioffe, J. Shlens, and Z. Wojna, “Rethinking the inception architecture for computer vision,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 2818–2826, Las Vegas, NV, USA, June 2016. [21] K. He, X. Zhang, S. Ren, and J. Sun, “Deep residual learning for image recognition,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 770–778, Las Vegas, NV, USA, June 2016. [22] G. Lewicki and G. Marino, “Approximation by superpositions of a sigmoidal function,” Zeitschrift fur ¨ Analysis und ihre Anwendungen, vol. 22, no. 2, pp. 463–470, 2003. [23] D. R. Nayak, D. Das, R. Dash, S. Majhi, and B. Majhi, “Deep extreme learning machine with leaky rectified linear unit for multiclass classification of pathological brain images,” Mul- timedia Tools and Applications, vol. 79, no. 21-22, pp. 15381–15396, 2019. [24] M. S. Faridi, M. A. Zia, Z. Javed, I. Mumtaz, and S. Ali, “A comparative analysis using different machine learning: an efficient approach for measuring accuracy of face recogni- tion,” International Journal of Machine Learning and Com- puting, vol. 11, no. 2, pp. 115–120, 2021. [25] W. Zhang, J. Chien, J. Yong, and R. Kuang, “Network-based machine learning and graph theory algorithms for precision oncology,” Npj Precision Oncology, vol. 1, no. 1, p. 25, 2017. [26] V. M. Patro and M. R. Patra, “Augmenting weighted average with confusion matrix to enhance classification sccuracy,” Transactions on Machine Learning and Artificial Intelligence, vol. 2, no. 4, 2014.

Journal

Journal of Healthcare EngineeringHindawi Publishing Corporation

Published: Nov 25, 2021

There are no references for this article.