Forestpest-YOLO: A High-Performance Detection Framework for Small Forestry Pests

Aoduo Li, P. M. Lin, Jiancheng Li, Zheng Zhang, Shiting Wu, Z. R. Liang, Zhifa JiangarXiv 2025 · DOI

Abstract

Detecting agricultural pests in complex forestry environments using remote sensing imagery is fundamental for ecological preservation, yet it is severely hampered by practical challenges. Targets are often minuscule, heavily occluded, and visually similar to the cluttered background, causing conventional object detection models to falter due to the loss of fine-grained features and an inability to handle extreme data imbalance. To overcome these obstacles, this paper introduces Forestpest-YOLO, a detection framework meticulously optimized for the nuances of forestry remote sensing. Building upon the YOLOv8 architecture, our framework introduces a synergistic trio of innovations. We first integrate a lossless downsampling module, SPD-Conv, to ensure that critical high-resolution details of small targets are preserved throughout the network. This is complemented by a novel cross-stage feature fusion block, CSPOK, which dynamically enhances multi-scale feature representation while suppressing background noise. Finally, we employ VarifocalLoss to refine the training objective, compelling the model to focus on high-quality and hard-to-classify samples. Extensive experiments on our challenging, self-constructed ForestPest dataset demonstrate that Forestpest-YOLO achieves state-of-the-art performance, showing marked improvements in detecting small, occluded pests and significantly outperforming established baseline models.

Introduction

Automated remote sensing using Unmanned Aerial Vehicles (UAVs) has emerged as a transformative tool for monitoring forest health. However, identifying pests in high-resolution UAV imagery remains a significant challenge. Pests such as individual eggs or boreholes are often minuscule, frequently occupying less than 32x32 pixels within a massive image.

Beyond their small scale, these targets are often camouflaged against complex backgrounds of bark textures and dappled shadows, or occluded by the forest canopy. Standard object detection models typically struggle in these scenarios because their aggressive downsampling layers—designed to reduce computational load—often erase the subtle visual cues of tiny objects. Furthermore, the extreme imbalance between background pixels and the rare "pest" pixels can destabilize the training process. Forestpest-YOLO addresses these issues through architectural refinements specifically designed for small-scale, camouflaged detection.

Methodology

Forestpest-YOLO builds upon the YOLOv8s baseline, introducing three key architectural enhancements to preserve fine-grained features and improve classification focus:

  1. SPD-Conv (Lossless Downsampling): Traditional strided convolutions discard spatial information to reduce resolution. Forestpest-YOLO replaces critical downsampling layers with Space-to-Depth (SPD) convolutions. This technique slices spatial dimensions and stacks them into the channel depth, effectively reducing resolution without losing any pixel data, which is vital for preserving the "weak cues" of tiny pests.
  2. CSPOK (Cross-Stage Parallel Omni-Kernel Fusion): To better distinguish pests from cluttered backgrounds, the standard C2f units in the network's neck are replaced with CSPOK modules. This module utilizes an Omni-Kernel mechanism that dynamically adapts its receptive field, allowing the model to capture both fine local details and broader contextual information simultaneously.
  3. VarifocalLoss (VFL): To mitigate the impact of class imbalance, the framework adopts VarifocalLoss. Unlike standard loss functions, VFL asymmetrically weights samples, forcing the model to prioritize hard-to-classify examples and high-quality positive matches over easy background patches.
The Forestpest-YOLO architecture, highlighting the SPD-Conv and CSP-OKM modules.

The ForestPest Dataset

To evaluate the model in realistic conditions, the authors developed the ForestPest dataset. It consists of 5,690 high-resolution UAV images containing 15 pest classes and 32,450 annotated bounding boxes. Critically, over 70% of these targets are classified as "small" (area < 32x32 pixels), providing a rigorous benchmark for small object detection in natural environments.

Experimental Results

Forestpest-YOLO demonstrates superior performance across multiple metrics. The model achieved an [email protected]:.95 of 0.508, significantly outperforming mainstream architectures such as YOLOv5s and RT-DETR-R50.

The most notable improvement occurred in the detection of small objects. The model reached an $AP_{small}$ of 0.131, representing a 17.0% relative increase over the YOLOv8s baseline. Ablation studies confirmed that each module contributed meaningfully to this success, with the SPD-Conv module alone providing a 6.3% relative boost to small object accuracy.

Ablation study results showing incremental performance gains from each proposed module.

Despite these architectural additions, the model remains highly efficient. With only 12.1M parameters and 30.2G FLOPs, it maintains an inference speed of 118 FPS, making it suitable for real-time deployment on UAV edge computing hardware.

Conclusion

Forestpest-YOLO provides a robust solution for the difficult task of detecting small, camouflaged pests in forestry environments. By combining lossless downsampling with dynamic feature fusion and an optimized loss function, the framework achieves state-of-the-art accuracy without sacrificing real-time performance. Future research will focus on enhancing the model's robustness under varying weather conditions and exploring semi-supervised learning techniques to reduce the burden of manual data annotation.

Summary updated

BibTeX
@misc{li2025forestpest,
  author = {Aoduo Li and P. M. Lin and Jiancheng Li and Zheng Zhang and Shiting Wu and Z. R. Liang and Zhifa Jiang},
  title = {{Forestpest-YOLO: A High-Performance Detection Framework for Small Forestry Pests}},
  year = {2025},
  eprint = {2510.00547},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.00547},
  howpublished = {arXiv},
}
Figure