A Robust Tuberculosis Diagnosis Using Chest X-Rays Based on a Hybrid Vision Transformer and Principal Component Analysis
Abstract
Background: Tuberculosis (TB) is a bacterial disease that mainly affects the lungs, but it can
also impact other parts of the body, such as the brain, bones, and kidneys. The disease is caused by a
bacterium called Mycobacterium tuberculosis and spreads through the air when an infected person
coughs or sneezes. TB can be inactive or active; in its active state, noticeable symptoms appear, and
it can be transmitted to others. There are ongoing challenges in fighting TB, including resistance
to medications, co-infections, and limited resources in areas heavily affected by the disease. These
issues make it challenging to eradicate TB. Objective: Timely and precise diagnosis is essential for
effective control, especially since TB often goes undetected and untreated, particularly in remote
and under-resourced locations. Chest X-ray (CXR) images are commonly used to diagnose TB.
However, difficulties can arise due to unusual findings on X-rays and a shortage of radiologists
in high-infection areas. Method: To address these challenges, a computer-aided diagnosis (CAD)
system that uses the vision transformer (ViT) technique has been developed to accurately identify
TB in CXR images. This innovative hybrid CAD approach combines ViT with Principal Component
Analysis (PCA) and machine learning (ML) techniques for TB classification, introducing a new
method in this field. In the hybrid CAD system, ViT is used for deep feature extraction as a base
model, PCA is used to reduce feature dimensions, and various ML methods are used to classify TB.
This system allows for quickly identifying TB, enabling timely medical action and improving patient
outcomes. Additionally, it streamlines the diagnostic process, reducing time and costs for patients
and lessening the workload on healthcare professionals. The TB chest X-ray dataset was utilized
to train and evaluate the proposed CAD system, which underwent pre-processing techniques like
resizing, scaling, and noise removal to improve diagnostic accuracy. Results: The performance of our
CAD model was assessed against existing models, yielding excellent results. The model achieved
remarkable metrics: an average precision of 99.90%, recall of 99.52%, F1-score of 99.71%, accuracy of
99.84%, false negative rate (FNR) of 0.48%, specificity of 99.52%, and negative predictive value (NPV)
of 99.90%. Conclusions: This evaluation highlights the superior performance of our model compared
to the latest available classifiers.