Deep transfer learning for codling moth damage detection in ‘Conference’ pear using X-ray radiography

Dec 19, 2025·
Jiaqi He
Jiaqi He
,
Tim Belien
,
Ammar Alhmedi
,
Ann Schenk
,
Dany Bylemans
,
Pieter Verboven
,
Bart Nicolai
· 0 min read
Abstract
Early detection of pest infestation is essential for ensuring postharvest fruit quality and compliance with export standards. This study investigates deep transfer learning for detecting codling moth (Cydia pomonella) larval damage in ‘Conference’ pears using non-destructive X-ray radiography. Data were collected from both controlled laboratory and field infestations across multiple growing seasons, and augmented via a radiographic simulation framework. We evaluated three convolutional neural networks (ResNet50, DenseNet121, and InceptionV3) under three transfer learning strategies (feature extractor, partial, and full fine-tunning) using pretrained weights from ImageNet, RadImageNet, or random initialization. A classical machine learning baseline combining adaptive thresholding segmentation and handcrafted features with Support Vector Machine (SVM), k-Nearest Neighbors (kNN), and Logistic Regression (LR), was also implemented for comparison. Transfer learning strategy had the greatest influence on model performance, with full fine-tuning yielding the highest accuracy. Pretrained weights, especially from ImageNet, consistently improved performance over random initialization. The differences between model architectures were smaller under full fine-tunning and pretrained weights from ImageNet. The top-performing configuration of ResNet50 with ImageNet weights and full fine-tuning, reached 91–97 % accuracy across internal test sets and showed 20 % improvement in accuracy, precision and recall compared to the benchmark method. Performance remained robust on an independent test set, with an approximately 10 % improvement over the benchmark method. Guided Grad-CAM heatmaps confirmed that the infestation regions were correctly localized by deep learning models, supporting modal interpretability and reliability. These findings underline the potential of deep transfer learning for accurate and interpretable detection of internal pest damage in pear fruit and support the deployment of automated X-ray-based inspection systems in postharvest quality control workflows.
Publication
Food Control