Based on the multi-scale information sharing network of fine-grained attention for agricultural pest detection

Linfeng Wang, Yong Liu, Jiayao Liu, Wang Yunsheng, Shipu XuPLoS 2023

Abstract

It is of great significance to identify the pest species accurately and control it effectively to reduce the loss of agricultural products. The research results of this project provide a theoretical basis for preventing and controlling the spread of pests and reducing the loss of agricultural products. Because of the slow speed and high cost of manual identification, we propose a novel convolutional neural network-based model (MSSN), which includes an attention mechanism, feature pyramid, and fine-grained model. We evaluated our approach on a large-scale pest dataset and the PlantVillage benchmark. Experimental results show that the proposed algorithm has better performance and universality than existing algorithms, achieving a maximum accuracy of 86.35%.

Introduction

Identifying pests in the field is a "needle in a haystack" problem. Insects are often tiny, camouflaged against complex backgrounds, and exhibit high inter-class similarity—meaning different species can look nearly identical. Standard Convolutional Neural Networks (CNNs) often lose critical semantic information during downsampling, making it difficult to capture the fine-grained features needed for accurate species identification. The Multi-Scale Information Sharing Network (MSSN) addresses this by using a recursive attention mechanism to "zoom in" on relevant regions across multiple scales without losing global context.

Methods

The MSSN architecture is built on three primary pillars:

1. Recursive Attention Mechanism

Instead of processing the whole image once, the model uses an Attention Proposal Network (APN). It identifies a region of interest, crops it, and passes it to the next scale. This acts like a digital zoom (Scale 1 → Scale 2 → Scale 3), allowing the network to focus on increasingly fine details, as illustrated in Figure 5.

The MSSN architecture illustrating the recursive attention mechanism across three scales.

2. Multi-Scale Information Sharing and PSO

The network shares feature information between scales to ensure fine-grained details are grounded in coarse context. As shown in Figure 6, the VGG backbone extracts feature maps (P1-P5) which are then fused. Particle Swarm Optimization (PSO) is used to determine optimal weights for fusing these classification results and minimizing information loss across pooling layers. This optimization balances the trade-off between finding the pest and correctly naming it.

Detailed view of the VGG-PSO backbone and feature integration.

3. Soft Voting

To finalize classification, the model employs a "soft voting" method to integrate predictions from different scales, ensuring the most confident and feature-rich scale has the appropriate influence on the final label.

Datasets and Experimental Setup

The study utilizes a custom pest dataset of 15,905 images across 10 classes (e.g., Rice planthopper, Wheat aphid) and the PlantVillage benchmark. Data augmentation techniques, including random rotations and brightness adjustments, were applied to improve model robustness against varied field conditions.

Results

  • Accuracy: The complete MSSN (Scale 1+2+3) achieved a maximum accuracy of 86.35%.
  • Precision and Recall: The model reached a Macro Mean Precision (MPre) of 91.02% and a Macro Mean Recall (MRec) of 85.56%.
  • Efficiency: The model operates at 26.5 FPS, which is sufficient for real-time or near-real-time field applications.
  • Comparative Performance: The MSSN scored 72.3% mAP, significantly outperforming benchmark architectures by Agarwal et al. (49.8%) and Chen et al. (65.8%).

Conclusion

The MSSN demonstrates that combining recursive attention with multi-scale information sharing is vital for fine-grained agricultural tasks. While training time (19.2 hours) and environmental sensitivity remain challenges for future work, the model's high accuracy and practical inference speed provide a robust foundation for automated agricultural monitoring systems.

Summary updated

BibTeX
@inproceedings{wang2023based,
  author = {Linfeng Wang and Yong Liu and Jiayao Liu and Wang Yunsheng and Shipu Xu},
  title = {{Based on the multi-scale information sharing network of fine-grained attention for agricultural pest detection}},
  booktitle = {PLoS},
  year = {2023},
  doi = {10.1371/journal.pone.0286732},
}
Figure