Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Pulmonary Tuberculosis Detection Using Deep Learning

Convolutional Neural Networks


Michael Norval Zenghui Wang Yanxia Sun
Department of Electrical and Mining Department of Electrical and Mining Department of Electrical and
Engineering Engineering Electronic Engineering Science,
University of South Africa University of South Africa University of Johannesburg, Auckland
Florida 1710, South Africa Florida 1710, South Africa Park 2006, South Africa.
mnorval@gmail.com wangzengh@gmail.com sunyanxia@gmail.com

ABSTRACT to diagnose such images for the existence of tuberculosis bacteria


presence in digital x-ray data. Traditional machine learning and
Tuberculosis (TB) is classified as one of the top ten reasons for
vision detection techniques require expertly crafted features to be
death from an infectious agent. This paper is to investigate the
manually created and defined. [8] With medical image diagnostics,
accuracy of two methods to detect Pulmonary Tuberculosis based
there are too many features for this to be a viable technique. Deep
on the patient chest X-ray images using Convolutional Neural
learning Neural Networks coupled with supervised learning would
Networks (CNN). Various image preprocessing methods are
be the best approach [2]. Various visual features like the texture
tested to find the combination that yields the highest accuracy.
and geometric features are extracted with classification being a
Moreover, a hybrid approach using the original statistical
threshold or k-nearest approach. Convolutional Neural Network
computer-aided detection method combined with Neural
(CNN) architectures have been proven advantageous in terms of
Networks was also investigated. Simulations have been carried
universality and stability [1]. With South Africa being one of the
out based on 406 normal images & 394 abnormal images. The
countries with very high infection rates, it is crucial to identify the
simulations show that a cropped region of interest coupled with
infection as soon as possible. Utilizing an already state of the art
contrast enhancement yields excellent results. When further
cell phone communications network the images can be digitized,
enhancing the images with the hybrid method even better results
remotely sent to a center for diagnostics. If Neural Networks are
are achieved.
used to detect the disease with a Radiologist confirming the result,
CCS Concepts the whole process would be much quicker and efficient.
Subsequently, the more data received the more the network will
• Computing methodologies~Image processing
learn and ultimately the accuracy will also improve significantly.
Keywords However, it is necessary to investigate and identify the methods
yielding the higher accuracy. In this paper, we investigate two
Artificial Intelligence; Tuberculosis; Pulmonary; Lung X-Ray;
deep learning methods with DCNN for classifying TB
Chest; Neural Network; Rectification Linear Unit.
manifestations in chest X-Ray images. The first being various
1. INTRODUCTION preprocessing methods and the second the hybrid method. The
hybrid method is a combination between Computer Aided
The digital medical industry has evolved significantly in the past
Detection (CAD) and DCNN. Both methods show excellent
decade. Most institutions are steering away from the analog way
results with the hybrid method showing the highest accuracy.
of operations and moving to digital. Digital software driven
healthcare is in use not only by radiology departments but many The rest of this paper is structured as follows. Section II gives a
other clinical specialties and technical staff has also realized the brief literature review about pulmonary tuberculosis and
potential of digital medicine [3]. With patient data being digital convolutional neural network. The research methodology is given
this would allow and open the door to computerized diagnostics in Section 3. Section 4 describes the datasets and experimental
and artificial intelligence detection mechanisms. The specific settings. Section 5 details the evaluations of the experimental
theme investigated in this research paper is to use neural networks results. Section 6 discusses the result meaning and section 7 gives
the conclusion and future work.
Permission to make digital or hard copies of all or part of this work for
personal or classroom use is granted without fee provided that copies are
2. LITERATURE REVIEW
not made or distributed for profit or commercial advantage and that 2.1 Digital Imaging and Communication in
copies bear this notice and the full citation on the first page. Copyrights
for components of this work owned by others than ACM must be Medicine (DICOM)
honored. Abstracting with credit is permitted. To copy otherwise, or The acronym DICOM stands for Digital Imaging and
republish, to post on servers or to redistribute to lists, requires prior Communication in Medicine and forms a key part in digital CXR
specific permission and/or a fee. Request permissions from images. Where in the olden days an X-ray image was taken and
Permissions@acm.org. then developed on a film to form the image, DICOM is the
ICVIP 2019, December 20–23, 2019, Shanghai, China method where digitized image data and patient demographics can
© 2019 Association for Computing Machinery.
be transmitted from a modality to a workstation or Picture
ACM ISBN 978-1-4503-7682-2/19/12…$15.00
Archiving and Communication System (PACS) An X-Ray
https://doi.org/10.1145/3376067.3376068 machine can be seen in Figure 1.

47
2.2 Pulmonary Tuberculosis 3. RESEARCH METHODOLOGY
The definition of “Pulmonary” as per the Oxford dictionary is To improve detection accuracy, it is necessary to test varying
“Relating to the lungs”. When the tuberculosis infection becomes color depth and preprocessing methods using the steps shown in
active, the lungs are mostly affected, but other body parts outside Figure 4. A fixed random generator provides more stable results
the lungs can also be affected. Three main TB types are Miliary that fluctuate less. The color depth was tested and compared and
TB, Active TB, Latent TB. The focus of this paper is on active grayscale provides the same result as RGB. Following the color
TB. Active TB occurs when the bacteria multiplies and invades depth test various image preprocessing methods are tested. The
different organs. Typical symptoms are cough, phlegm, chest results are shown in the evaluation section.
pain, weakness, weight loss, fever, chills, and sweating at night. A
person with active PTB may spread the disease via air. Typical
symptoms are cough, phlegm, chest pain, weakness, weight loss,
fever, chills, and sweating at night. Patient symptoms are chest
pains, night sweats, fever, fatigue, and a prolonged cough [7]. Not
every patient manifests the symptoms, some patients have little or
no symptoms [6]. From Figure 2, one can see an electron
microscope image of the Tuberculosis bacterium.

Figure 3. Multi-Layer neural network [4]

Figure 1: X-Ray Machine[11].

Figure 4. Color depth and pre processing method

Figure 5. Hybrid approach


Figure 2. Image of an electron microscope enlargement of the
Tuberculosis bacterium [10]. For achieving further accuracy, a method called the hybrid
method is investigated. The preprocessed image set in Figure 4
2.3 Convolutional Neural Networks (3rd Block output) is used and subjected to further processing
Normally in multi-layer neural networks (MLNN), the inputs are where the ROI is extracted from these images. Again a fixed
in vector form. For Medical Images, the neighboring pixels or random generator is utilized for more stable accuracy results. The
voxels are another source of information. When using MLNN the method is a Hybrid approach between steps used in Computer
vectorization process discards the voxel and neighboring pixel Aided Detection (CAD) and DCNN. The lung Region of Interest
information, and thus CNNs are used. When using convolutional (ROI) is extracted and fed into the DCNN as dataset. The
layers coupled with pooling and finally fully connected layers, the motivation behind this is to eliminate all unnecessary data and
spatial information in the voxels can be much better utilized, and only keep the image data of the lung region. This allows for
the structure of CNN is shown in Figure 3 [4]. training only to happen on the relevant features. This process can
be seen in Figure 5.

48
4. DATASETS AND EXPERIMENTAL
SETTINGS
4.1 Datasets
Link to main Datasets used:
https://ceb.nlm.nih.gov/repositories/tuberculosis-chest-x-ray-
image-data-sets/
Shenzhen Hospital X-ray Set:
X-ray images in this data set have been collected by Shenzhen
Figure 6. X-ray Contrast Enhancement.
No.3 Hospital in Shenzhen, Guangdong province, China. The x-
rays were acquired as part of the routine care at Shenzhen It can be seen from Table 1 that the preprocessing method
Hospital. The set contains images in JPEG format. There are 336 yielding the best results is a combination of taking the ROI image
normal x-rays and 326 abnormal x-rays showing various of only the lung region and combining this with contrast
manifestations of tuberculosis. enhancement. The process is executed three times and the results
recorded as 1,2,3 in 3rd accuracy column. Highest success rate
Montgomery: here is 91.04%
X-ray images in this data set have been acquired from the
tuberculosis control program of the Department of Health and
Human Services of Montgomery County, MD, USA. This set
contains 138 posterior-anterior x-rays, of which 80 x-rays are
normal and 58 x-rays are abnormal with manifestations of
tuberculosis. All images are de-identified and available in DICOM
format. The set covers a wide range of abnormalities, including
effusions and miliary patterns. se

4.2 Settings
The software used for the simulation is Matlab. The Image
Processing and Neural Network Toolboxes of this product are Figure 7. X-Ray Histogram Equalization.
used. The settings of the simulations are
 All data is shuffled as to never have a repeat sequence of the
same data
 A mini batch of 80 is used
 30 Epochs specified as a maximum
 10% of all data is used for verification
 A fixed random generator for the initial weight selection is
used. This ensures that all simulations start with the same
random weight values selected. Subsequently the results do not
deviate. This method is used in all simulations.
5. EVALUATION
The evaluation is to investigate the detection success rate of two Figure 8: X-Ray Adaptive Histogram Equalization.
different methods. The following methods are evaluated: image
preprocessing and secondly the hybrid approach.

5.1 Various Pre Processing Techniques


The input data is enhanced and then the simulation is executed.
Figure 6 shows contrast enhancement. Figure 7 and Figure 8
shows histogram equalization. Figure 9 showed the final adjusted
and cropped image used in the dataset. In the following
simulations, various preprocessing is applied to the input set of
images. Histogram Equalization, contrast enhancement, reducing
of the color channel, sharpening and taking the cropped ROI.
Figure 9: X-Ray Image, Adjusted and Cropped.
Table 1. Image preprocessing results
Pre Processing Image res & color Accuracy
Histogram Equalization 64x64x1 1. 78,46%
2. 76.92%
3. 80.00%

49
Contrast Enhance 64x64x1 1. 75.38% 6. DISCUSSION
And Color channel reduce 2. 81.54% Diseases like TB has a very high mortality rate on the African
3. 80.00% continent and worldwide. It is essential to identify it as quick and
Contrast Enhance and 64x64x1 1. 78.46% accurately as possible. Detection accuracy can save lives. The two
Histogram Equalization 2. 70.77% tested methods show how to improve the detection accuracy by
setting the experiments. More preprocessing techniques like PCA
3. 73.85%
whitening must be investigated in future. If coupled with the
Sharpening 64x64x1 1. 78.46% hybrid method better results can be achieved.
2. 83.08%
3. 82.29% 7. CONCLUSION AND FUTURE WORK
Cropped ROI 64x64x1 1. 83.58% The results yield solid evidence that preprocessing of images
shows a higher accuracy than no preprocessing. Subsequently
2. 83.58%
extracting only the ROI from these images yields even better
3. 80.60% results with a maximum accuracy of 92.54% the main advantage
Cropped ROI & Contrast 64x64x1 1. 89.55% of the hybrid method is significantly better accuracy by reducing
Enhance 2. 91.04% overfitting.
3. 89.55% In the future, we would be to obtain more clinical data and thus
vastly improve the accuracy of the detection. In order to obtain the
5.2 Hybrid Method data, collaboration can be done with some sort of organization like
This method is a mixture between the normal computer-aided a state TB hospital. Over time more data will be processed and the
detection and neural network. The preprocessing and system will keep on learning and improve its accuracy. This
Segmentation part of CAD [5] is used and then fed into a Neural ‘system’ or rather portal can then be expanded to other institutions
Network. Images are extracted so that only the lung ROI remains. as well as assisting with the diagnosing of Tuberculosis.
Figure 6 shows the result of the operation. The results are higher
than the data enhancement method. The advantage of only using 8. ACKNOWLEDGEMENT
the ROI for training is that irrelevant data and features are This research is supported partially by South African National
eliminated from the dataset and overfitting is reduced. Figure 10 Research Foundation Grants (No. 112108 and 112142), and South
shows an extracted ROI. Figure 11 shows the extracted ROI African National Research Foundation Incentive Grant (No.
when the patient has a partial lung left. 95687 and 114911), Eskom Tertiary Education Support
Programme Grants, Research grant from URC of University of
Johannesburg.

9. REFERNCES
[1] Chang Liu et al.2017. TX-CNN: Detecting tuberculosis in
chest X-ray images using convolutional neural network. 2017
IEEE International Conference on Image Processing
(ICIP)(2017), 2314–2318.
DOI=http://dx.doi.org/10.1109/icip.2017.8296695
[2] Razzak, M., Naz, S. and Zaib, A. 2017. Deep Learning for
Figure 10. Extracted Lung Region of Interest. Medical Image Processing: Overview, Challenges and the
Future. Lecture Notes in Computational Vision and
Biomechanics. (2017), 323-350.
DOI=http://dx.doi.org/10.1007/978-3-319-65981-7_12
[3] Hruby, W. 2010. Digital revolution in radiology: bridging the
future of health care. Vienna: Springer Verlag, 2010, pp1-25.
[4] S.Kevin Zhou, Hayit Greenspan, and Dinggang Shen.
2017. Deep learning for medical image analysis, London:
Academic Press.
[5] Rahul Hooda, Sanjeev Sofat, Simranpreet Kaur, Ajay Mittal,
and Fabrice Meriaudeau. 2017. Deep-learning: A potential
method for tuberculosis detection using chest
Figure 11. Extracted Lung ROI (Partial Lung). radiography. 2017 IEEE International Conference on Signal
Table 2. Hybrid lung ROI method and Image Processing Applications (ICSIPA)(2017).
DOI=http://dx.doi.org/10.1109/icsipa.2017.8120663
Pre Processing Image res & color Accuracy
[6] Agyeman, A., & Ofori-Asenso, R. 2017. Tuberculosis—an
Hybrid Method Extracted 64x64x1 1. 91.04% overview. Journal Of Public Health And Emergency. 1-4.
Lung Blob 2. 92.54% DOI=http://dx.doi.org/10.21037/jphe.2016.12.08
3. 89.55% [7] S. Jaeger, A. Karargyris, S. Antani, and G. Thoma. 2012.
The result of the hybrid method obtained the highest accuracy and Detecting tuberculosis in radiographs using combined lung
reached a 92.54% detection rate as can be seen in Table 2. masks. 2012 Annual International Conference of the IEEE

50
Engineering in Medicine and Biology Society (2012). DOI= archive, Volume 89 Issue C, October 2017, pp 135-143.
http://dx.doi.org/10.1109/embc.2012.6347110 DOI= http://doi.org/10.1016/j.compbiomed.2017.08.001
[8] Kamble, P a., Anagire V., Chamtagoudar, S.N. 2016. CXR [10] Microbiologyinpictures. Retrieved April 26, 2019 from
Tuberculosis Detection Using MATLAB Image Processing. https://www.microbiologyinpictures.com/bacteria
International Research Journal of Engineering and photos/mycobacterium tuberculosis photos/MYTU20.html
Technology (IRJET), pp1-3. [11] X-Ray Machine. Retrieved January 7, 2020 from
[9] Lopesb, U.K., Valiatia J.F. 2017. Pre-trained convolutional https://www.imexmedical.com/product/x-ray-machine-for-
neural networks as feature extractors for tuberculosis medical-centre-chiropractor-etc/
detection. Journal Computers in Biology and Medicine

51

You might also like