Forestpest-YOLO: UAV Forestry Pest Detection
- Forestpest-YOLO is a YOLOv8 adaptation for UAV forestry pest detection that uses SPD-Conv for lossless downsampling to preserve tiny pest features.
- The CSPOK block improves multi-scale feature fusion in cluttered forest imagery, enhancing detection accuracy for small, occluded targets.
- VarifocalLoss addresses sample imbalance by focusing on high-quality positives, leading to significant gains in mAP and AP_small performance.
Forestpest-YOLO is a YOLOv8-based detection framework specialized for forestry pest detection in UAV imagery, particularly for small, cluttered, and hard-to-distinguish targets in remote sensing images. It is framed as automated detection of pest instances or pest-related signs for smart forestry and ecological monitoring, under conditions in which targets are often extremely small, frequently occluded by leaves or branches, and visually confounded by bark texture, shadows, rocks, and fallen leaves. The method modifies the standard YOLOv8 backbone–neck–head pipeline through three coordinated changes: a lossless downsampling module called SPD-Conv in the backbone, a Cross-Stage Parallel Omni-Kernel Fusion block called CSPOK in the neck, and VarifocalLoss as the classification loss during training (Li et al., 1 Oct 2025).
1. Problem setting and detection regime
Forestpest-YOLO is designed for a detection regime in which conventional object detectors are stressed by several simultaneous difficulties. The paper emphasizes that, in the ForestPest dataset, more than 70% of targets occupy fewer than pixels, placing the task squarely in the regime of small-object detection. In addition to scale, targets are often heavily occluded and visually similar to the cluttered forest background, while appearance varies with season, weather, and pest life stage. The training distribution is also imbalanced, with many easy background regions and relatively few informative positives; the paper further notes insufficient negative imagery in prior datasets, which tends to produce false positives in healthy forest areas (Li et al., 1 Oct 2025).
The architectural motivation follows directly from these failure modes. Conventional backbones are described as losing critical details too early because strided convolution or pooling discards fine-grained spatial information during downsampling. For tiny pests, those lost details may be the only cues available. Standard neck fusion is characterized as too weak or too generic in highly cluttered forest scenes, where subtle pest structure must be separated from visually similar background textures. Common classification losses are also presented as poorly matched to severe positive/negative and easy/hard imbalance, because training becomes dominated by abundant easy background samples rather than rare, ambiguous, high-value pest instances.
This problem formulation places Forestpest-YOLO within a broader class of forestry vision systems that adapt YOLO architectures to biologically specific targets rather than relying on generic detector settings. Related work illustrates several adjacent formulations. FID-Net detects infected and healthy tree crowns from UAV visible-light imagery rather than pest bodies, using symptom-enhanced dual-branch fusion (Zhang et al., 15 Dec 2025). YOLO-DP likewise addresses UAV detection of unhealthy pine trees associated with red turpentine beetle infestation, emphasizing dense small-target aerial detection and target-free imagery for false-positive control (Zhou et al., 2024). A broader benchmark perspective from ODverse33 argues that newer YOLO versions are not always better across specialized domains, reinforcing the rationale for domain-matched architectural modification rather than version-number substitution alone (Jiang et al., 20 Feb 2025).
2. Model structure and coordinated modifications
The overall pipeline remains recognizably YOLOv8: images pass through a backbone to extract features, a neck to fuse multi-scale representations, and detection heads to produce predictions. The paper states that the fused feature maps are then passed to the detection heads, implying that the head remains essentially YOLOv8’s standard detection head. The model changes are concentrated in information preservation, feature fusion, and optimization (Li et al., 1 Oct 2025).
According to the model description, a conventional strided convolution is replaced by SPD-Conv after the P2 feature extraction stage in the backbone. In the neck, the standard C2f fusion units are replaced by CSPOK blocks. During training, the original classification loss is replaced with VarifocalLoss. The paper presents these as a synergistic trio rather than independent add-ons: SPD-Conv addresses the problem that information disappears too early, CSPOK addresses the need for stronger multi-scale interaction under clutter, and VarifocalLoss addresses imbalance between positive and negative samples and between easy and hard examples.
The design logic is explicitly sequential. Preservation of fine spatial detail is treated as a prerequisite for tiny-object recognition. Fusion is then strengthened so that preserved local cues can interact with broader context and clutter-suppression mechanisms. Optimization is finally altered so that the detector concentrates on high-quality positives and informative hard cases rather than being dominated by trivial background.
This sequencing differentiates Forestpest-YOLO from systems that change only one subsystem. FID-Net, for example, emphasizes front-end symptom feature engineering through FEM, dual-branch fusion through AMFM, and channel recalibration through ECA, but it is built for crown-level infestation detection rather than direct pest-instance detection (Zhang et al., 15 Dec 2025). YOLO-DP emphasizes receptive-field expansion, GhostConv, and anchor recalibration in a YOLOv5s-derived framework for unhealthy-tree detection (Zhou et al., 2024). Forestpest-YOLO instead remains close to YOLOv8 structurally while targeting three specific bottlenecks in small forestry pest detection.
3. SPD-Conv and lossless downsampling
SPD-Conv is described as a “space-to-depth” feature transformer inserted in the backbone, specifically replacing a conventional downsampling operation after the P2 stage. Its purpose is to downsample without discarding pixels, thereby preserving weak local cues that may correspond to tiny pests (Li et al., 1 Oct 2025).
Given an input feature map , the module first slices the map into interleaved submaps. For scale , the paper defines
These submaps are then concatenated along the channel dimension: with
A non-strided convolution is then applied: where
In the paper’s interpretation, this is “lossless downsampling”: width and height are halved, but the full set of sampled local information is preserved by being reorganized into channel depth before compact projection. The intended detection benefit is direct. If a pest occupies only a few pixels, conventional stride-based reduction can erase it or blur it into the background, whereas SPD-Conv preserves those cues for later layers.
The ablation study supports that interpretation. Adding SPD-Conv to YOLOv8s improves from 0.112 to 0.119 and mAP from 0.482 to 0.491. This suggests that early-stage information retention is a nontrivial limiting factor in the ForestPest setting.
A plausible implication is that SPD-Conv addresses a more general remote-sensing pathology: aggressive early spatial compression is especially harmful when the discriminative signal is sparse, weak, and easily confounded by texture-rich background. That logic is consistent with other forestry and aerial detection settings in which tiny targets dominate, including UAV unhealthy-tree detection in PDT and aerial-domain findings in ODverse33, although those works do not implement this specific module (Zhou et al., 2024, Jiang et al., 20 Feb 2025).
4. CSPOK, adaptive fusion, and VarifocalLoss
CSPOK stands for Cross-Stage Parallel Omni-Kernel Fusion and replaces the original YOLOv8 C2f fusion units in the neck. Its stated purpose is to improve feature fusion across scales and make the neck more robust in cluttered forest environments (Li et al., 1 Oct 2025).
The paper formalizes CSPOK by splitting an input feature map 0 into two parts: 1
The first branch, 2, acts as a direct cross-stage path that preserves original information and improves gradient flow in the spirit of CSP design. The second branch is processed by a convolution followed by an Omni-Kernel mechanism: 3
The two branches are then concatenated and fused: 4
The paper does not provide a deeper internal mathematical specification of the Omni-Kernel mechanism beyond stating that CSPOK “leverag[es] Omni-Kernel for robust, efficient multi-scale fusion” and that the OKM block “dynamically adapts its fusion strategy based on the input features.” Accordingly, the exact kernel decomposition, attention formulation, or weighting equations inside OKM are not available from the paper. What can be stated confidently is that CSPOK is a CSP-inspired parallel fusion block using OKM for adaptive feature processing.
The conceptual role of CSPOK is twofold. One branch preserves the original feature stream so that information is not overprocessed or washed out; the other branch uses adaptive Omni-Kernel processing to aggregate local detail and broader context. The paper explicitly states that this parallel design “enriches the feature diversity and enhances the model’s ability to capture both local details and global context.” In pest detection, local detail is necessary because targets are tiny and visually subtle, while global context is useful because occlusion and camouflage require contextual disambiguation. The paper also claims that CSPOK dynamically enhances multi-scale representation while suppressing background noise.
Empirically, when CSPOK is added on top of SPD-Conv, 5 rises from 0.119 to 0.126 and mAP6 rises from 0.491 to 0.499. This suggests that stronger adaptive neck fusion contributes gains beyond detail preservation alone.
The third modification is the replacement of the original classification loss with VarifocalLoss. The exact formula given in the paper is
7
where 8 is the predicted score and 9 is the target IoU score, with 0 and 1.
This definition is central to the method’s optimization rationale. For positives, 2 is not merely a binary label but the target IoU score, so higher-quality matches receive stronger supervision. For negatives, the factor 3 down-weights easy negatives and emphasizes harder negatives with larger predicted confidence. The paper therefore characterizes VFL as asymmetric and quality-aware, intended to focus training on high-quality positives and informative hard cases rather than on already-solved background. It states that this leads to more precise localization and classification, but it does not provide a full revised total loss decomposition for YOLOv8; exact box-loss, DFL, or objectness formulations under the modified setup are not reported and should not be inferred.
5. ForestPest dataset and experimental protocol
The validation benchmark is a self-built dataset called ForestPest, described as a forestry remote sensing pest detection dataset built to simulate real-world monitoring challenges. It contains 5,690 high-resolution UAV images in COCO format, 15 pest classes, and 32,450 total bounding boxes. More than 70% of targets are “small,” defined under the COCO criterion of area less than 4 pixels. The reported train/validation split is 4,800 / 890. The paper repeatedly refers to evaluation on the “ForestPest test set,” but the dataset table only gives train/val counts totaling 5,690 and does not specify a separate test-set size (Li et al., 1 Oct 2025).
The dataset is said to include diverse scenes, pest species, and life stages, with a significant portion of small, occluded, and camouflaged targets. The images are high-resolution UAV images acquired for forestry monitoring. However, the paper does not provide more specific acquisition metadata such as flight altitude, sensor type, seasons represented, geographic location, native image resolution before resizing, or a detailed annotation protocol beyond COCO format and total box count.
The training setup is specified with moderate detail. Implementation is in PyTorch, using YOLOv8s as the baseline. Training was performed on a server with four NVIDIA RTX 3090 GPUs. The optimizer is AdamW with initial learning rate 5, trained for 100 epochs with cosine annealing. Input images are resized to 6, and batch size is 8. Data augmentation includes Mosaic, MixUp, random affine transformations (rotation and scaling), and color jitter. The paper states that these settings were used across compared models for fairness.
This protocol places Forestpest-YOLO in a UAV-remote-sensing lineage distinct from several adjacent forestry YOLO applications. FID-Net uses orthomosaic cropping to 7 tiles from 32 forest plots and consumer-grade UAV visible-light imagery, but its labels are infected and healthy crowns rather than pests (Zhang et al., 15 Dec 2025). PDT uses a dual-resolution strategy with 8 high-resolution imagery and 9 sliding-window tiles for unhealthy pine tree detection (Zhou et al., 2024). A separate forestry robotics line combines YOLO segmentation with stereo depth estimation for close-range branch perception rather than aerial pest monitoring (Lin et al., 5 Dec 2025). These comparisons clarify that Forestpest-YOLO is specifically a small-object pest detector in UAV forest imagery, not a generic forestry YOLO system.
6. Quantitative performance, interpretation, and limitations
The main reported results on the ForestPest test set compare Forestpest-YOLO with several baselines:
| Model | mAP0 / mAP1 / 2 | Parameters / FLOPs / FPS |
|---|---|---|
| YOLOv5s | 0.478 / 0.728 / 0.110 | 7.2M / 16.5G / 140 |
| YOLOv8s | 0.482 / 0.746 / 0.112 | 11.2M / 28.6G / 125 |
| RT-DETR-R50 | 0.501 / 0.737 / 0.128 | 33.0M / 109.0G / 74 |
| Forestpest-YOLO | 0.508 / 0.762 / 0.131 | 12.1M / 30.2G / 118 |
These numbers indicate that Forestpest-YOLO is the best overall model among those compared on both mAP metrics and on 3 (Li et al., 1 Oct 2025). Relative to YOLOv8s, it improves mAP4 by 0.026 absolute, mAP5 by 0.016 absolute, and 6 by 0.019 absolute. The paper highlights the 7 gain as a 17.0% relative increase over YOLOv8s. Relative to RT-DETR-R50, Forestpest-YOLO is slightly more accurate while being much lighter and faster: 12.1M vs. 33.0M parameters, 30.2G vs. 109.0G FLOPs, and 118 vs. 74 FPS.
The ablation study is central to the method’s interpretation:
| Configuration | mAP8 / mAP9 / 0 |
|---|---|
| Baseline YOLOv8s | 0.482 / 0.746 / 0.112 |
| 1 SPD-Conv | 0.491 / 0.750 / 0.119 |
| 2 SPD-Conv 3 CSPOK | 0.499 / 0.753 / 0.126 |
| 4 VFL (full model) | 0.508 / 0.762 / 0.131 |
The progression is monotonic, which the paper interprets as evidence that the modules are synergistic rather than redundant. SPD-Conv provides the first gain by preserving tiny-object information, CSPOK strengthens multi-scale and cross-stage fusion under clutter, and VFL further improves optimization under imbalance. This cumulative pattern is the principal empirical support for the framework’s design.
The reported efficiency cost is modest. Compared with YOLOv8s, parameters rise from 11.2M to 12.1M and FLOPs from 28.6G to 30.2G, while FPS decreases from 125 to 118. This suggests a favorable accuracy–efficiency balance for UAV-based forest inspection scenarios in which pests appear as tiny signals amid foliage, bark texture, shadows, and occlusions, and where near-real-time inference still matters.
The paper also states limitations. Performance may decline under extreme weather conditions. The method still depends on supervised learning and therefore requires large annotated datasets. As future work, the authors propose multimodal data fusion, semi-supervised learning, and lightweight Transformer-based decoders (Li et al., 1 Oct 2025).
In the broader literature, these limitations are consistent with adjacent forestry YOLO systems. FID-Net notes limited generalization across regions, tree species, and other pest or disease types, as well as vulnerability to extreme lighting, blur, and distortion (Zhang et al., 15 Dec 2025). PDT is unusually relevant because it also targets forest UAV imagery, but its labels are restricted to a single class, “unhealthy,” and it does not resolve multi-pest taxonomy (Zhou et al., 2024). ODverse33 further indicates that detector choice should remain evidence-driven and domain-specific, since newer YOLO versions do not uniformly outperform older ones across agricultural, aerial, wildlife, and microscopic settings (Jiang et al., 20 Feb 2025).
Taken together, Forestpest-YOLO is best understood as a problem-specific YOLOv8 adaptation for tiny, occluded, and cluttered forestry pest targets. Its core claim is not that generic detector scaling suffices, but that small-object preservation, adaptive multi-scale fusion, and quality-aware asymmetric optimization must be co-designed for the peculiarities of UAV forest pest imagery.