Mechanical and Electrical Engineering Department, Qingdao University of Technology, Linyi, Shandong, China.
Management Engineering Department, Qingdao University of Technology, Linyi, Shandong, China.
PLoS One. 2024 Jun 6;19(6):e0304284. doi: 10.1371/journal.pone.0304284. eCollection 2024.
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.
农业病虫害对农业生产力造成重大损失,导致重大经济损失和食品安全风险。然而,由于农业病虫害标记数据的稀缺性以及形态各异的病虫害种类繁多,准确识别和控制这些病虫害仍然具有很大的挑战性。为此,我们提出了一种结合 Cascade RCNN 和 Swin Transformer 模型的两阶段目标检测方法。为了解决标记数据稀缺的问题,我们采用随机裁剪和粘贴以及传统的在线增强技术来扩展病虫害数据集,并使用 Swin Transformer 进行基本特征提取。随后,我们设计了 SCF-FPN 模块来增强基本特征,以提取更丰富的病虫害特征。具体来说,SCF 组件提供了一个具有灵活滑动窗口的自注意力机制,能够根据不同的病虫害特征进行自适应特征提取。同时,特征金字塔网络(FPN)丰富了多个层次的特征,并增强了整个网络的判别能力。最后,为了进一步提高我们的检测结果,我们将非极大值抑制(Soft NMS)和 Cascade R-CNN 的级联结构纳入优化过程中,以确保更准确和可靠的预测结果。在一个涉及 28 种病虫害的检测任务中,我们的算法在精度、召回率和平均精度(mAP)方面分别达到了 92.5%、91.8%和 93.7%,与原始基线模型相比,分别提高了 12.1%、5.4%和 7.6%。结果表明,我们的方法可以准确地识别和定位农田病虫害,这有助于改善农田的生态环境。