# Farmland pest recognition based on Cascade RCNN Combined with Swin-Transformer

**Authors:** Ruikang Xu, Jiajun Yu, Lening Ai, Haojie Yu, Zining Wei

PMC · DOI: 10.1371/journal.pone.0304284 · 2024-06-06

## TL;DR

This paper introduces a new method combining Cascade RCNN and Swin Transformer to accurately detect and identify farmland pests using improved feature extraction and data augmentation techniques.

## Contribution

A novel two-stage pest detection method combining Cascade RCNN and Swin Transformer with SCF-FPN module for enhanced feature extraction.

## Key findings

- The proposed method achieved 92.5% accuracy, 91.8% recall, and 93.7% mAP in detecting 28 pest species.
- The model outperformed the baseline by 12.1% in accuracy, 5.4% in recall, and 7.6% in mAP.
- The SCF-FPN module and data augmentation techniques significantly improved pest detection performance.

## Abstract

Agricultural pests and diseases pose major losses to agricultural productivity, leading to significant economic losses and food safety risks. However, accurately identifying and controlling these pests is still very challenging due to the scarcity of labeling data for agricultural pests and the wide variety of pest species with different morphologies. To this end, we propose a two-stage target detection method that combines Cascade RCNN and Swin Transformer models. To address the scarcity of labeled data, we employ random cut-and-paste and traditional online enhancement techniques to expand the pest dataset and use Swin Transformer for basic feature extraction. Subsequently, we designed the SCF-FPN module to enhance the basic features to extract richer pest features. Specifically, the SCF component provides a self-attentive mechanism with a flexible sliding window to enable adaptive feature extraction based on different pest features. Meanwhile, the feature pyramid network (FPN) enriches multiple levels of features and enhances the discriminative ability of the whole network. Finally, to further improve our detection results, we incorporated non-maximum suppression (Soft NMS) and Cascade R-CNN’s cascade structure into the optimization process to ensure more accurate and reliable prediction results. In a detection task involving 28 pest species, our algorithm achieves 92.5%, 91.8%, and 93.7% precision in terms of accuracy, recall, and mean average precision (mAP), respectively, which is an improvement of 12.1%, 5.4%, and 7.6% compared to the original baseline model. The results demonstrate that our method can accurately identify and localize farmland pests, which can help improve farmland’s ecological environment.

## Full-text entities

- **Diseases:** SCF-FPN (MESH:D015419), granary pests (MESH:D029021)
- **Species:** Malus domestica (apple, species) [taxon 3750]

## Figures

30 figures with captions in the complete paper: https://tomesphere.com/paper/PMC11156394/full.md

---
Source: https://tomesphere.com/paper/PMC11156394