Rapid and intelligent identification of rice pests serves as the core sensing technology for precision plant protection and smart rice farming systems, providing critical support for intelligent cultivation decisions. To address the challenges of insufficient robustness and low precision of existing lightweight detection models in complex agricultural environments, this study proposes HDA-YOLO, an improved lightweight YOLOv8 model based on a hierarchical and densely-fused attention mechanism, for fast and high-precision pest detection. To enhance feature fidelity, the model incorporates asymmetric dynamic downsampling (ADDS) and a multi-scale cascade pre-fusion (MCPF) module into the backbone network. To achieve dynamic, content-aware feature fusion, a hierarchical attention-driven dense fusion network (HADF-Net) is constructed, integrating an intra-scale self-attention module (ISAM) and an inter-scale cross-attention module (ICAM). Furthermore, the C2f module is upgraded to a multi-scale context (MSC) module to improve adaptability to variations in target scale. Experimental results on the self-built RicePest₁2 dataset demonstrate that HDA-YOLO, while maintaining a lightweight architecture (3. 93M parameters, 12. 02 GFLOPs), achieves significant improvements over the baseline YOLOv8n model, with mAP@50, F1-score, and Recall increasing by 2. 4%, 3. 8%, and 4. 8%, respectively. In comparison with the Transformer-based RT-DETR-R18 model, HDA-YOLO achieves a 4. 8 percentage points higher mAP@50, while its computational cost is only 22% and its parameter count is only 20% of RT-DETR-R18. Moreover, the proposed model has been successfully deployed on a mobile application, achieving real-time and accurate identification of field pests and demonstrating significant potential in the field of smart rice agriculture.
Yuan et al. (Tue,) studied this question.