Zhang Meng, Yang Wenzhong, Chen Danny, Fu Chenghao, Wei Fuyuan
School of Computer Science and Technology, Xinjiang University, Urumqi 830017, China.
Xinjiang Key Laboratory of Multilingual Information Technology, Xinjiang University, Urumqi 830017, China.
Entropy (Basel). 2024 May 20;26(5):431. doi: 10.3390/e26050431.
Traditional methods for pest recognition have certain limitations in addressing the challenges posed by diverse pest species, varying sizes, diverse morphologies, and complex field backgrounds, resulting in a lower recognition accuracy. To overcome these limitations, this paper proposes a novel pest recognition method based on attention mechanism and multi-scale feature fusion (AM-MSFF). By combining the advantages of attention mechanism and multi-scale feature fusion, this method significantly improves the accuracy of pest recognition. Firstly, we introduce the relation-aware global attention (RGA) module to adaptively adjust the feature weights of each position, thereby focusing more on the regions relevant to pests and reducing the background interference. Then, we propose the multi-scale feature fusion (MSFF) module to fuse feature maps from different scales, which better captures the subtle differences and the overall shape features in pest images. Moreover, we introduce generalized-mean pooling (GeMP) to more accurately extract feature information from pest images and better distinguish different pest categories. In terms of the loss function, this study proposes an improved focal loss (FL), known as balanced focal loss (BFL), as a replacement for cross-entropy loss. This improvement aims to address the common issue of class imbalance in pest datasets, thereby enhancing the recognition accuracy of pest identification models. To evaluate the performance of the AM-MSFF model, we conduct experiments on two publicly available pest datasets (IP102 and D0). Extensive experiments demonstrate that our proposed AM-MSFF outperforms most state-of-the-art methods. On the IP102 dataset, the accuracy reaches 72.64%, while on the D0 dataset, it reaches 99.05%.
传统的害虫识别方法在应对不同害虫种类、大小各异、形态多样以及复杂田间背景所带来的挑战时存在一定局限性,导致识别准确率较低。为克服这些局限性,本文提出了一种基于注意力机制和多尺度特征融合(AM-MSFF)的新型害虫识别方法。通过结合注意力机制和多尺度特征融合的优势,该方法显著提高了害虫识别的准确率。首先,我们引入关系感知全局注意力(RGA)模块来自适应调整每个位置的特征权重,从而更关注与害虫相关的区域并减少背景干扰。然后,我们提出多尺度特征融合(MSFF)模块来融合不同尺度的特征图,以便更好地捕捉害虫图像中的细微差异和整体形状特征。此外,我们引入广义均值池化(GeMP)以更准确地从害虫图像中提取特征信息并更好地区分不同的害虫类别。在损失函数方面,本研究提出一种改进的焦点损失(FL),即平衡焦点损失(BFL),以替代交叉熵损失。这种改进旨在解决害虫数据集中常见的类别不平衡问题,从而提高害虫识别模型的识别准确率。为评估AM-MSFF模型的性能,我们在两个公开可用的害虫数据集(IP102和D0)上进行了实验。大量实验表明,我们提出的AM-MSFF优于大多数现有方法。在IP102数据集上,准确率达到72.64%,而在D0数据集上,准确率达到99.05%。