摘要
[目的]面对大规模的苹果园种植和管理,传统的果园巡检容易出现误检、少检的现象,并且传统的苹果病害检测模型参数量庞大难以实现移动端的轻量化部署,因此,设计一个高效并且轻量的苹果病害检测模型可以实现对苹果病害的有效预防与精准管理,从而改善苹果品质与增加果园经济收入。[方法]针对以上需要,提出了一种基于YOLOv5s的改进算法。以常见的炭疽病和褐斑病为主要研究对象,采集苹果表皮病害图像构建果园苹果病害数据集,通过Labelimg工具对图像进行标注与分类;引入GhostNet轻量化模块对主干特征提取网络进行替换,使用更小的参数量来捕获更多的特征信息,达到模型轻量化的效果,便于后期移动端的部署;引入SimAM无参注意力机制加强模型对通道和空间信息的同时关注,在不添加任何参数量的基础上对重要的病害特征赋予更高的优先级,提高模型的准确性;引入SIoU边界框回归损失函数来优化预测框对于目标病害的准确定位,通过重新定义角度惩罚度量帮助预测框快速定位到准确的轴,同时借助遗传算法优化θ的取值,实现提升模型训练和推理能力的效果。[结果]改进后的模型参数量和浮点运算数(FLOPs)比原始模型减少了30.2%和33.8%,在达到轻量化的基础上,mAP@0.5达到93.7%,mAP@0.5:0.95达到63.3%,分别优于YOLOv5s原始算法1.6%和0.7%。[结论]改进后的模型在实现轻量化的同时也达到了较好的检测性能,不仅实现了苹果病害的高效识别,也为其他农作物的病害检测提供了技术支持与参考依据。
[Objective]In the context of large-scale apple orchard planting and management,traditional orchard inspections are prone to false detections and omissions.Additionally,traditional apple disease detection models have a large number of parameters,making it different to deploy them on mobile devices.Therefore,designing an efficient and lightweight apple disease detection model can enable effective prevention and precise management of apple diseases,thereby improving apple quality and increasing orchard economic income.[Methods]To address these needs,an improved algorithm based on YOLOv5s is proposed.The common diseases anthracnose and brown spot are the primary research subjects.Apple skin disease images were collected to construct an orchard apple disease dataset,and images were annotated and classified using the Labelimg tool.The GhostNet lightweight module was introduced to replace the main feature extraction network,capturing more feature information with fewer parameters to achieve a lightweight model suitable for mobile deployment.The SimAM parameter-free attention mechanism was introduced to strengthen the model's simultaneous focus on channel and spatial information,assigning higher priority to important disease features without adding any parameters,thus improving model accuracy.The SIoU boundary box regression loss function was introduced to optimize the accurate localization of the predicted box to the target diseases,quickly locating the accurate axis by redefining the angle penalty metric and using a genetic algorithm to optimize the value ofθ,thereby enhancing model training and inference capabilities.[Results]The improved model’s parameters and floating-point operations(FLOPs)were reduced by 30.2%and 33.8%,respectively,compared to the original model.On the basis of achieving lightweight performance,the mAP@0.5 reached 93.7%,and the mAP@0.5:0.95 reached 63.3%,which were 1.6%and 0.7%better than the original YOLOv5s algorithm,respectively.[Conclusion]The improved model achieves good detection performance while maintaining a lightweight design,efficiently identifying apple diseases and providing technical support and reference for the detection of diseases in other crops.
作者
王帅
王利众
朱丽平
孙媛
Wang Shuai;Wang Lizhong;Zhu Liping;Sun Yuan(College of Information Engineering,Minzu University of China,Beijing 100081,China)
出处
《山西农业大学学报(自然科学版)》
CAS
北大核心
2024年第4期118-129,共12页
Journal of Shanxi Agricultural University(Natural Science Edition)
基金
国家自然科学基金(61972436)
中央民族大学研究生精品示范课程(GRSCP202316)。
关键词
苹果病害
目标检测
模型轻量化
注意力机制
智慧农业
Apple diseases
Object detection
Model lightweighting
Attention mechanism
Smart agriculture