高级检索+

基于双重特征动态优化的类别不平衡稻田害虫识别模型

Unbalanced type rice field pest identification model based on dual feature dynamic optimization

  • 摘要: 稻田害虫的精准分类识别是保障粮食安全的关键环节,但田间复杂环境下害虫样本分布极不均衡,给稻田害虫分类模型的构建带来巨大挑战,现有模型在关键特征的提取和类不平衡数据适应问题上存在局限性。为此该研究提出了一种基于双重特征动态优化的类别不平衡稻田害虫识别模型ResNet-EAF,该方法首先加入了高效通道注意力(efficient channel attention,ECA)模块,由ECA模块通过一维卷积实现局部通道交互保留关键特征。其次,为增强特征判别性与跨场景表征一致性,该研究引入通道级仿射自适应校准模块(channel-wise affine adaptation,CAA),该模块通过数据驱动的方式自适应学习最优特征变换参数,借助仿射变换动态调控特征分布,有效降低模型对特定害虫数据分布的依赖,进而提升模型在不同数据分布场景下的泛化能力。最后采用焦点损失(focal loss,FL)动态平衡策略,融合逆频率加权与调制系数,抑制样本占优类别的特征权重,强化模型对少数类害虫的关注,缓解类别不平衡问题。试验结果显示,ResNet-EAF模型的准确率达98.06%、宏平均召回率为93.93%、宏平均F1为93.80%,较基准模型分别提高3.63、6.96和5.67个百分点。其中,少数类别的性能提升较大,螟蛾类与灯蛾类的召回率较基准模型分别提高13.16和4.55个百分点。在相同试验条件下,该研究将ResNet-EAF与11种主流深度学习模型进行对比,结果表明该模型在自建数据集上的准确率、宏平均召回率及宏平均F1三项核心指标均位列第一。为验证模型在田间环境中的抗干扰能力与鲁棒性,该研究在公开JUTE PEST数据集上展开评估,结果显示ResNet-EAF模型准确率达98.35%,其宏平均召回率及少数类甜菜夜蛾的召回率在12个对比模型中均表现最优。该研究提出的方法可为样本分布不均衡场景下的农业害虫监测识别提供技术参考与支撑,不仅验证了模型在复杂田间环境中的实用性,也证实FL与ECA-CAA的协同作用可提升模型分类精度。

     

    Abstract: Accurate identification of rice pests is often crucial for national food security. A robust pest recognition model is also required in complex field scenarios. However, existing models are limited in cross-channel feature extraction due to the extremely imbalanced data in sample distribution. In this study, a dual-feature dynamic optimization model—ResNet-EAF, was proposed to recognize the rice pest with the imbalanced image dataset. Two feature calibration mechanisms were integrated, namely Efficient Channel Attention (ECA) and Channel-wise Affine Adaptation (CAA), to achieve synergistic and precise optimization of feature representation. This framework was used to construct the dual-feature optimization mechanism of "ECA feature screening—CAA feature calibration" after the Global Average Pooling (GAP) layer of the ResNet50 network. In the ECA module, the inter-channel correlations were established within local windows via adaptively matched 1D convolution kernels. Cross-channel interaction information was captured without dimensionality reduction. The weights of key pest feature channels were adaptively amplified to suppress the interference from redundant channels, thereby extracting the key features. Two types of learnable parameters were introduced into the CAA module. Each feature channel was realized to independently learn the configurations. The contribution weights were regulated and then refined using machine learning. The channels were prioritized for classification to weaken the noise channels during optimization. As such, the CAA module was realized to decouple the weight-bias coupling relationship in conventional affine transformation into channel-wise independent scaling-translation. The feature distinguishability among different pest categories was improved by the feature distribution in the datasets. The domain shift was then alleviated to enhance the generalization of the unknown field data. Notably, the very few learnable parameters were added with negligible computational overhead for the high recognition efficiency. A dynamic balanced loss strategy with Focal Loss (FL), inverse frequency weighting, and modulation coefficients acted synergistically with the dual-feature module to tackle the extreme sample imbalance. Specifically, the inverse frequency weighting dynamically assigned the weights according to the proportion of class samples to initially balance category distribution. The FL reduced the weights of easily classified majority-class samples via a modulation factor, thus focusing machine learning on hard-to-classify minority-class samples. Additional modulation coefficients were used to fine-tune the loss gradient for the training bias caused by extreme imbalance. Accurate identification of dominant pest categories was realized in the subtle core features of minority-class samples. The coverage of full-category recognition was significantly improved after optimization, which was highly compatible with the stable deep feature extraction of ResNet50. A series of experiments was conducted on the self-built pest image dataset. The ResNet-EAF model achieved an accuracy of 98.06%, a macro-average recall of 93.93%, and an F1-score of 93.80%, which were 3.63, 6.96, and 5.67 percentage points higher than the baseline model, respectively, thus ranking first among 11 models. Furthermore, the recall rates increased by 13.16% and 4.55%, respectively, in the minority-class pests (Pyralidae and Arctiidae). An anti-interference and generalization were evaluated on the public JUTE PEST dataset in real field environments. The ResNet-EAF model achieved an accuracy of 98.35% (second only to DINOv2’s 98.42%), with the highest macro-average recall and the recall rate of the minority-class Beet Armyworm among 11 models. Ablation experiments also verified the effectiveness of the dual-feature module. A channel importance pre-screening mechanism was lacking in the CAA module to locate key pest features. Generalized feature calibration failed to directly solve the minority-class recognition. In contrast, the ECA and CAA modules were combined into the complete "feature screening—calibration" closed loop. Firstly, the ECA module was used to precisely screen the key channels for the high-quality "effective feature base" in the CAA module. And then the CAA module performed the channel-wise adaptive calibration on these features for the feature distinguishability. In addition, the combination of ECA and dynamic balanced loss was achieved in the highest accuracy, macro-average recall, and F1-score among four mainstream attention mechanisms and five common loss functions. In summary, ResNet-EAF can provide an efficient technical solution to monitor pest disease under the imbalanced data scenarios using ECA-CAA dual-feature dynamic optimization and synergistic dynamic loss strategy. The practicality and robustness of the model were verified in complex field environments. The significant performance was obtained from the constructive interaction of FL, ECA, and CAA. The finding can offer an extensible solution for reliable field pest recognition in precision agriculture.

     

/

返回文章
返回