Agricultural pests significantly impact crop yield and quality, threatening food security and causing economic losses. Therefore, the precise identification of pests is crucial for improving agricultural production. However, traditional pest… Click to show full abstract
Agricultural pests significantly impact crop yield and quality, threatening food security and causing economic losses. Therefore, the precise identification of pests is crucial for improving agricultural production. However, traditional pest classification methods struggle to capture the complex relationships among different parts of pest images and often lack strong generalization capabilities, resulting in poor performance. To address these issues, we propose an agricultural pest classification model based on a multi-scale linear attention mechanism and Focal Loss. This model employs a multi-scale linear attention module to capture local features at various scales, as well as the long-distance dependencies and global relationships among these local features. It utilizes an attention mechanism with linear time complexity to ensure computational efficiency. In addition, we use the Focal Loss function to alleviate the impact of sample imbalance in the dataset and explore the effects of various data augmentation techniques on the model’s generalization ability. Experimental results demonstrate that our model performs excellently across datasets of different scales.
               
Click one of the above tabs to view related content.