1. Integrating Multiscale Linear Attention and Focal Loss for Robust Pest Classification
- Author
-
Shulin Zhao, Hai Wang, Tailian Liu, and Shulai Huang
- Subjects
Multi-scale linear attention ,focal loss ,pest classification ,data enhancement ,Electrical engineering. Electronics. Nuclear engineering ,TK1-9971 - 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.
- Published
- 2024
- Full Text
- View/download PDF