JianPing Liu , Lulu Sun , Guomin Zhou , Jian Wang , Jialu Xing , Chenyang Wang
{"title":"SFCE-VT:空间特征融合和对比度增强视觉变压器用于细粒度农业害虫视觉分类","authors":"JianPing Liu , Lulu Sun , Guomin Zhou , Jian Wang , Jialu Xing , Chenyang Wang","doi":"10.1016/j.compag.2025.110371","DOIUrl":null,"url":null,"abstract":"<div><div>Climate change has led to the intensification of agricultural pests, which are diverse and difficult to identify accurately, and fine-grained classification of agricultural pests is an important method to effectively prevent and control the increasing number of pests, and to ensure the stability and sustainable development of agricultural production. Agricultural pest species can be accurately recognized using deep learning, but current problems such as the small scale agricultural pest data, single scene, and relatively coarse classification results bring challenges to fine-grained image classification of agricultural pests. Therefore, a visual transformer based on spatial feature fusion and contrast enhancement (SFCE-VT) is proposed for fine-grained image classification(FGIC) methods for agricultural pests. First, to accurately localize to the target location, two images, the foreground target, and the occluded background, are cropped using the self-attention mechanism to form three image inputs to complement the detail representation. To further distinguish the foreground target from the background noise, the inputs of three different images are utilized to compare the loss values to enhance the model’s ability to distinguish the foreground target from the background. In addition, to address the challenge of pest recognition from different viewpoints, a self-attention mechanism and graph convolutional network (GCN) are utilized to extract spatial contextual information of the pest region and learn the spatial gesture features of the pests. The experimental results achieved significant performance improvement on both CUB-200-2011 and A-pests, a reconstructed agricultural fine-grained pest dataset, by 1.95% and 3.23% compared to the base vit, respectively. The effectiveness of the cropping contrast enhancement and spatial information learning modules in paying attention to fine-grained features and enriching pest feature information is demonstrated. The source code is publicly available at <span><span>https://github.com/193lulu/SFCE-VT</span><svg><path></path></svg></span>.</div></div>","PeriodicalId":50627,"journal":{"name":"Computers and Electronics in Agriculture","volume":"236 ","pages":"Article 110371"},"PeriodicalIF":7.7000,"publicationDate":"2025-04-19","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"SFCE-VT: Spatial feature fusion and contrast-enhanced visual transformer for fine-grained agricultural pests visual classification\",\"authors\":\"JianPing Liu , Lulu Sun , Guomin Zhou , Jian Wang , Jialu Xing , Chenyang Wang\",\"doi\":\"10.1016/j.compag.2025.110371\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"<div><div>Climate change has led to the intensification of agricultural pests, which are diverse and difficult to identify accurately, and fine-grained classification of agricultural pests is an important method to effectively prevent and control the increasing number of pests, and to ensure the stability and sustainable development of agricultural production. Agricultural pest species can be accurately recognized using deep learning, but current problems such as the small scale agricultural pest data, single scene, and relatively coarse classification results bring challenges to fine-grained image classification of agricultural pests. Therefore, a visual transformer based on spatial feature fusion and contrast enhancement (SFCE-VT) is proposed for fine-grained image classification(FGIC) methods for agricultural pests. First, to accurately localize to the target location, two images, the foreground target, and the occluded background, are cropped using the self-attention mechanism to form three image inputs to complement the detail representation. To further distinguish the foreground target from the background noise, the inputs of three different images are utilized to compare the loss values to enhance the model’s ability to distinguish the foreground target from the background. In addition, to address the challenge of pest recognition from different viewpoints, a self-attention mechanism and graph convolutional network (GCN) are utilized to extract spatial contextual information of the pest region and learn the spatial gesture features of the pests. The experimental results achieved significant performance improvement on both CUB-200-2011 and A-pests, a reconstructed agricultural fine-grained pest dataset, by 1.95% and 3.23% compared to the base vit, respectively. The effectiveness of the cropping contrast enhancement and spatial information learning modules in paying attention to fine-grained features and enriching pest feature information is demonstrated. The source code is publicly available at <span><span>https://github.com/193lulu/SFCE-VT</span><svg><path></path></svg></span>.</div></div>\",\"PeriodicalId\":50627,\"journal\":{\"name\":\"Computers and Electronics in Agriculture\",\"volume\":\"236 \",\"pages\":\"Article 110371\"},\"PeriodicalIF\":7.7000,\"publicationDate\":\"2025-04-19\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Computers and Electronics in Agriculture\",\"FirstCategoryId\":\"97\",\"ListUrlMain\":\"https://www.sciencedirect.com/science/article/pii/S0168169925004776\",\"RegionNum\":1,\"RegionCategory\":\"农林科学\",\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"Q1\",\"JCRName\":\"AGRICULTURE, MULTIDISCIPLINARY\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Computers and Electronics in Agriculture","FirstCategoryId":"97","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0168169925004776","RegionNum":1,"RegionCategory":"农林科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"AGRICULTURE, MULTIDISCIPLINARY","Score":null,"Total":0}
SFCE-VT: Spatial feature fusion and contrast-enhanced visual transformer for fine-grained agricultural pests visual classification
Climate change has led to the intensification of agricultural pests, which are diverse and difficult to identify accurately, and fine-grained classification of agricultural pests is an important method to effectively prevent and control the increasing number of pests, and to ensure the stability and sustainable development of agricultural production. Agricultural pest species can be accurately recognized using deep learning, but current problems such as the small scale agricultural pest data, single scene, and relatively coarse classification results bring challenges to fine-grained image classification of agricultural pests. Therefore, a visual transformer based on spatial feature fusion and contrast enhancement (SFCE-VT) is proposed for fine-grained image classification(FGIC) methods for agricultural pests. First, to accurately localize to the target location, two images, the foreground target, and the occluded background, are cropped using the self-attention mechanism to form three image inputs to complement the detail representation. To further distinguish the foreground target from the background noise, the inputs of three different images are utilized to compare the loss values to enhance the model’s ability to distinguish the foreground target from the background. In addition, to address the challenge of pest recognition from different viewpoints, a self-attention mechanism and graph convolutional network (GCN) are utilized to extract spatial contextual information of the pest region and learn the spatial gesture features of the pests. The experimental results achieved significant performance improvement on both CUB-200-2011 and A-pests, a reconstructed agricultural fine-grained pest dataset, by 1.95% and 3.23% compared to the base vit, respectively. The effectiveness of the cropping contrast enhancement and spatial information learning modules in paying attention to fine-grained features and enriching pest feature information is demonstrated. The source code is publicly available at https://github.com/193lulu/SFCE-VT.
期刊介绍:
Computers and Electronics in Agriculture provides international coverage of advancements in computer hardware, software, electronic instrumentation, and control systems applied to agricultural challenges. Encompassing agronomy, horticulture, forestry, aquaculture, and animal farming, the journal publishes original papers, reviews, and applications notes. It explores the use of computers and electronics in plant or animal agricultural production, covering topics like agricultural soils, water, pests, controlled environments, and waste. The scope extends to on-farm post-harvest operations and relevant technologies, including artificial intelligence, sensors, machine vision, robotics, networking, and simulation modeling. Its companion journal, Smart Agricultural Technology, continues the focus on smart applications in production agriculture.