Attention-PestNet: hierarchical scaled dot-product attention for insect pest detection
摘要
Timely and precise insect pest detection is critical in areas with high agricultural intensity and climates that favor continuous pest activity. Traditional pest identification methods, such as manual inspection or expert guided analysis, are labor intensive and time consuming. These approaches lack scalability and hinder timely intervention, particularly in resource-constrained settings. Furthermore, the high visual similarity between pest species and intra-species variability across developmental stages further challenge detection efforts in real-world agricultural conditions. To address these limitations, we propose Attention-PestNet, a novel one-stage object detection network designed for insect pest detection. Our method consist of two key attention-based modules to enhance feature extraction and improve detection performance. First, the Hierarchical Scaled Dot-Product Attention module leverages a multi-level attention mechanism to capture salient pest features at different scales. Second, the Multi-Scale Spatial Attention module refines spatial feature representations by incorporating horizontal and vertical attention pathways with multi-scale max-pooling operation to enhance contextual understanding. Extensive experiments were conducted on two public benchmarks, IP102 and R2000 datasets, which represent agricultural conditions in Asia. The results demonstrate that Attention-PestNet outperforms state-of-the-art models in both visualization outputs and quantitative metrics. Attention-PestNet shows strong potential as a scalable and cost-effective solution for intelligent pest monitoring in modern precision agriculture. Our code and data for this paper are made available at: https://github.com/thinhdoanvu/HSDPA.