Tuberculosis X-Ray Images Classification based Dynamic Update Particle Swarm Optimization with CNN

Marina Yusoff, Mohamad Syafiq Irfan Saaidi, Amirul Sadikin Md Afendi, Azrin Mohd Hassan


The classification of tuberculosis (TB) based on chest X-Ray (CXR) remains a time-consuming activity that requires an expert’s interpretation. An automated TB classification on the CXR can be a significant clinical utility to overcome this issue as the disruptive technology is concerned. Most recent research focused on deep learning solutions but identifying the suitable network architecture remains a challenge as it depends on the image features. One of the network architectures is at the classification layer. This paper highlighted a proposed hybrid CNN and enhanced Particle Swarm Optimization (CNN-ePSO) to find an optimal architecture of a connected layer at the classification network layer. We proposed a discrete and real value representation of the particle and a dynamic update strategy of the particle. A series of experiments are performed using Montgomery and Shenzhen CXR for the image classification performance. Formulation of a suitable particle representation has shown a workable particle representation and successfully achieved its aim. The outcome assesses that the hybrid CNN-ePSO with image enhancement is superior to the CNN-PSO without image enhancement and other single CNN models with a remarkable improvement. Thus, a novel ePSO algorithm embedded with CNN captures significant attention on the classification result, mainly for CXR images. In the future, additional work on deep feature layer optimization would be possible for a better result and application of the most recent algorithm like cuckoo search and firefly algorithm.


Keywords: image classification, convolution neural network, deep learning, X-ray Images, particle swarm optimization.


Full Text:



NASH M., KADAVIGERE R., ANDRADE J, et al. Deep learning, computer-aided radiography reading for tuberculosis: a diagnostic accuracy study from a tertiary hospital in India. Scientific Reports, 2020, 10(1):1-10.

DUONG L. T., LE N. H., TRAN T. B, et al. Detection of Tuberculosis from Chest X-ray Images: Boosting the Performance with Vision Transformer and Transfer Learning. Expert Systems with Applications, 2021:115519.

Global Tuberculosis Report 2019, Retrieved on January 22, 2021, from

QIN Z. Z., SANDER M. S., RAI B, et al. Using artificial intelligence to read chest radiographs for tuberculosis detection: A multi-site evaluation of the diagnostic accuracy of three deep learning systems. Scientific Reports, 2019, 9(1):1-10.

DASANAYAKA C., and DISSANAYAKE M. B. Deep Learning Methods for Screening Pulmonary Tuberculosis Using Chest X-rays. Computer Methods in Biomechanics and Biomedical Engineering: Imaging & Visualization, 2020:1-11.

YADAV S. S., and JADHAV S. M. Deep convolutional neural network based medical image classification for disease diagnosis. Journal of Big Data, 2019, 6(1):1-18.

HWANG E. J., PARK S., JIN K. N, et al. Development and validation of a deep learning–based automated detection algorithm for major thoracic diseases on chest radiographs. JAMA Network Open, 2019, 2(3): e191095-e191095.

KARNKAWINPONG T., and LIMPIYAKORN Y. Classification of pulmonary tuberculosis lesion with convolutional neural networks. Journal of Physics: Conference Series, 2019, 1195: 012007.

SENSUSIATI A. D., PRAMULEN A. S., RUMALA D. J, et al. A New Approach to Detect COVID-19 in X-Ray Images of Indonesians. Journal of Hunan University Natural Sciences, 2021:48(6).

WANG B., SUN Y., XUE B., A and ZHANG M. Evolving deep convolutional neural networks by variable-length particle swarm optimization for image classification. Proceedings of the 2018 IEEE Congress on Evolutionary Computation (CEC), 2018: 1-8.

SUN Y., XUE B., ZHANG M., and YEN G. G. A particle swarm optimization-based flexible convolutional autoencoder for image classification. IEEE Transactions on Neural Networks and Learning Systems, 2018, 30(8): 2295-2309.

ALCANTARA M. F., CAO Y., LIU B., et al. eRx – A technological advance to speed-up TB diagnostics. Smart Health, 2020: 16.

TASCI E., ULUTURK C., and UGUR A. A voting-based ensemble deep learning method focusing on image augmentation and preprocessing variations for tuberculosis detection. Neural Computing and Applications, 2021: 1-15.

YADAV O., PASSI K., and JAIN C. K. Using deep learning to classify X-ray images of potential tuberculosis patients. Proceedings of the 2018 IEEE International Conference on Bioinformatics and Biomedicine (BIBM), 2018: 2368-2375.

GAO X. W., JAMES-REYNOLDS C., and CURRIE E. Analysis of tuberculosis severity levels from CT pulmonary images based on enhanced residual deep learning architecture. Neurocomputing, 2020, 392: 233-244.

YARAT S., SENAN S., and ORMAN Z. A Comparative Study on PSO with Other Metaheuristic Methods. In Applying Particle Swarm Optimization, Springer, Cham, 2021: 49-72.

TIWARI H., and MADHUMALA R. B. A Review of Particle Swarm Optimization in Cloud Computing. Smart IoT for Research and Industry, 2022: 93-108.

SHIRLY A. D., SUDHILAYA M., and PRIYADHARSHINI Y, et al. Improving Efficiency and Power Loss Minimization in Landsman DC-DC Converter using Particle Swarm optimization Technique (PSO). Proceedings of the 2021 2nd International Conference for Emerging Technology (INCET), IEEE, 2021: 1-6.

LIU W., WANG Z., ZENG N, et al. A PSO-based deep learning approach to classifying patients from emergency departments. International Journal of Machine Learning and Cybernetics, 2021, 12(7): 1939-1948.

ESCOBAR H., and CUEVAS E. Implementation of Metaheuristics with Extreme Learning Machines. In Metaheuristics in Machine Learning: Theory and Applications, Springer, Cham, 2021: 125-147.

JUNIOR F. E. F., and YEN G. G. Particle swarm optimization of deep neural networks architectures for image classification. Swarm and Evolutionary Computation, 2019, 49: 62-74.

LAWRENCE T., ZHANG L., LIM C. P, et al. Particle Swarm Optimization for Automatically Evolving Convolutional Neural Networks for Image Classification. IEEE Access, 2021, 9: 14369-14386.

MANIKANDAN T., and BHARATHI N. Lung cancer detection using fuzzy auto-seed cluster means morphological segmentation and SVM classifier. Journal of Medical Systems, 2016, 40(7): 1-9

KHAN A. I., SHAH J. L., and BHAT M. M. CoroNet: A deep neural network for detection and diagnosis of COVID-19 from chest x-ray images. Computer Methods and Programs in Biomedicine, 2020, 196: 105581.

YU D., ZHANG K., HUANG L, et al. Detection of peripherally inserted central catheter (PICC) in chest X-ray images: A multi-task deep learning model. Computer Methods and Programs in Biomedicine, 2020, 197: 105674.

SU Y., LI D., and CHEN X. Lung Nodule Detection based on Faster R-CNN Framework. Computer Methods and Programs in Biomedicine, 2021, 200: 105866.

HATTIKATTI P. Texture based interstitial lung disease detection using convolutional neural network. Proceedings of the 2017 International Conference on Big Data, IoT and Data Science (BID), IEEE, 2017: 18-22.

ANTHIMOPOULOS M., CHRISTODOULIDIS S., EBNER L, et al. Lung pattern classification for interstitial lung diseases using a deep convolutional neural network. IEEE Transactions on Medical Imaging, 2016, 35(5): 1207-1216.

LIU X., LEI H., and HAN S. Tuberculosis Detection from Computed Tomography with Convolutional Neural Networks. Advances in Computed Tomography, 2019, 08(04): 47–56.

HOODA R., SOFAT S., KAUR S, et al. Deep-learning: A potential method for tuberculosis detection using chest radiography. Proceedings of the 2017 IEEE International Conference on Signal and Image Processing Applications (ICSIPA), IEEE, 2017: 497-502.

RAJARAMAN S., CANDEMIR S., XUE Z, et al. A novel stacked generalization of models for improved TB detection in chest radiographs. Proceedings of the 2018 40th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), IEEE, 2018: 718-721.

ABIDEEN Z. U., GHAFOOR M., MUNIR K, et al. Uncertainty assisted robust tuberculosis identification with Bayesian convolutional neural networks. IEEE Access, 2020, 8: 22812-22825.

CAO Y., LIU C., LIU B, et al. Improving tuberculosis diagnostics using deep learning and mobile health technologies among resource-poor and marginalized communities. Proceedings of the 2016 IEEE first international conference on connected health: applications, systems and engineering technologies (CHASE), IEEE, 2016: 274-281.

SHIN H. C., ROTH H. R., GAO M, et al. Deep convolutional neural networks for computer-aided detection: CNN architectures, dataset characteristics and transfer learning. IEEE Transactions on Medical Imaging, 2016, 35(5): 1285-1298.

TAJBAKHSH N., SHIN J. Y., GURUDU S. R., et al. Convolutional neural networks for medical image analysis: Full training or fine-tuning? IEEE Transactions on Medical Imaging, 2016, 5(5): 1299-1312.

LIU C., CAO Y., ALCANTARA M, et al. TX-CNN: Detecting tuberculosis in chest X-ray images using convolutional neural network. Proceedings of the International Conference on Image Processing, ICIP, 2018: 314–318.

KERMANY D. S., GOLDBAUM M., CAI W., et al. Identifying Medical Diagnoses and Treatable Diseases by Image-Based Deep Learning Resource Identifying Medical Diagnoses and Treatable Diseases by Image-Based Deep Learning. Cell, 2018, 172(5): 1122-1131.

RAHMAN T., KHANDAKAR A., KADIR M. A. et al. Reliable tuberculosis detection using chest X-ray with deep learning, segmentation, and visualization. IEEE Access, 2020, 8: 191586-191601.

DIAS JÚNIOR D. A., DA CRUZ L. B., BANDEIRA DINIZ J. O, et al. Automatic method for classifying COVID-19 patients based on chest X-ray images, using deep features and PSO-optimized XGBoost. Expert Systems with Applications, 2021: 183.

GASPAR A., OLIVA D., CUEVAS E., et al. Hyperparameter Optimization in a Convolutional Neural Network Using Metaheuristic Algorithms. In Metaheuristics in Machine Learning: Theory and Applications. Springer, Cham. 2021: 37-59.

FOYSAL M. F. A., SULTANA N., RIMI T. A., and RIFAT M. H. Convolutional Neural Network Hyper-Parameter Optimization Using Particle Swarm Optimization. In Emerging Technologies in Data Mining and Information Security, Springer, Singapore, 2021: 363-373.

TUBA E., BAČANIN N., STRUMBERGER I., and TUBA M. Convolutional Neural Networks Hyperparameters Tuning. Artificial Intelligence: Theory and Applications, Springer, 2021: 65-84.

AHSAN M., GOMES R., and DENTON A. Application of a Convolutional Neural Network using transfer learning for tuberculosis detection. Proceedings of the 2019 IEEE International Conference on Electro Information Technology (EIT), IEEE, 2019: 427-433

RUBINI C., and PAVITHRA N. Contrast enhancement of MRI images using AHE and CLAHE techniques. International Journal of Innovative Technology and Exploring Engineering, 2019, 9(2): 2442-2445.

ALMABDY S., and ELREFAEI L. Deep convolutional neural network-based approaches for face recognition. Applied Sciences, 2019, 9(20): 4397.

CARVALHO T., DE REZENDE E. R., ALVES M. T, et al., Exposing computer generated images by eye’s region classification via transfer learning of VGG19 CNN. Proceedings of the 2017 16th IEEE International Conference on Machine Learning and Applications (ICMLA), IEEE, 2017: 866-870.

EBERHART R., and KENNEDY J. A new optimizer using particle swarm theory. Proceedings of the Sixth International Symposium on Micro Machine and Human Science, IEEE, 1995: 39-43.

HOUSSEIN E. H., GAD A. G., HUSSAIN K, et al. Major Advances in Particle Swarm Optimization: Theory, Analysis, and Application. Swarm and Evolutionary Computation, 2021, 63: 100868.

YUSOFF M., ARIFFIN J., and MOHAMED A. DPSO based on a min-max approach and clamping strategy for the evacuation vehicle assignment problem. Neurocomputing, 2015, 148: 30-38.

SINGH P., CHAUDHDAURY S., and PANIGRAHI B. K. Hybrid MPSO-CNN: Multi-level Particle Swarm optimized hyperparameters of Convolutional Neural Network. Swarm and Evolutionary Computation, 2021, 63:100863.

PATHAK K. C., KUNDARAM S. S., SARVAIYA J. N, et al. Diagnosis and Analysis of Tuberculosis Disease Using Simple Neural Network and Deep Learning Approach for Chest X-Ray Images. In Tracking and Preventing Diseases with Artificial Intelligence. Springer, Cham, 2022: 77-102.

ZHU Q., ZHANG P., WANG Z, et al. A new loss function for CNN classifier based on predefined evenly-distributed class centroids. IEEE Access, 2019, 8:10888-10895.

PIOTROWSKI A. P., NAPIORKOWSKI J. J., and PIOTROWSKA A. E. Population size in particle swarm optimization. Swarm and Evolutionary Computation, 2020, 58: 100718.


  • There are currently no refbacks.