湖北农业科学 ›› 2026, Vol. 65 ›› Issue (3): 190-196.doi: 10.14088/j.cnki.issn0439-8114.2026.03.030

• 农业工程 • 上一篇    下一篇

融合多尺度特征与注意力机制的改进YOLOv12农作物虫害检测方法

于丽敏1,2, 吴奇峰2, 曲荣芳1, 白如霄2, 李全胜2, 安晓飞3, 张领先4   

  1. 1.山东农业工程学院,济南 250100;
    2.新疆农垦科学院,新疆 石河子 832000;
    3.国家农业智能装备工程技术研究中心,北京 100097;
    4.中国农业大学,北京 100083
  • 收稿日期:2025-12-01 出版日期:2026-03-25 发布日期:2026-04-09
  • 通讯作者: 吴奇峰(1978-),男,新疆石河子人,副研究员,博士,主要从事农业工程研究,(电话)18094801555(电子信箱)1548611544@qq.com。
  • 作者简介:于丽敏(1978-),女,山东济南人,副教授,博士,主要从事智慧农业研究,(电话)18615177887(电子信箱)18615177887@163.com。
  • 基金资助:
    山东大学访问学者项目(202306); 山东农业工程学院青年教师科研项目(QNKJZ202305); 新疆BT农业科技创新工程专项项目(NCG202507)

Improved YOLOv12 with multi-scale feature fusion and attention mechanism for crop pest detection

YU Li-min1,2, WU Qi-feng2, QU Rong-fang1, BAI Ru-xiao2, LI Quan-sheng2, AN Xiao-fei3, ZHANG Lin-xian4   

  1. 1. Shandong Agriculture and Engineering University, Jinan 250100, China;
    2. Xinjiang Academy of Agricultural and Reclamation Sciences, Shihezi 832000, Xinjiang, China;
    3. National Engineering Research Center of Intelligent Equipment for Agriculture, Beijing 100097, China;
    4. China Agricultural University, Beijing 100083, China
  • Received:2025-12-01 Published:2026-03-25 Online:2026-04-09

摘要: 为解决农作物虫害目标小、类别多、光照变化大和背景干扰强等问题,基于YOLOv12提出一种面向复杂农田场景的农作物虫害目标检测方法CPD-YOLO(Crop Pest Detection YOLO)。该方法在不显著增加计算开销的前提下,通过构建轻量化高分辨率特征分支、引入轻量化BiFPN多尺度特征融合模块,并设计面向小目标的Anchor-Free检测头,以提升细粒度特征保留、多尺度信息交互与小目标定位回归能力。试验在涵盖水稻、玉米、豆类等102类主要农作物虫害的数据集上进行,结果表明,相较基线YOLOv12,CPD-YOLO在mAP@0.5上提升约3.6个百分点,在mAP@0.5∶0.95上提升约4.2个百分点。与SSD、Faster R-CNN、YOLOv5、YOLOv7、YOLOv8以及YOLOv9相比,CPD-YOLO在mAP@0.5上分别提高约15.3、9.6、7.9、5.1、5.4和4.2个百分点,同时保持接近基线YOLOv12的实时推理速度。研究提出的CPD-YOLO能够有效改善复杂农田条件下的虫害识别性能,可为农作物虫害智能监测和精准防控提供可靠技术支撑。

关键词: 虫害检测, YOLOv12, 小目标检测, 多尺度特征融合, 深度学习

Abstract: To address the challenges of small pest targets, numerous categories, large illumination variations, and strong background interference in complex farmland environments,the CPD-YOLO (Crop Pest Detection YOLO), an improved crop pest detection method based on YOLOv12, was proposed. Without a notable increase in computational cost, CPD-YOLO incorporated a lightweight high-resolution feature branch, a lightweight BiFPN-based multi-scale feature fusion module, and an anchor-free detection head tailored for small objects to enhance fine-grained feature preservation, multi-scale contextual interaction, and small target localization regression ability. Experiments were conducted on a dataset covering 102 major crop pest categories, including pests of rice, maize, and legumes. The results showed that, compared with the YOLOv12 baseline, CPD-YOLO improved mAP@0.5 by approximately 3.6 percentage points and mAP@0.5∶0.95 by approximately 4.2 percentage points. Compared with SSD,Faster R-CNN,YOLOv5,YOLOv7,YOLOv8 and YOLOv9, CPD-YOLO further increased mAP@0.5 by about 15.3,9.6,7.9,5.1,5.4 and 4.2 percentage points, respectively, while maintaining real-time inference speed close to the YOLOv12 baseline. These results demonstrated that CPD-YOLO could effectively improve pest detection performance under complex field conditions and provided reliable technical support for intelligent monitoring and precision control of crop pest.

Key words: pest detection, YOLOv12, small object detection, multi-scale feature fusion, deep learning

中图分类号: