欢迎访问林业科学,今天是

林业科学 ›› 2025, Vol. 61 ›› Issue (10): 154-163.doi: 10.11707/j.1001-7488.LYKX20240446

• 研究论文 • 上一篇    

融合多尺度注意力特征的林业外来害虫检测方法

张长春1,2,3(),杨兴昌1,王国骅1,王冰婧4,李诗杰1,陈方舟1,葛永泰1,石娟5,*(),张军国1,2,3,*()   

  1. 1. 北京林业大学工学院 北京 100083
    2. 林木资源高效利用全国重点实验室 北京 100083
    3. 北京林业大学生物多样性智慧监测研究中心 北京 100083
    4. 北京林业大学信息学院 北京 100083
    5. 北京林业大学林学院 北京 100083
  • 收稿日期:2024-07-16 出版日期:2025-10-25 发布日期:2025-11-05
  • 通讯作者: 石娟,张军国 E-mail:zhangchangchun@bjfu.edu.cn;shi_juan@263.net;zhangjunguo@bjfu.edu.cn
  • 基金资助:
    中央高校基本科研业务费专项资金(QNTD202510);中央高校优秀青年团队项目(QNTD202304);北京市级大学生创新训练项目(S202310022154)。

A Detection Method of Alien Forest Pests with Integrating Multi-scale Attention Features

Changchun Zhang1,2,3(),Xingchang Yang1,Guohua Wang1,Bingjing Wang4,Shijie Li1,Fangzhou Chen1,Yongtai Ge1,Juan Shi5,*(),Junguo Zhang1,2,3,*()   

  1. 1. School of Technology, Beijing Forestry University Beijing 100083
    2. State Key Laboratory of Efficient Production of Forest Resources Beijing 100083
    3. Research Center for Biodiversity Intelligent Monitoring, Beijing Forestry University Beijing 100083
    4. School of Information Science and Technology, Beijing Forestry University Beijing 100083
    5. School of Forestry, Beijing Forestry University Beijing 100083
  • Received:2024-07-16 Online:2025-10-25 Published:2025-11-05
  • Contact: Juan Shi,Junguo Zhang E-mail:zhangchangchun@bjfu.edu.cn;shi_juan@263.net;zhangjunguo@bjfu.edu.cn

摘要:

目的: 针对林业外来害虫因目标尺度多样、栖息环境复杂、易受遮挡等因素导致的现有检测算法识别准确率低、鲁棒性差的问题,提出一种融合多尺度注意力特征的林业外来害虫检测方法(MAF-YOLO),通过增强模型对不同尺度特别是小尺度目标的特征提取能力,并优化边界框回归策略,从而显著提升在复杂自然环境下对外来害虫的检测精度和泛化能力。方法: 该方法以YOLOv5s为基线架构,其核心改进包括:1) 在颈部网络中嵌入坐标注意力机制,以强化对目标区域关键特征的捕获能力并抑制背景噪声干扰;2) 增设160像素×160像素的小目标检测头,构建多层级检测结构,以提升对微小目标的检测灵敏度;3) 采用Focal-EIoU损失函数替代原始CIoU损失函数,缓解正负样本及难易样本不平衡的问题,优化目标的定位精度;4) 引入域适应训练策略,通过在大规模通用数据集上预训练,增强模型对不同场景的泛化能力。结果: 在包含15类潜在入侵和已入侵的林业外来害虫图像数据集上,训练和评估提出的模型,改进后的YOLOv5s模型精确率和召回率较原始YOLOv5s模型分别提升3.6%和4.4%;与SSD、YOLOv7、YOLOv8模型相比,改进模型的平均识别精度分别提高2.2%、1.1%和0.3%;结合域适应后模型精确率达77.9%,较原模型提升2.1%。结论: 本研究实现了林业外来害虫的精准识别,增强了模型的准确性与鲁棒性,为有效监测林业外来害虫提供了理论依据和技术支持。

关键词: 林业外来害虫, YOLOv5s, 坐标注意力, 域适应, 图像检测

Abstract:

Objective: To address the challenges of low identification accuracy and insufficient robustness in existing detection algorithms for alien forest pests, which stem from factors such as diverse target scales, complex habitats, and frequent occlusions, this paper proposes a detection method integrating multi-scale attention features, termed MAF-YOLO. The method aims to significantly enhance the detection accuracy and generalization capability for alien pests in complex natural environments by strengthening the model’s feature extraction capability for targets of varying scales, particularly small-scale ones, and optimize the bounding box regression strategy. Method: The proposed method was based on the YOLOv5s baseline architecture, and its core modifications included: 1) A coordinate attention (CA) mechanism was embedded into the neck network to enhance the capture of key target features and suppress background noise. 2) A small target detection head with 160×160 pixel was added to construct a multi-level detection structure, thereby improving detection sensitivity for minute objects. 3) The Focal-EIoU loss function was employed to replace the original CIoU loss, in order to mitigate the imbalance between positive/negative and easy/hard samples, and refine object localization accuracy. 4) A domain adaptation training strategy was introduced to improve the model's generalization across diverse scenarios by pre-training on a large-scale general-purpose dataset. Result: The proposed model was trained and evaluated on an image dataset comprising 15 categories of potential and existing invasive forest pests. The improved YOLOv5s model, MAF-YOLO, demonstrated an increase in precision and recall by 3.6% and 4.4%, respectively, compared to the original YOLOv5s. In comparison with the SSD, YOLOv7, and YOLOv8 models, the average precision of the improved model was higher by 2.2%, 1.1%, and 0.3%, respectively. Furthermore, with the integration of domain adaptation, the model’s precision reached 77.9%, representing a 2.1% improvement over the baseline model under the same strategy. Conclusion: This study achieves precise recognition of invasive alien forest pests, enhances the model's accuracy and robustness, and provides theoretical and technical support for effective monitoring of alien forest pest.

Key words: alien forest pest, YOLOv5s, coordinate attention, domain adaptation, image detection

中图分类号: