PneumoNeXt: A Multi-Scale Attention and Contrastive Learning Approach for Pneumonia Diagnosis
摘要
Early pneumonia diagnosis is vital, but automated chest X-ray classification faces challenges due to subtle lesions and inter-class overlap. We propose PneumoNeXt, an enhanced ConvNeXt for accurate classification. First, we introduce Scale-Weighted Residual Attention (SWRA) using multi-scale convolutional kernels. SWRA captures richer spatial details, enhancing sensitivity to subtle pathological features. SWRA is then combined with Efficient Channel Attention (ECA) to create the Efficient Scale Attention Module (ESAM), integrated into ConvNeXt’s deeper stages. ESAM adaptively highlights key features and suppresses noise, improving recognition of complex lesion patterns. Additionally, we employ contrastive learning and a novel fused loss function, blending classification and contrastive losses to enhance inter-class separability and intra-class consistency. Gradient-weighted Class Activation Mapping is also incorporated to generate heatmaps, improving interpretability by visualizing focus on critical lesion regions. Experiments on the COVID-19 Radiography Database show PneumoNeXt achieves 96.10% accuracy and a 96.60% F1 score, surpassing established convolutional neural networks. The source code and additional details are available at: https://github.com/LeoRong15/PneumoNeXt .