🤖 AI Summary
This study addresses the high reliance on manual interpretation and poor generalizability of deep learning models under small-sample conditions in early diagnosis of pulmonary diseases (e.g., pneumonia, consolidation) from chest X-rays. We propose an automated Vision Transformer (ViT)-based three-class classification system—normal, pulmonary consolidation, and viral pneumonia. To our knowledge, this is the first systematic comparison of ViT and Swin Transformer against CNN-based benchmarks (ResNet-50, DenseNet, CheXNet) specifically in pediatric and geriatric populations, where these pathologies are highly prevalent. Experiments on a limited-scale chest X-ray dataset demonstrate superior performance: 99.0% accuracy for binary classification (abnormal vs. normal) and 95.25% for three-way classification—significantly outperforming all baselines. Results validate ViT’s enhanced representational capacity for fine-grained medical image classification and establish a reproducible Transformer-based paradigm for low-resource medical AI diagnostics.
📝 Abstract
Background: Lung disease is a significant health issue, particularly in children and elderly individuals. It often results from lung infections and is one of the leading causes of mortality in children. Globally, lung-related diseases claim many lives each year, making early and accurate diagnoses crucial. Radiographs are valuable tools for the diagnosis of such conditions. The most prevalent lung diseases, including pneumonia, asthma, allergies, chronic obstructive pulmonary disease (COPD), bronchitis, emphysema, and lung cancer, represent significant public health challenges. Early prediction of these conditions is critical, as it allows for the identification of risk factors and implementation of preventive measures to reduce the likelihood of disease onset Methods: In this study, we utilized a dataset comprising 3,475 chest X-ray images sourced from from Mendeley Data provided by Talukder, M. A. (2023) [14], categorized into three classes: normal, lung opacity, and pneumonia. We applied five pre-trained deep learning models, including CNN, ResNet50, DenseNet, CheXNet, and U-Net, as well as two transfer learning algorithms such as Vision Transformer (ViT) and Shifted Window (Swin) to classify these images. This approach aims to address diagnostic issues in lung abnormalities by reducing reliance on human intervention through automated classification systems. Our analysis was conducted in both binary and multiclass settings. Results: In the binary classification, we focused on distinguishing between normal and viral pneumonia cases, whereas in the multi-class classification, all three classes (normal, lung opacity, and viral pneumonia) were included. Our proposed methodology (ViT) achieved remarkable performance, with accuracy rates of 99% for binary classification and 95.25% for multiclass classification.