Cont-Transformer: enhancing image recognition for orchard fruit-boring pest monitoring with contrastive learning
Year: 2026
Type: article
Abstract: The codling moth ( Cydia pomonella ) is the most serious pest of apple and pear orchards worldwide and has been designated as a quarantine or regulated pest by over 20 countries or regions globally. Morphological identification of the codling moth is highly specialized and time-consuming. In apple and pear production process, codling moth usually coexists with other insect species, including Carposina niponensis , Dichocrocis punctiferalis , Euzophera pyriella , Grapholita molesta , and Helicoverpa armigera , and sometimes the adults of Cydia trasias and Plutella xylostella ; these moth species are morphologically similar to codling moth, especially in the pre-adult stages (e.g., egg, larva, and pupa) of them. This study provides an effective solution for distinguishing the codling moth from other insect species with similar appearances automatically; a new Transformer-based model, known as Cont-Transformer, is proposed. Specifically, contrastive learning is introduced to improve distinguishing ability, which contributes to minimizing the similarity of classification labels corresponding to different labels and maximizing the similarity of classification labels of samples with the same label. The cross-entropy loss and contrastive loss are combined to guide the model in focusing on the most discriminative regions. Furthermore, we systematically analyzed various data augmentation strategies to bolster the model’s robustness and generalization, including AutoAugment, RandAugment, TrivialAugment, MixUp, and CutMix. We evaluated the proposed model architecture Cont-Transformer through comprehensive model training and testing on an insect image dataset containing 26 insect categories and a total of 14,431 images. The proposed recognition model achieved accuracy, precision, and recall rates of 99.45%, 99.40%, and 99.45%, respectively, outperforming eight other popular models, i.e., AlexNet, ResNet-50, DenseNet-121, ShuffleNet-v2, EfficientNet-b0, DeiT, MobileViT, and Swin Transformer. Moreover, the developed codling moth investigation program can identify various stages, including egg, larva, pupa, and adult, of these moth species. The present findings should be significant for precise pest control and quarantine supervision.
Source: Frontiers in Agronomy
Authors: Jingjun Cao, Xiaoqing Xian, Zhida Duan, Wanxue Liu, Guifen Zhang, Lihua Jiang
Language: English
Topic: Smart Agriculture and AI
Subfield: Plant Science
Domain: Life Sciences
SDG: Zero hunger
Open Access status: gold
Estimated APC paid: $3,077
Award: G6246120357
OpenAlex ID: W7154043302
