期刊目次

加入编委

期刊订阅

添加您的邮件地址以接收即将发行期刊数据:

Open Access Article

Journal of Electrical Engineering and Automation. 2025; 4: (6) ; 10-18 ; DOI: 10.12208/j.jeea.20250200.

Tomato leaf disease detection algorithm based on Yolov5s
基于改进YOLOv5s的番茄叶片病害检测算法

作者: 秦绪彬 *, 施泽栋, 刘家华

南京邮电大学通达学院电气工程学院 江苏扬州

*通讯作者: 秦绪彬,单位:南京邮电大学通达学院电气工程学院 江苏扬州;

发布时间: 2025-11-11 总浏览量: 19

摘要

针对环境因素复杂和病害种类多样等对番茄叶片病害检测的影响,提出一种基于YOLOv5s的番茄叶片病害检测算法。首先,对多种病害图像进行预处理,增强数据集的丰富性。为提升模型的图像分类能力,引入注意力机制;将YOLOv8的C2f模块替换C3模块,以获得更为丰富的梯度流信息;替换损失函数SIoU以加快收敛速度,改善推理效果;通过CARAFE代替原有最近邻插值法,以获取更丰富的特征图信息。改进后的算法在验证中mAP0.5为 93.3%,比YOLOv5s、YOLOv8等主流模型有较大提高。提出的番茄叶片病害检测方法,在保证检测速度的同时,可实现复杂场景下对叶片病害的准确识别,满足识别精准率的要求,为番茄叶片病害防治提供理论支持。

关键词: YOLOv5;CARAFE;注意力机制;番茄叶片病害;SIoU

Abstract

A modified algorithm based on YOLOv5s is proposed for tomato leaf disease detection under interference from complex environmental factors and diverse types of diseases. Firstly, multiple disease images are preprocessed to enhance the richness of the dataset. In order to enhance the image classification ability of the model, the attention mechanism is introduced in the backbone network; the C2f module of YOLOv8 replaces the original C3 module to obtain richer gradient flow information; the loss function SIoU is replaced to accelerate the convergence speed and improve the inference effect; CARAFE (Content Aware ReAssembly of FEatures) is utilized instead of the original nearest-neighbor interpolation method to expand the improved model's receptive field, obtaining more feature map information effectively, thereby enhancing detection capabilities while ensuring lightweight design. In experiments, the improved algorithm achieves a mAP0.5of 93.3% in test validation, outperforming the main models, such as the original YOLOv5s, YOLOv8, et al. The proposed tomato leaf disease detection method maintains good detection speed and high accuracy in complex real-world scenarios. This improved algorithm meets the requirements for precision recognition, providing theoretical support for the prevention and control of tomato leaf diseases.

Key words: YOLOv5; CARAFE; Attention mechanism; Tomato leaf diseases; SIoU

参考文献 References

[1] 张淑玲.番茄病虫害防治技术研究[J].乡村科技, 2017 (09):61-62.

[2] 于伟红.番茄常见病虫害综合防治技术[J].农民致富之友, 2018(07):147.

[3] 代国威, 樊景超, 胡林. 采用天气增强与八度卷积改进YOLOv5的番茄检测模型构建[J].山东农业科学, 2022, 54(11):138-149.

[4] 余贤海, 孔德义, 谢晓轩, 等. 基于深度学习的番茄授粉机器人目标识别与检测[J].农业工程学报, 2022, 38(24): 129-137.

[5] 范若菲, 李时东, 李时元. 基于改进YOLOv5的日本落叶松虫害检测技术[J].林业工程学报, 2023, 8(3):165-172. 

[6] 左昊轩, 黄祺成, 杨佳昊, 等. 基于改进YOLOv5s的番茄黄化曲叶病检测方法[J/OL].农业机械学报, 2023, 1-11.

[7] 李晓振, 徐岩, 吴作宏 等.基于注意力神经网络的番茄叶部病害识别系统[J].江苏农业学报,2020, 36(03):561-568.

[8] Redmon J, Divvala S, Girshick R, et al. You Only Look Once: Unified, Real-Time Object Detection[C]//2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR). Las Vegas, NV, USA. IEEE, 2016:779-788.

[9] 赵文博, 周德强, 邓干然, 等. 基于改进YOLOv5的甘蔗茎节识别方法[J].华中农业大学学报, 2023, 42(01): 268-276.

[10] Hu J, Shen L and Sun G. Squeeze-and-Excitation Networks[C]//2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition. Salt Lake City, UT, USA. 2018: 7132-7141.

[11] Hou Q, Zhou D and Feng J. Coordinate Attention for Efficient Mobile Network Design[J]. 2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Nashville, 2021: 13708-13717.

[12] Ouyang D, He S, Zhang G Z, et al. Efficient Multi-Scale Attention Module with Cross-Spatial Learning[C]// ICASSP 2023 - 2023 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP). Rhodes Island, Greece. 2023: 1-5.

[13] Redmon J, Farhadi A. YOLOv3:An Incremental Improvement[J]. arXiv e-prints, 2018.

[14] Wang C Y, Bochkovskiy A and Liao H Y M. YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors[C]//2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). Vancouver, BC, Canada. 2023: 7464-7475.

[15] Yu J, Jiang Y, Wang Z, et al. UnitBox: An Advanced Object Detection Network[J].ACM, 2016: 516–520. 

[16] Rezatofighi H, Tsoi N, Gwak J, et al. Generalized Intersection Over Union: A Metric and a Loss for Bounding Box Regression[C]//2019 IEEE/CVF Conference on Computer Vision andPattern Recognition (CVPR). Long Beach, CA, USA. 2019: 658-666.

[17] Zheng Z, Wang P, Liu W, et al. Distance-IoU Loss: Faster and Better Learning for Bounding Box Regression[C]// AAAI Conference on Artificial Intelligence (2019), 2019.

[18] Gevorgyan Z. “SIoU Loss: More Powerful Learning for Bounding Box Regression.” ArXiv abs/2205.12740 (2022): n. pag.

[19] Wang J, Chen K, Xu R, et al. CARAFE: Content-Aware ReAssembly of FEatures[C]//2019 IEEE/CVF Interna-tional Conference on Computer Vision (ICCV). Seoul, Korea (South). 2019: 3007-3016.

[20] 杨蜀秦, 王帅, 王鹏飞, 等. 改进YOLOX检测单位面积麦穗[J].农业工程学报, 2022, 38(15):143-149.

[21] Woo S, Park J, Lee J Y, et al. CBAM: Convolutional Block Attention Module[C]//Proceedings of the European Conference on Computer Vision (ECCV), 2018: 3-19.

[22] Zhang Y F, Zhang Z, Jia Z, Wang L, et al. Focal and efficient IOU loss for accurate bounding box regression[J]. Neurocomputing, 2022, 5(6):146-157.

[23] 童蕴慧, 徐敬友, 袁素玲. 番茄早疫病菌培养滤液的毒性及不同品种对滤液的敏感性[J]. 江苏农业学报, 1997 (04): 60-61.

引用本文

秦绪彬, 施泽栋, 刘家华, 基于改进YOLOv5s的番茄叶片病害检测算法[J]. 电气工程与自动化, 2025; 4: (6) : 10-18.