<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article  PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd"><article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article"><front><journal-meta><journal-id journal-id-type="publisher-id">ACT</journal-id><journal-title-group><journal-title>Advances in Computed Tomography</journal-title></journal-title-group><issn pub-type="epub">2169-2475</issn><publisher><publisher-name>Scientific Research Publishing</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.4236/act.2019.84005</article-id><article-id pub-id-type="publisher-id">ACT-97185</article-id><article-categories><subj-group subj-group-type="heading"><subject>Articles</subject></subj-group><subj-group subj-group-type="Discipline-v2"><subject>Computer Science&amp;Communications</subject><subject> Medicine&amp;Healthcare</subject></subj-group></article-categories><title-group><article-title>
 
 
  Tuberculosis Detection from Computed Tomography with Convolutional Neural Networks
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Xudong</surname><given-names>Liu</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref><xref ref-type="corresp" rid="cor1"><sup>*</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Haoxiang</surname><given-names>Lei</given-names></name><xref ref-type="aff" rid="aff2"><sup>2</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Sicun</surname><given-names>Han</given-names></name><xref ref-type="aff" rid="aff3"><sup>3</sup></xref></contrib></contrib-group><aff id="aff3"><addr-line>Chengdu Jiaxiang Foreign Language School, Chengdu, China</addr-line></aff><aff id="aff1"><addr-line>Xi’an Jiaotong University, Xi’ an, China</addr-line></aff><aff id="aff2"><addr-line>Electrical and Computer Engineering, Illinois Institute of Technology, Chicago, US</addr-line></aff><pub-date pub-type="epub"><day>18</day><month>12</month><year>2019</year></pub-date><volume>08</volume><issue>04</issue><fpage>47</fpage><lpage>56</lpage><history><date date-type="received"><day>9,</day>	<month>October</month>	<year>2019</year></date><date date-type="rev-recd"><day>15,</day>	<month>December</month>	<year>2019</year>	</date><date date-type="accepted"><day>18,</day>	<month>December</month>	<year>2019</year></date></history><permissions><copyright-statement>&#169; Copyright  2014 by authors and Scientific Research Publishing Inc. </copyright-statement><copyright-year>2014</copyright-year><license><license-p>This work is licensed under the Creative Commons Attribution-NonCommercial International License (CC BY-NC).http://creativecommons.org/licenses/by-nc/4.0/</license-p></license></permissions><abstract><p>
 
 
  Convolutional neural network
   
  (CNN), a class of deep neural networks (most commonly used in visual image analysis), has become one of the most influential innovations in the field of computer vision. In our research, we built a system which allows the computer to extract the feature and recognize the image of human lungs and to automatically conclude the health level of the lungs based on database. Here, we built a CNN model to train the datasets. After the training, the system could do certain preliminary analysis already. In addition, we used the fixed coordinate to reduce the noise and combined the Canny algorithm and the Mask algorithm to further improve the accuracy of the system. The final accuracy turned out to be 87.0%, which is convincing. Our system can contribute a lot to the efficiency and accuracy of doctors’ analysis of the patients’ health level. In the future, we will do more improvement to reduce noise and increase accuracy.
 
</p></abstract><kwd-group><kwd>Lungs</kwd><kwd> Tuberculosis Detection</kwd><kwd> Computed Tomography</kwd><kwd> Convolutional Neural Networks</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. Introduction</title><p>According to the World Health Organization, there are more than 10 million cases of tuberculosis in the world. However, the number of doctors does not match the number of patients. Less than 55,000 physicians across the United States are able to treat the disease. If patients are not treated in time, a lot of life will disappear. In areas such as India or Africa, where there are more patients and fewer doctors, this can be very serious. Therefore, we hope to build a model to improve the efficiency of the medical process. With a more accurate and effective image recognition and analysis system to help doctors, patients can get timely treatment. The morbidity of tuberculosis is also more than 30% in the past few years (see from <xref ref-type="table" rid="table1">Table 1</xref>) [<xref ref-type="bibr" rid="scirp.97185-ref1">1</xref>].</p><p>From 2005 to 2015, 92,587 cases of tuberculosis were reported in Beijing, with an average reported incidence of 44.8/100,000. See <xref ref-type="table" rid="table1">Table 1</xref> for the reported incidence and incidence in each year</p><p>Convolutional neural network (CNN) is one of the most representative algorithm used in deep learning. In CNN, each image would be expressed as a matrix of RGB values, for better recognition. CNN has “shared-weights architecture and translation invariance” characteristics, which means, each neuron in the first layer is connected with all the neuron in the next layer. One neuron would only extract feature of the image. Only after all the neurons are connected together to constitute the matrix, the complete image could be recognized.</p><p>In the current studies, CNN model was frequently used for image recognition purpose in field such as social media or modeling system. To be more specific, CNN model is quite indispensable when applied to relevant technology including Infrared Imagery, Feature Extraction, and Three-dimensional Imagery. Despite the popularity, we rarely see this method contribute to medical purpose. Considering the issue of medical disequilibrium which occurs extensively across the world, our team thus created a model of medical image recognition.</p><p>In our research, CNN model was used to train the dataset and to realize the recognition of image. Basically, CNN model is a frame we used to build our system. And other methods such as Canny algorithm and the Mask algorithm are substances for filling this frame (accuracy improvement) The model should recognize the image of human lungs and thus calculate the possibility that the organ has been infected with certain disease, which, in this case, the tuberculosis (TB).</p><table-wrap id="table1" ><label><xref ref-type="table" rid="table1">Table 1</xref></label><caption><title> Reported incidence of tuberculosis in Beijing from 2005 to 2015</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >Year</th><th align="center" valign="middle" >Cases</th><th align="center" valign="middle" >Population (ten thousand)</th><th align="center" valign="middle" >Morbidity (everyone hundred thousand)</th></tr></thead><tr><td align="center" valign="middle" >2005</td><td align="center" valign="middle" >9530</td><td align="center" valign="middle" >1538.0</td><td align="center" valign="middle" >62.0</td></tr><tr><td align="center" valign="middle" >2006</td><td align="center" valign="middle" >8500</td><td align="center" valign="middle" >1581.0</td><td align="center" valign="middle" >53.8</td></tr><tr><td align="center" valign="middle" >2007</td><td align="center" valign="middle" >8826</td><td align="center" valign="middle" >1633.0</td><td align="center" valign="middle" >54.0</td></tr><tr><td align="center" valign="middle" >2008</td><td align="center" valign="middle" >9892</td><td align="center" valign="middle" >1695.0</td><td align="center" valign="middle" >58.4</td></tr><tr><td align="center" valign="middle" >2009</td><td align="center" valign="middle" >8387</td><td align="center" valign="middle" >1755.0</td><td align="center" valign="middle" >47.8</td></tr><tr><td align="center" valign="middle" >2010</td><td align="center" valign="middle" >8402</td><td align="center" valign="middle" >1961.2</td><td align="center" valign="middle" >42.8</td></tr><tr><td align="center" valign="middle" >2011</td><td align="center" valign="middle" >8431</td><td align="center" valign="middle" >2018.6</td><td align="center" valign="middle" >41.8</td></tr><tr><td align="center" valign="middle" >2012</td><td align="center" valign="middle" >8497</td><td align="center" valign="middle" >2069.3</td><td align="center" valign="middle" >41.1</td></tr><tr><td align="center" valign="middle" >2013</td><td align="center" valign="middle" >7677</td><td align="center" valign="middle" >2114.8</td><td align="center" valign="middle" >36.3</td></tr><tr><td align="center" valign="middle" >2014</td><td align="center" valign="middle" >7463</td><td align="center" valign="middle" >2151.6</td><td align="center" valign="middle" >34.7</td></tr><tr><td align="center" valign="middle" >2015</td><td align="center" valign="middle" >6982</td><td align="center" valign="middle" >2170.5</td><td align="center" valign="middle" >32.2</td></tr><tr><td align="center" valign="middle" >Total</td><td align="center" valign="middle" >92,587</td><td align="center" valign="middle" >20,688.0</td><td align="center" valign="middle" >44.8</td></tr></tbody></table></table-wrap><p>With the assistance of the system, the efficiency of the medical treatment process should be improved. This approach, originally created to assist the overwhelmed doctors with the problem of inability to diagnose excess patients, should be particularly benefit applying to area such as Southeast Asia or Africa.</p></sec><sec id="s2"><title>2. Materials and Methods</title><sec id="s2_1"><title>2.1. Datasets</title><p>The dataset we used is from Pulmonary Chest X-Ray Abnormalities.</p><p>It contains 635 pieces of images and includes normal lungs and abnormal lungs. All of the images are labeled with either “0” or “1”. “0” means that this lung is normal and “1” means abnormal. For each image, its size is 3000 &#215; 3000, which is a large image. So we resize the images into 150 &#215; 145, which saved a lot of time in training the model.</p><p><xref ref-type="fig" rid="fig1">Figure 1</xref> illustrates the different color between the normal and abnormal lungs. Therefore, our model specified different color and shape of the lungs to identify diseases.</p></sec><sec id="s2_2"><title>2.2. Method</title><p>To begin with, we randomly separated the CT images of lungs in the database into three different sets—the training set, the validation set and the test set and the division ratio is 6:2:2. The training set and validation set were taken into operation in training phase, and test set was used to check the accuracy (<xref ref-type="fig" rid="fig2">Figure 2</xref>). Then, we put the two sets into the CNN model we built.</p><p>Convolutional neural networks (CNNs) are a class of deep neural networks. CNN is widely used and the de-facto standard in image recognition. Each CNN model consists of two main parts, one is feature learning and the other is classification. For the feature learning, we can [remove can’s] operate different numbers of layers, and there will be a Convolution filter, Activation function and a pooling. And we used Maxpooling, whose function is to combine small local region into single output with the largest value in the region, which could greatly avoid the massive calculation. Then in the classification part, we flattened and densed the matrix (<xref ref-type="fig" rid="fig3">Figure 3</xref>).</p><p>In our CNN model, we built two layers in our code. We added two Convolution2D functions. In the first layer, we had 25 filters with size (5, 5), and we used 50 filters in the second layer with the same size. After each Convolution2D, we used Maxpooling to reduce the calculation and then used the Activation function—“relu”. Finally, because our images are labeled with either “0” or “1”, we densed the output into two chann. After we ran our training program, the trained CNN model was able to distinguish whether the lungs in the CT image are healthy or not. Then we visualized the result we got <xref ref-type="fig" rid="fig4">Figure 4</xref> and <xref ref-type="fig" rid="fig5">Figure 5</xref>.</p><p>In <xref ref-type="fig" rid="fig4">Figure 4</xref>, we set the study rate as 0.01, and the validation accuracy we got was 78%. Then in <xref ref-type="fig" rid="fig5">Figure 5</xref>, we tried to modify different parameters, we improved validation accuracy to 81% with study rate of 0.001 at the end.</p></sec></sec><sec id="s3"><title>3. Results and Discussion</title><p>Although previous accuracy has been satisfactory, we have come up with other ways to improve accuracy. We find that there is some noise in the image. Most of them are from the Spinal cord and rib. So our aim is to remove the spinal cord and rib, which means extracting the lungs only. Then put the extracted lungs back into our model.</p><sec id="s3_1"><title>3.1. Using Fixed Coordinate</title><p>In this method, our idea is to cut out the lungs part, because the TB is mainly diagnosed from the lungs. We extract the lungs from the original image (<xref ref-type="fig" rid="fig6">Figure 6</xref>).</p><p>Unfortunately, this method does not solve our problem, because we do not remove the spinal cord and rib from the lungs. Additionally, due to different sizes of the lungs, sometimes we could only cut out part of the lungs using fixed coordinates (shown in <xref ref-type="fig" rid="fig7">Figure 7</xref>).</p><p>In <xref ref-type="fig" rid="fig7">Figure 7</xref>, the accuracy result is nearly 82% and increases a little bit due to the fact that the noise of shoulders is avoided.</p></sec><sec id="s3_2"><title>3.2. Using Canny Algorithm</title><p>Secondly, we used CANNY algorithm [<xref ref-type="bibr" rid="scirp.97185-ref2">2</xref>] [<xref ref-type="bibr" rid="scirp.97185-ref3">3</xref>] to extract the contour of the lungs before estimation.</p><p>CANNY edge detection operator is a multi-level edge detection algorithm developed by John F. Canny in 1986. Generally, the purpose of edge detection is to significantly reduce the size of image data while preserving the original image attributes. At present, there are many algorithms for edge detection. Although CANNY algorithm has a long history, it can be said that it is a standard algorithm for edge detection, and it is still widely used in research.</p><p>CANNY algorithm contains 5 main steps as shown in the flowchart (<xref ref-type="fig" rid="fig8">Figure 8</xref>).</p><p>The extraction effect is shown in <xref ref-type="fig" rid="fig9">Figure 9</xref>.</p><p>The result of CANNY algorithm is not as good as that in the first model (<xref ref-type="fig" rid="fig1">Figure 1</xref>0).</p><p>This time the accuracy of the results is about 80%, and still maintained rather low because the contour of the spinal cord and rib was extracted at the same time. Plenty of noise still remained. More importantly, the color feature of the</p><p>image disappears after the CANNY algorithm and only the Image contour remains. Hence, the CNN model cannot distinguish the abnormal images without the color feature. We need to employ another method to replace based on color feature.</p></sec><sec id="s3_3"><title>3.3. Using Mask Algorithm</title><p>We used our own mask algorithm [<xref ref-type="bibr" rid="scirp.97185-ref4">4</xref>] [<xref ref-type="bibr" rid="scirp.97185-ref5">5</xref>] [<xref ref-type="bibr" rid="scirp.97185-ref6">6</xref>] to crop out the lungs. To be more detailed, the algorithm is called mask method, and the 3 main steps are shown in the flowchart (<xref ref-type="fig" rid="fig1">Figure 1</xref>1).</p><p>First, we make binarization of the images to ensure every Pixel Point is 0 or 255. To better divide and binarize the image, we draw the grey histogram to choose the suitable turning point of binarization (<xref ref-type="fig" rid="fig1">Figure 1</xref>2).</p><p>We choose the Pixel 190 to be a turning point, and then we sign the position of each point. Next we change the 0 point to 255 in the original image and remain other points sustain. Finally we receive the new images only containing lungs without noise (<xref ref-type="fig" rid="fig1">Figure 1</xref>3).</p><p>We used this new dataset to train the CNN model, and this time the accuracy jumps to 87% and the loss value keeps low condition (<xref ref-type="fig" rid="fig1">Figure 1</xref>4). This method extracts the main features from the image by color brightness and the result is satisfactory, which implies the color brightness is an important factor during the image recognition.</p></sec></sec><sec id="s4"><title>4. Conclusions and Future Goals</title><p>Firstly, we trained the CNN model to check the lungs are normal or not with</p><p>accuracy of 78%. Secondly, in order to improve the performance, we extracted the features in the image. More specifically, we tried three ways: 1) Using Canny. 2) Crop the lungs by fixed coordinate. 3) Using “mask”. In conclusion, we finished our initial goal, due to the fact that we ended up the accuracy of 87%.</p><p>In addition, we find the extraction method should be connected with color like “Mask” but not too much about frame like the “Canny”. Because from the result we predict the disease is related much to the color depth of CT image. Hence, to improve the accuracy we have to try more methods based on the color depth.</p></sec><sec id="s5"><title>Cite this paper</title><p>Liu, X.D., Lei, H.X. and Han, S.C. (2019) Tuberculosis Detection from Computed Tomography with Convolutional Neural Networks. Advances in Computed Tomography, 8, 47-56. https://doi.org/10.4236/act.2019.84005</p></sec></body><back><ref-list><title>References</title><ref id="scirp.97185-ref1"><label>1</label><mixed-citation publication-type="other" xlink:type="simple">Sun, S.H., Gao, Z.D., Zhao, F., et al. (2018) Spatial-Temporal Analysis on Pulmonary Tuberculosis in Beijing during 2005-2015. Chinese Journal of Epidemiology, 39, 816-820.</mixed-citation></ref><ref id="scirp.97185-ref2"><label>2</label><mixed-citation publication-type="other" xlink:type="simple">Canny, J. F. (1986) A Computational Approach to Edge Detection. IEEE Trans pattern Analysis and machine Intelligence, 8, 679-698. https://doi.org/10.1109/TPAMI.1986.4767851</mixed-citation></ref><ref id="scirp.97185-ref3"><label>3</label><mixed-citation publication-type="other" xlink:type="simple">Marr, D. and Hildreth, E. (1980) Theory of Edge Detection. Proceedings of the Royal Society of London. Series B, Biological Sciences, 207, 187-217. https://doi.org/10.1098/rspb.1980.0020</mixed-citation></ref><ref id="scirp.97185-ref4"><label>4</label><mixed-citation publication-type="other" xlink:type="simple">Hu, Q.W. and Li, Q.Q. (2004) Image Restoration Based on Mask Technique. Editorial Board of Geomatics and Information Science of Wuhan University, 2004-04.</mixed-citation></ref><ref id="scirp.97185-ref5"><label>5</label><mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Lu J.F.</surname><given-names> Lin</given-names></name>,<name name-style="western"><surname> H. and Pan</surname><given-names> Z.G. </given-names></name>,<etal>et al</etal>. (<year>2005</year>)<article-title>Adaptive Region Growing Algorithm in Medical Images Segmentation</article-title><source> Journal of Computer Aided Design &amp; Computer Graphics</source><volume> 17</volume>,<fpage> 2168</fpage>-<lpage>2173</lpage>.<pub-id pub-id-type="doi"></pub-id></mixed-citation></ref><ref id="scirp.97185-ref6"><label>6</label><mixed-citation publication-type="other" xlink:type="simple">Zhang, Z., Zhu, B.S. and Zhu, S.L. and Cao, W. (2009) Improved Mask dodging method based on wavelet. Journal of Remote Sensing, 2009-06.</mixed-citation></ref></ref-list></back></article>