HUBEI AGRICULTURAL SCIENCES ›› 2026, Vol. 65 ›› Issue (3): 190-196.doi: 10.14088/j.cnki.issn0439-8114.2026.03.030

• Agricultural Engineering • Previous Articles     Next Articles

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 Online:2026-03-25 Published:2026-04-09

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

CLC Number: