Classification of radiological patterns of tuberculosis with a Convolutional neural network in x-ray images


  • Adrian Trueba Espinosa Universidad Autónoma del Estado de México
  • Jessica Sanchez -Arrazola
  • Jair Cervantes
  • Farid Garcia-Lamont
  • José Sergio Ruiz Castilla


In this paper we propose the classification of radiological patterns with the presence of tuberculosis in X-ray images, it was observed that two to six patterns (consolidation, fibrosis, opacity, opacity, pleural, nodules and cavitations) are present in the radiographs of the patients. It is important to mention that species specialists consider the type of TB pattern in order to provide appropriate treatment. It should be noted that not all medical centres have specialists who can immediately interpret radiological patterns. Considering the above, the aim is to classify patterns by means of a convolutional neural network to help make a more accurate diagnosis on X-rays, so that doctors can recommend immediate treatment and thus avoid infecting more people. For the classification of tuberculosis patterns, a proprietary convolutional neural network (CNN) was proposed and compared against the VGG16, InceptionV3 and ResNet-50 architectures, which were selected based on the results of other radiograph classification research [1]–[3] . The results obtained for the Macro-averange AUC-SVM metric for the proposed architecture and InceptionV3 were 0.80, and for VGG16 it was 0.75, and for the ResNet-50 network it was 0.79. The proposed architecture has better classification results, as does InceptionV3.


Tuberculosis patterns, Convolutional neural networks, Chest X-rays


S. Rajaraman and S. K. Antani, “Modality-Specific Deep Learning Model Ensembles Toward Improving TB Detection in Chest Radiographs,” IEEE Access, vol. 8, 2020, doi: 10.1109/ACCESS.2020.2971257.

A. M. Ismael and A. Şengür, “Deep learning approaches for COVID-19 detection based on chest X-ray images,” Expert Systems with Applications, vol. 164, Feb. 2021, doi: 10.1016/j.eswa.2020.114054.

A. H. Al-Timemy, R. N. Khushaba, Z. M. Mosa, and J. Escudero, “An Efficient Mixture of Deep and Machine Learning Models for COVID-19 and Tuberculosis Detection Using X-Ray Images in Resource Limited Settings,” Jul. 2020, doi: 10.1007/978-3-030-69744-0_6.

A. Castiñeira Estévez, M. López Pedreira, M. Pena Rodríguez, and M. Liñares Iglesias, Medicina integral : medicina preventiva y asistencial en el medio rural., vol. 39, no. 5. IDEPSA, 1980. Accessed: Oct. 11, 2021. [Online]. Available:

R. Garza-Velasco, J. Ávila-de Jesús, and L. M. Perea-Mejía, “Tuberculosis pulmonar: la epidemia mundial continúa y la enseñanza de este tema resulta crucial y compleja,” Educación Química, vol. 28, no. 1, Jan. 2017, doi: 10.1016/j.eq.2016.09.009.

Geneva: World Health Organization, “Global tuberculosis report 2021,” Oct. 2021. Accessed: Dec. 06, 2021. [Online]. Available:

Newsroom World Health Organization, “Tuberculosis,” Oct. 14, 2021. (accessed Dec. 06, 2021).

Geneva: World Health Organization, “ Global strategy for tuberculosis research and innovation.,” Oct. 2020.

S. Stirenko et al., “Chest X-Ray Analysis of Tuberculosis by Deep Learning with Segmentation and Augmentation,” Apr. 2018. doi: 10.1109/ELNANO.2018.8477564.

T. Karnkawinpong and Y. Limpiyakorn, “Classification of pulmonary tuberculosis lesion with convolutional neural networks,” Journal of Physics: Conference Series, vol. 1195, Apr. 2019, doi: 10.1088/1742-6596/1195/1/012007.

National Institute of Health, “NIAID TB PORTALS DEPOT.” (accessed Mar. 06, 2021).

P. Lakhani and B. Sundaram, “Deep Learning at Chest Radiography: Automated Classification of Pulmonary Tuberculosis by Using Convolutional Neural Networks,” Radiology, vol. 284, no. 2, Aug. 2017, doi: 10.1148/radiol.2017162326.

A. S. Becker et al., “Detection of tuberculosis patterns in digital photographs of chest X-ray images using Deep Learning: feasibility study,” The International Journal of Tuberculosis and Lung Disease, vol. 22, no. 3, Mar. 2018, doi: 10.5588/ijtld.17.0520.

Y. Xie et al., “Computer-Aided System for the Detection of Multicategory Pulmonary Tuberculosis in Radiographs,” Journal of Healthcare Engineering, vol. 2020, Aug. 2020, doi: 10.1155/2020/9205082.

W. H. Curioso and M. J. Brunette, “Inteligencia artificial e innovación para optimizar el proceso de diagnóstico de la tuberculosis,” Revista Peruana de Medicina Experimental y Salud Pública, vol. 37, no. 3, Sep. 2020, doi: 10.17843/rpmesp.2020.373.5585.

A. K. Baszczyńska, “Empirical and Kernel Estimation of the ROC Curve,” Acta Universitatis Lodziensis. Folia Oeconomica, vol. 1, no. 311, Apr. 2015, doi: 10.18778/0208-6018.311.06.

S. Ahlawat and A. Choudhary, “Hybrid CNN-SVM Classifier for Handwritten Digit Recognition,” Procedia Computer Science, vol. 167, 2020, doi: 10.1016/j.procs.2020.03.309.

J. Wu, “Introduction to Convolutional Neural Networks,” 2017.

B. Triwijoyo, B. Sabarguna, W. Budiharto, and E. Abdurachman, “ICIC Express Letters ICIC International c ⃝2020 ISSN,” ICIC Express Letters, vol. 14, pp. 635–641, Oct. 2020, doi: 10.24507/icicel.14.07.635.

D. P. Kingma and J. Ba, “Adam: A Method for Stochastic Optimization,” Dec. 2014.

K. Simonyan and A. Zisserman, “Very Deep Convolutional Networks for Large-Scale Image Recognition,” Sep. 2014.

K. He, X. Zhang, S. Ren, and J. Sun, “Deep Residual Learning for Image Recognition,” Dec. 2015.




Download data is not yet available.