Efficient Classification of Pulmonary Pneumonia and Tuberculosis Alongside Normal and Non-X-ray Images with Minimal Resources and Maximum Accuracy

Rifatul Islam Majumder
DOI: https://doi.org/10.1101/2024.12.31.24319820
2025-01-03
Abstract:Pneumonia, primarily caused by Streptococcus pneumoniae, and tuberculosis (TB), caused by Mycobacterium tuberculosis, continue to present significant global health challenges. Pneumonia is responsible for 14% of deaths among children under five, resulting in 740,180 fatalities annually [1]. Similarly, TB caused 1.25 million deaths in 2022, including 161,000 among individuals with HIV [2]. Misdiagnosis is a critical issue, with 22.3% of pneumonia cases being misidentified as TB [3], highlighting the need for accurate diagnostic tools. This study proposes a novel classification framework for chest X-ray (CXR) images, designed to identify four categories: normal, pneumonia, tuberculosis, and non-X-ray. By incorporating the "non-X-ray" class, the model enhances robustness by detecting outliers and unseen anomalies. The framework utilizes a pre-trained ResNet-18 convolutional neural network and a fine-tuned DenseNet-121, both trained with and without weighted loss function. The best-performing model achieved exceptional results, with 98.76% accuracy, 99.01% precision, and 99.03% recall, maintaining or surpassing class-wise performance. The model was trained on a curated dataset from multiple valid sources, containing 5,489 normal, 4,273 pneumonia, 4,197 tuberculosis, and 1,357 non-X-ray images. This framework has the potential to reduce misdiagnosis and improve healthcare delivery, particularly in resource-limited environments.
What problem does this paper attempt to address?