0% found this document useful (0 votes)
94 views

A Comparative Study of Tuberculosis Detection

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
94 views

A Comparative Study of Tuberculosis Detection

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

2nd ICAICT, 28-29 November 2020, Dhaka, Bangladesh.

A Comparative Study of Tuberculosis Detection


Using Deep Convolutional Neural Network
Mehera Binte Mizan Dr. Md. Al Mehedi Hasan
Department of Computer Science & Engineering Department of Computer Science & Engineering
Rajshahi University of Engineering & Technology Rajshahi University of Engineering & Technology
Rajshahi, Bangladesh Rajshahi, Bangladesh
[email protected] mehedi [email protected]

Syed Rahat Hassan


Department of Computer Science & Engineering
Rajshahi University of Engineering & Technology
Rajshahi, Bangladesh
[email protected]

Abstract—Classification of distinct images is an engrossing Various deep learning methods are in use today which
research topic due to various purposes like disease detection and performs exceptionally well and in case of image analysis
diagnosis,security purposes and so on. Image classification plays CNN (Convolutional Neural Network) has proved to be quite
vital role in fast and early disease detection. Deep Learning is
helping to a great extent in identifying images more efficiently. powerful for feature extraction and make prediction. [2]. Pre-
In this paper,four pre-trained models: DenseNet-169, MobileNet, trained CNN models are quite useful when we try to make the
Xception, Inception-V3 were used to compare the results of best out of a small data-set.
tuberculosis CXR detection. Two datasets: Shenzhen Hospital X- In this paper we tried to detect Tuberculosis using 4 pre-
ray Set, Montgomery County X-ray Set were used and merged trained CNN models and compare their performances. We
to achieve a better result. Data augmentation was used to
make performance of the classifier more efficient. DenseNet- arranged rest of the sections in the the following manner:
169 performed best among the four architecture and got 91.6% Brief introduction about deep learning and CNN is presented
validation accuracy, 92% precision, 92% recall, 92% F1-score in Section II. Overview of similar works done regarding
and AUC score of 0.915. This research can have a positive impact tuberculosis detection is discussed in Section III. Section IV
to support doctors and researchers to identify tuberculosis and shows the materials and details of the methods we used for
compare different model’s performance .
Index Terms—Tuberculosis Detection, Convolutional neural conducting our research. In Section V findings of our research
network, Data augmentation, Deep learning is presented. Finally the discussion and conclusion of our work
is presented in Section VI .
I. I NTRODUCTION
Tuberculosis shortly known as TB an infectious disease II. D EEP LEARNING
which is contagious and normally effects the lungs . Mycobac- Deep learning appeared due to the characteristic confine-
terium tuberculosis bacteria is responsible for Tuberculosis. It ment of machine learning. In the case of machine learning,
has become one of the leading causes of death worldwide. The we use handcrafted features which is quite time-consuming.
diagnosis of this decease is not that easy. The pathological When we got more computing power, we found the usefulness
approach like The TB skin test takes 48 to 72 hours to of deep learning. There are many studies to make a reliable
give result [1]. But still it is far from perfect and gives network to work with various kinds of data to perform domain-
false positives some time. Another way to identify TB is specific work.
through Chest X-rays(CXR) which is observed by doctors. CNN(Convolutional Neural Network) is a deep learning
Early diagnosis of TB can reduce mortality rate significantly. method that is mostly used on images and extract features
Medical image analysis has turned up to be an burning issue from images. We take the pixel values of the image to
among computer scientist. To make the diagnosis more accu- give input to CNN which is represented as a matrix. Then
rate computer aided system(CAD) is really making progress. in the convolution layer, we use filters to get the feature
In case of traditional diagnosis process, expert human interven- maps. It reduces the image in an efficient way so that all
tion is needed. It is both time consuming and expensive. Data the good features still remain and good prediction can be
scientist are working continuously to make automated faster achieved. As activation function in the convolution process,
system to do this kind of work more accurately and efficiently. ReLu (Rectified Linear Unit) is mostly used. After that pooling
In many under developed countries where treatment facilities layer is normally given to reduce the number of parameters
is not up to the mark can use CAD systems to help the health and decline the computational force required to process the
workers make robust decisions. information. It is quite effective in case of over-fitting problem.

978-0-7381-2323-3/20/$31.00 ©2020 IEEE


There are two types of pooling layer: Average pooling and max TB data-set and proposed a mobile solution where chest x-
pooling. Average pooling gains the average of the pixel values ray will be uploaded into the sever and it will send back the
that are engulfed by the kernels where max pooling gives classification result. Using the GoogleNet [11] for binary and
the maximum pixel value that are engulfed by the kernels. multi-class classification, they achieved accuracy of 89.6% for
Then finally comes the FC(fully connected) layer is placed to binary classification and accuracy of 62.07% for multi-class
acquire the non-linear combination from the high level feature classification.
extracted from the previous layers. For the prediction, in the Hooda et al. [12] proposed a CNN architecture to detect
output layer softmax, sigmoid etc activation functions are used. Tuberculosis where they trained and tested it for different
There are some other techniques like batch-normalization, optimizer on the Shenzhen and Montgomery datasets. Adam
dropout, kernel regularizers to make the model more viable. optimizer achieved 82.09% validation accuracy which outper-
There are many stable and re-known architectures that formed momentum and SGD optimizer.
has been developed with time. Some of the recent
CNN architectures are AlexNet, ZfNet, VGG, DenseNet,
ResNet, GoogLeNet, Convolutional Block Attention Module
(ResNeXt101 (32x4d) + CBAM) etc [3]. These architectures
are available as pre-trained models as they are trained with
a huge amount of images from the ImageNet chalange [4].
This pre-trained weights are used to apply transfer learning in
many works.

III. P REVIOUS WORKS


There are many notable works regarding TB detection. One
of the earlier work was done by Ginneken et al. [5] where they
used local texture of the radio-graphs to identify abnormalities. Fig. 1. Working flow of classification
They used weighted nearest neighbor for classification purpose
and validation was achieved through leave one out cross- IV. M ETHODS AND M ATERIALS
validation. They achieved AUC of 0.82 and 0.986 using two
From Fig. 1 we can see the working flow used to conduct
private data-set. Tan et al. [6] proposed a semi-automated
this comparative study. In this section we are going to discuss
technique where pixel dispersion is utilized and as a classifier
methods and materials of our study.
decision tree was used. On a small private dataset the achieved
they best accuracy of 0.949. A. Dataset description
Jaeger et al. [7] showed that various mask like Log Gabor Due to the scarcity of data,in our work,we have used de-
mask, lung model mask and intensity mask can be used for identified images of chest x-ray (CXR) from two sources:
lung segmentation and as a classifier LSVM(Linear Support i) Shenzhen Hospital X-ray Set
Vector Machine) was used to classify CXR images. They also ii) Montgomery County X-ray Set
proposed a similar work where they used two different feature In Shenzhen Hospital X-ray Set,there are total 662 CXRs.
sets after using lung segmentation.They likewise proposed a Among them,326 images are normal and 336 images are
comparable work where they utilized two distinctive feature abnormal. In Montgomery Country X-ray Set,there are total
sets after lung segmentation is done using graph cut segmen- 138 CXRs. Among them,80 images are normal and rest 58
tation approach. Using two data-set as training purpose and are abnormal [13]. All the images have 3 color channels. All
one for testing, object detection feature vector achieved 0.87 images from Montgomery Country X-ray Set are of same size
of AUC and CBIR (Content based Image Retrieval) feature and the size is 4892*4020. But,the images from Shenzhen
vector got 0.90 AUC. Hospital X-ray Set are different in size. Solution to this
Xu et al. [8] proposed a 3 prime steps approach to detect problem is described in Preprocessing Data section. Sample
Tuberculosis. At first cavity candidates were pointed out. images from the data-sets are shownin Fig. 2.
Then with contour based segmentation cavity candidates were
segmented. Finally using SVM was used for classification B. Preprocessing data
purpose. It was tested on 35 Chest x-ray images and achieved Data preprocessing techniques play a vital role in achieving
82.8% accuracy. One of the first deep learning approach was the state of art on any dataset [14]. As mentioned in the
proposed by Hwang et al. [9] where he used transfer learning previous section, there is a problem about variety in image
and got better result than before.Training process was done on size. So,to eradicate this problem ,all images have been resized
custom dataset and it was tested on Montgomery and Shenzhen to 224*224.Then to reduce the pixel range effectively and
dataset. For Montgomery AUC of 0.88 and for Shenzhen yet to preserve the relative difference among the images,we
AUC of 0.93 were recorded. Deep learning method was also normalized the images by dividing all the pixel value with 255
implemented by Cao et al. [10] where they put together a as it is the highest present pixel value. Even after combining
range, rotation range,width and height shift range parameters
[15]. After the augmentation, we got total 3020 images of
which 1530 are normal and 1490 images are abnormal. From
Table I we can see details of data arrangement.

TABLE I
I MAGE D ISTRIBUTION OF T RAINING AND VALIDATION SET B EFORE AND
AFTER DATA AUGMENTATION

Before data augmentation After data augmentation


Class
Train set Validation set Train set Validation set
Normal 345 61 1530 61
Tuberculosis 335 59 1490 59
Total 680 120 3020 120

D. Models
i) Xception : Xception is an CNN architecture which
was created by google. There are main two approachers that
are used to build this network [16]. Those are: Depth-wise
(a) Shenzhen Hospital X-ray Set separable Convolution and short path between convolutional
blocks similar to RestNet. Generally point-wise convolution
comes after the depth-wise convolution. That implies the
quantity of connections are less and the model become more
lightweight. There are total 21,395,838 parameters. Of them
21,336,702 are trainable and 59,136 non-trainable parameters.
ii) Inception-v3 : GoggleNet introduced Inception in 2016
[17]. The architecture was modified in many ways after
that. In Inception-v2 batch normalization was used newly. In
Inception-v3 along with all the capability factorization scheme
was proposed which made the network few in parameters
and more computational efficient. It also gives similar ef-
fectiveness with minimized connections. In their study the
proposed smaller convolution using factorization technique.
For example, One 5*5 convolution is substituted with two
3*3 convolution. In case of one 5*5 convolution parameter
count is = 5 × 5 = 25. But in two 3*3 convolution parameters
reduces significantly which is = 3 × 3 + 3 × 3 =18. There were
total 22,337,142 parameters. Among which 22,298,102 were
trainable and 39,040 were non-trainable parameters.
iii) MobileNet : MobileNets is an lightweight ideal model
(b) Montgomery County X-ray Set for mobile and embedded vision applications [18]. This model
Fig. 2. Sample images from data-set uses similar approach like Xception architecture by using
depth-wise convolution and point-wise convolution. In ev-
ery channel which are for input,a single filter is applied
two dataset,we got only 800 data. So,to test our model,we and then 1*1 convolution applied as point-wise convolution.
used only 15% of the data. So to train our model, we have Batch normalization and Relu is used after every convolution
kept randomly 680 images and the rest 120 images are to test operation. There were total 3,496,982 parameters. Among
the trained model. which 3,472,534 were trainable and 24,448 were non-trainable
parameters.
C. Data augmentation iv) DenseNet-169 : The center of DenseNet is utilizing
As our total training data is 680 only,it creates quite a Dense blocks which is a fundamental thought behind it.
problem training our model. So,after keeping the unique data ”Densely Connected Convolutional Networks” was given the
for testing the model aside, to train the model constructively best paper award in IEEE Conference on Computer Vision and
data was augmented. Data augmentation is a promising method Pattern Recognition(CVPR) in 2017 [19]. Every single past
in helping classify data more accurately.There are various endeavor before this paper just utilized the layers in sequential
ways for data augmentation-horizontal flip,vertical flip,zoom way. In this paper, it is proposed that a layer send it’s output
TABLE II
P ERFORMANCE R EPORT

Validation
Model Class Precision Recall F1-Score Support
accuracy
Normal 0.90 0.93 0.92 61
DenseNet169 Tuberculosis 0.93 0.90 0.91 59 0.916
Avg/Toal 0.92 0.92 0.92 120
Normal 0.95 0.85 0.90 61
MobileNet Tuberculosis 0.86 0.95 0.90 59 0.899
Avg/Total 0.90 0.90 0.90 120
Normal 0.88 0.85 0.87 61
Xception Tuberculosis 0.85 0.88 0.87 59 0.871
Avg/Total 0.87 0.87 0.87 120
(a) (b)
Normal 0.89 0.92 0.90 61 Fig. 3. Classification performance curve of DenseNet-169 (a) Train and
InceptionV3 Tuberculosis 0.91 0.88 0.90 59 0.899
Avg/Total 0.90 0.90 0.90 120 validation loss (b) Train and validation accuracy

computed. From figure 3(a) ,we can see the train vs validation
to all the layer after it. For it’s deep supervision and feature loss curve. Fig 3(b) indicates the accuracy in both the cases.
reuse capability DenseNet expressly distinguish between data Fig. 4 shows the confusion matrix regarding this model,
that is added to the system and data that is already saved in DenseNet169 which is used for the performance measurement.
the system. There were total 13,077,398 parameters. Among From the matrix we can observe the following facts:
which 12,915,158 were trainable and 162,240 were non- • Normal CXR- Among 61 normal CXRs, 57 images have
trainable parameters. been successfully predicted using this model.
• Tuberculosis CXR- Among 59 CXRs, 53 images have
E. Experimental setup been efficiently anticipated.
We have used total 4 models for our comparative analysis-
DenseNet 169, MobileNet, Xception, InceptionV3 pre-trained
architecture. The models were implemented using tensorflow
keras API [20]. In all our models, we used GlobalAverage-
Pooling2D, BatchNormalization, Dropout, Dense layers with
’sigmoid’ activation function. Adam optimizer has been used
with the learning rate of 0.0001. Every model was trained
using training set for 90 epoch. Train batch size was set to 10
and validation batch size was set to 10. Binary cross-entropy
was chosen as loss function. The overall model performance is
measured in Accuracy. Average of Precision, Recall, F1-score
and AUC are also measured to assess the model.

V. E XPERIMENTAL ANALYSIS
From the Table II, it is clear that the data-set is best
trained using DenseNet-169 among the four models. The
validation accuracy for DenseNet-169 model is 91.67%. And
The least accuracy we got from validation set using Xception
architecture and the accuracy is 87.08%. Though MobileNet
and InceptionV3 have provided the same accuracy, 89.99% for
Fig. 4. Confusion matrix of DenseNet-169
the dataset, but their precision and recall values are different
from each other. Inception-v3 and MobileNet architecture got
AUC score of 0.907 , Xception architecture got AUC score of VI. C ONCLUSION
0.879 and DenseNet-169 got AUC score of 0.915. Tuberculosis is one of the top leading cause of death from
In the case of DenseNet, the classifier utilizes feature maps a single infectious agent. That’s why efficient way of identi-
of all kinds of levels. In general, it helps to make the decision fying this disease is paramount. Day by day Deep Learning
boundaries more even. We can interpret that this is one of methods are becoming irreplaceable in visual object detection.
the main reasons why dense net works well when there is In our work, we compared the results using four pre-trained
insufficient data. models on tuberculosis CXRs. The best result was achieved
As,DenseNet-169 performed best among these four archi- using DenseNet-169 architecture and the validation accuracy
tectures, the detailed result we got using this architecture is was 91.67% and AUC was 0.915 . But, scarcity of data is
discussed. To assess the performance of the model, train- prominently visible. To find a more robust solution future
validation loss curve and train-validation accuracy curve were researches will be conducted resolving these issues. One shot
or Few shot learning can be put into consideration to explore [19] G. Huang, Z. Liu, L. Van Der Maaten, and K. Q. Weinberger, “Densely
new possibilities. connected convolutional networks,” in Proceedings of the IEEE confer-
ence on computer vision and pattern recognition, 2017, pp. 4700–4708.
[20] The keras functional api in tensorflow. [Online]. Available: https:
R EFERENCES //www.tensorflow.org/guide/keras/functional
[1] Tuberculosis. [Online]. Available: https://www.mayoclinic.org/
diseases-conditions/tuberculosis/diagnosis-treatment/drc-20351256
[2] N. Tajbakhsh, J. Y. Shin, S. R. Gurudu, R. T. Hurst, C. B. Kendall, M. B.
Gotway, and J. Liang, “Convolutional neural networks for medical image
analysis: Full training or fine tuning?” IEEE transactions on medical
imaging, vol. 35, no. 5, pp. 1299–1312, 2016.
[3] A. Khan, A. Sohail, U. Zahoora, and A. S. Qureshi, “A survey of the
recent architectures of deep convolutional neural networks,” Artificial
Intelligence Review, pp. 1–62, 2019.
[4] O. Russakovsky, J. Deng, H. Su, J. Krause, S. Satheesh, S. Ma,
Z. Huang, A. Karpathy, A. Khosla, M. Bernstein et al., “Imagenet large
scale visual recognition challenge,” International journal of computer
vision, vol. 115, no. 3, pp. 211–252, 2015.
[5] B. Van Ginneken, S. Katsuragawa, B. M. ter Haar Romeny, K. Doi,
and M. A. Viergever, “Automatic detection of abnormalities in chest
radiographs using local texture analysis,” IEEE transactions on medical
imaging, vol. 21, no. 2, pp. 139–149, 2002.
[6] J. H. Tan, U. R. Acharya, C. Tan, K. T. Abraham, and C. M. Lim,
“Computer-assisted diagnosis of tuberculosis: a first order statistical
approach to chest radiograph,” Journal of medical systems, vol. 36, no. 5,
pp. 2751–2759, 2012.
[7] S. Jaeger, A. Karargyris, S. Antani, and G. Thoma, “Detecting tuber-
culosis in radiographs using combined lung masks,” in 2012 Annual
international conference of the IEEE engineering in medicine and
biology society. IEEE, 2012, pp. 4978–4981.
[8] T. Xu, I. Cheng, R. Long, and M. Mandal, “Novel coarse-to-fine dual
scale technique for tuberculosis cavity detection in chest radiographs,”
EURASIP Journal on Image and Video Processing, vol. 2013, no. 1,
p. 3, 2013.
[9] S. Hwang, H.-E. Kim, J. Jeong, and H.-J. Kim, “A novel approach for
tuberculosis screening based on deep convolutional neural networks,” in
Medical imaging 2016: computer-aided diagnosis, vol. 9785. Interna-
tional Society for Optics and Photonics, 2016, p. 97852W.
[10] Y. Cao, C. Liu, B. Liu, M. J. Brunette, N. Zhang, T. Sun, P. Zhang,
J. Peinado, E. S. Garavito, L. L. Garcia et al., “Improving tuberculosis
diagnostics using deep learning and mobile health technologies among
resource-poor and marginalized communities,” in 2016 IEEE first in-
ternational conference on connected health: applications, systems and
engineering technologies (CHASE). IEEE, 2016, pp. 274–281.
[11] C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. Reed, D. Anguelov, D. Erhan,
V. Vanhoucke, and A. Rabinovich, “Going deeper with convolutions,”
in Proceedings of the IEEE conference on computer vision and pattern
recognition, 2015, pp. 1–9.
[12] R. Hooda, S. Sofat, S. Kaur, A. Mittal, and F. Meriaudeau, “Deep-
learning: A potential method for tuberculosis detection using chest
radiography,” in 2017 IEEE International Conference on Signal and
Image Processing Applications (ICSIPA). IEEE, 2017, pp. 497–502.
[13] S. Jaeger, S. Candemir, S. Antani, Y.-X. J. Wáng, P.-X. Lu, and
G. Thoma, “Two public chest x-ray datasets for computer-aided screen-
ing of pulmonary diseases,” Quantitative imaging in medicine and
surgery, vol. 4, no. 6, p. 475, 2014.
[14] K. K. Pal and K. Sudeep, “Preprocessing for image classification by
convolutional neural networks,” in 2016 IEEE International Conference
on Recent Trends in Electronics, Information & Communication Tech-
nology (RTEICT). IEEE, 2016, pp. 1778–1781.
[15] J. Wang and L. Perez, “The effectiveness of data augmentation in image
classification using deep learning,” Convolutional Neural Networks Vis.
Recognit, p. 11, 2017.
[16] F. Chollet, “Xception: Deep learning with depthwise separable convolu-
tions,” in Proceedings of the IEEE conference on computer vision and
pattern recognition, 2017, pp. 1251–1258.
[17] 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, 2016, pp.
2818–2826.
[18] A. G. Howard, M. Zhu, B. Chen, D. Kalenichenko, W. Wang,
T. Weyand, M. Andreetto, and H. Adam, “Mobilenets: Efficient convo-
lutional neural networks for mobile vision applications,” arXiv preprint
arXiv:1704.04861, 2017.

You might also like