DOI: 10.3390/insects17111111 ISSN: 2075-4450

Forest Pest Detection Algorithm Based on Improved YOLOv11 with Intraspecific Classification Strategy

Xiuhao Liang, Jun Xiang, Sheng Qin, Wangjiao Liao, Junxiu Liu, Kanyakorn Piraonapicha, Nguyen Thanh Tuan, Wei Wei, Dongxia Zou

Forest pest detection has challenges such as the high similarity in appearance among different species, which leads to feature confusion. To address this issue, this paper proposes an improved YOLOv11 forest pest detection model with a fine-grained intraspecific classification strategy. The bottleneck of identification caused by the diversity of internal morphologies is effectively alleviated via constructing a dataset with adults, larvae, and nymphs, i.e., using intraspecific classification strategy. This model incorporates a CBA (Convolution-BatchNorm-AReLU) module, Scale-based Dynamic (SD) loss, and an Adaptively Spatial Feature Fusion (ASFF) module. The CBA module integrates an attention mechanism to dynamically adjust the gradient, which alleviates vanishing gradients and accelerates the convergence of model parameters. SD loss adaptively balances localization and scale loss based on a target scale, which reduces IoU fluctuations and enhances cross-scale robustness. Resolution conflicts and optimizing semantic alignment are alleviated by introducing the ASFF module to achieve learnable spatial multi-scale feature fusion. Experimental results show that the improved YOLOv11 model outperforms existing methods, with Precision, Recall, AP50–90, and F1 score reaching 97.19%, 97.20%, 88.25%, and 97.17%, respectively. In practical applications, the proposed model can accurately capture subtle differences in the microscopic features of the same pest during different life cycles. This research project can accurately identify the types and occurrence stages of pests, match targeted control measures, avoid the use of excessive pesticides, and significantly reduce the cost of control and environmental pollution.

More from our Archive