{"title":"Few-shot classification for soil images: Prototype correction and feature distance enhancement","authors":"Shaohua Zeng , Yinsen Xia , Shoukuan Gu , Fugang Liu , Jing Zhou","doi":"10.1016/j.compag.2025.110162","DOIUrl":null,"url":null,"abstract":"<div><div>The accurate classification of soil species is the fundamental work for agricultural resource surveys and crop cultivation. For soil image classification based on soil classification systems, an improved prototypical network based on prototype correction and feature distance enhancement is proposed in this paper. Firstly, on the basis of the prototypical network, an adaptive cosine similarity enhancement mask (ACSEM) is designed to enhance the feature dissimilarity between different classes. ACSEM is constructed on the basis of the local similarity between the query image and the support image, which masks the feature blocks with weak similarity in the support image. It then reconstructs the support image features to enhance the spatial dissimilarity between support images of different classes, thereby constructing a class prototype with feature dissimilarity. Then, the discriminative feature distance enhancement module (DFDE) is introduced to increase the distance of distinguishable features. It uses the feature distance variance between the class prototype and the query image to generate feature distance weights, enhancing the distinguishing features and improving the expressiveness of the distance metric function in capturing class feature variability. Finally, the experimental results show that the classification accuracy of the improved prototypical network reaches 65.68% (one-shot) and 77.19% (five-shot) on the soil image classification task based on the soil classification system. Compared with the prototypical network, its classification accuracy is improved by 14.93% (one-shot) and 16.97% (five-shot), and it can achieve a higher accuracy of soil image classification based on the soil classification system.</div></div>","PeriodicalId":50627,"journal":{"name":"Computers and Electronics in Agriculture","volume":"233 ","pages":"Article 110162"},"PeriodicalIF":7.7000,"publicationDate":"2025-02-24","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/S0168169925002686","RegionNum":1,"RegionCategory":"农林科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"AGRICULTURE, MULTIDISCIPLINARY","Score":null,"Total":0}
引用次数: 0
Abstract
The accurate classification of soil species is the fundamental work for agricultural resource surveys and crop cultivation. For soil image classification based on soil classification systems, an improved prototypical network based on prototype correction and feature distance enhancement is proposed in this paper. Firstly, on the basis of the prototypical network, an adaptive cosine similarity enhancement mask (ACSEM) is designed to enhance the feature dissimilarity between different classes. ACSEM is constructed on the basis of the local similarity between the query image and the support image, which masks the feature blocks with weak similarity in the support image. It then reconstructs the support image features to enhance the spatial dissimilarity between support images of different classes, thereby constructing a class prototype with feature dissimilarity. Then, the discriminative feature distance enhancement module (DFDE) is introduced to increase the distance of distinguishable features. It uses the feature distance variance between the class prototype and the query image to generate feature distance weights, enhancing the distinguishing features and improving the expressiveness of the distance metric function in capturing class feature variability. Finally, the experimental results show that the classification accuracy of the improved prototypical network reaches 65.68% (one-shot) and 77.19% (five-shot) on the soil image classification task based on the soil classification system. Compared with the prototypical network, its classification accuracy is improved by 14.93% (one-shot) and 16.97% (five-shot), and it can achieve a higher accuracy of soil image classification based on the soil classification system.
期刊介绍:
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.