Few-shot Pneumonia Detection Using Siamese Networks and Transfer Learning on Chest X-ray Images

Abstract

Pneumonia remains a leading cause of mortality among children under five years of age, accounting for approximately 1.6 million deaths annually. Early detection is critical for reducing child mortality; however, traditional diagnostic methods rely on trained personnel and medical resources, often scarce in low-resource settings. Machine learning has emerged as a promising approach to pneumonia detection, but its effectiveness is hindered by the limited availability of labelled data required for training robust models. This study reviews existing machine learning techniques for pneumonia classification, including convolutional neural networks (CNNs), transfer learning, and few-shot learning approaches. Furthermore, we propose an optimised few-shot learning model that integrates Siamese networks with transfer learning to improve pneumonia detection using minimal labelled data. The model leverages MobileNetV3 as a pre-trained feature extractor, producing high-quality embeddings that enhance similarity learning within the Siamese framework. Additionally, triplet loss is incorporated to ensure a more discriminative embedding space, facilitating robust classification. Experimental results indicate that our model outperforms conventional machine learning classifiers, achieving an accuracy of 92.04%, precision of 91.20%, recall of 90.32%, and F1-score of 90.09%. The integration of Siamese networks with triplet loss enhances generalisation while mitigating overfitting, making it particularly suitable for resource-constrained environments. These findings highlight the effectiveness of few-shot learning in pneumonia detection, offering a computationally efficient and scalable solution that bridges critical gaps in medical imaging.

Description

Journal article

Keywords

Few-shot learning, Siamese networks, Transfer learning, Fine-tuning, Neural network

Citation

Atukunda, D., Mwangi, W., & Muriithi, P. (2025). Few-shot pneumonia detection using Siamese networks and transfer learning on chest X-ray images. Discover Artificial Intelligence, 5(1), 1-20.