English

Journal of Chinese Agricultural Mechanization

Journal of Chinese Agricultural Mechanization ›› 2025, Vol. 46 ›› Issue (5): 162-168.DOI: 10.13733/j.jcam.issn.2095-5553.2025.05.022

• Facilities Agriculture and Plant Protection Machinery Engineering • Previous Articles     Next Articles

etection method of diseases and pests in highland barley based on improved YOLOv5s 

Chen Jiahao1, 2, Wang Yuzhe2, 3, Duan Xiaodong1, 2, Liang Kaihua1, 2   

  1. 1.  College of Computer Science and Engineering, Dalian Minzu University, Dalian, 116000, China;
    2. SEAC Key Laboratory of Big Data Applied Technology, Dalian Minzu University, Dalian, 116000, China;
    3. College of Mechanical and Electronic Engineering, Dalian Minzu University, Dalian, 116000, China
  • Online:2025-05-15 Published:2025-05-14

基于改进YOLOv5s的青稞病虫害检测方法

陈佳豪1, 2,汪语哲2, 3,段晓东1, 2,梁凯华1, 2   

  1. 1. 大连民族大学计算机科学与工程学院,大连市,116000; 2. 大连民族大学大数据应用技术
    国家民委重点实验室,大连市,116000; 3. 大连民族大学机电工程学院,大连市,116000
  • 基金资助:
    大连民族大学—西藏农牧学院联合基金项目(DLMZ—NMXY 2021004)

Abstract: Aiming at the problems of different scales of targets in barley pest detection, overlapping occlusion and poor realtime performance which are difficult to deploy on edge computing devices, an improved method of lightweight YOLOv5s that can utilize multiscale information is proposed. Firstly, the backbone network of YOLOv5s is replaced with EfficientViT, which reduces the computation and number of parameters of the model by introducing a cascaded selfattentive mechanism in the backbone network, while increasing the feature extraction capability. Secondly, to improve the models extraction of multiscale features, the method introduces an SCP module with an attention mechanism after the head of the model, which helps the model to better extract features at different scales by aggregating contextual information on the space, and improves the models recognition accuracy of pests and diseases at different scales while controlling the amount of parameters to be increased within 10%. Then, the models ability to extract features is further enhanced by replacing all of C3 in the HEAD section by using C2f. Finally, a weighted intersection and ratio nonmaximum suppression algorithm (WIoU) with a dynamic focusing mechanism is introduced as a loss function as a way to balance positive and negative samples. The results show that compared to the original YOLOv5s, the improved model reduces the number of parameters by 60% and the computation by 32%, achieving an average precision of 88.7%, which is an increase of 2.3% in average precision. The improved multiscale lightweight model, when compared to mainstream object detection algorithms such as Fast R—CNN, SSD, and the YOLO series, not only enhances detection accuracy but also reduces model complexity.

Key words: diseases and pests of highland barley, target detection, EfficientViT, multiscale feature fusion, lightweight

摘要: 青稞病虫害检测过程中,目标具有不同尺度、重叠遮挡、模型复杂度高以及实时性差,难以在边缘计算设备上部署等问题,基于此,提出一种多尺度轻量化YOLOv5s的改进方法。首先,使用EfficientViT替换YOLOv5s中的主干网络,通过在主干网络中引入级联的自注意力机制,减少模型复杂程度,同时增加特征提取能力。其次,该方法在模型中引入具有注意力机制的SCP模块,通过聚合空间上的上下文信息,帮助模型更好地提取不同尺度下的特征,在控制参数量提高10%以内的情况下,提高模型对不同尺度病虫害的识别精度。然后,使用C2f替换head部分全部的C3层,进一步提升模型对特征的提取能力。最后,引入具有动态聚焦机制的加权交并比非极大值抑制算法(WIoU)作为损失函数,以此来平衡正负样本。结果表明,相比原始YOLOv5s,改进后的模型参数量减少60%;计算量减少32%,平均精度达到88.7%,平均精度提高2.3%;与主流目标检测算法,如Fast R—CNN、SSD,YOLO系列等模型相比,改进后的融合多尺度的轻量化模型在提升检测精度的同时,降低模型的复杂程度。

关键词: 青稞病虫害, 目标检测, EfficientViT, 多尺度特征融合, 轻量化

CLC Number: