中国农业科技导报 ›› 2022, Vol. 24 ›› Issue (8): 99-108.DOI: 10.13304/j.nykjdb.2021.0536
刘海涛1(), 韩鑫1(
), 兰玉彬1,2, 伊丽丽1, 王宝聚1, 崔立华3
收稿日期:
2021-07-02
接受日期:
2021-09-22
出版日期:
2022-08-15
发布日期:
2022-08-22
通讯作者:
韩鑫
作者简介:
刘海涛 E-mail:1243051772@qq.com;
基金资助:
Haitao LIU1(), Xin HAN1(
), Yubin LAN1,2, Lili YI1, Baoju WANG1, Lihua CUI3
Received:
2021-07-02
Accepted:
2021-09-22
Online:
2022-08-15
Published:
2022-08-22
Contact:
Xin HAN
摘要:
为实现非接触、低成本、精准识别棉花顶芽,提出一种基于YOLOv4网络在复杂环境下对棉花顶芽进行精准识别的方法。利用K-means算法对棉花顶芽数据集进行聚类,优化先验框改善网络检测精度和速度,得到最优权值模型。对聚类前后模型以及与其他目标检测模型在棉花顶芽检测性能上进行了对比试验,并探究了顶芽在逆光和遮挡环境下,不同模型的检测性能。结果表明:该模型在测试集的平均检测精度(AP)、精确率(P)、召回率(R)、调和平均值(F1)比原模型分别提高0.36%、1.73%、0.52%、1.16%,单张图像平均检测时间缩短0.28 s;对比SSD、YOLOv3、Tiny-YOLOV4模型,该模型检测精确率和F1值最高,性能均衡;在自然场景处于逆光状态下,YOLOv4模型检测顶芽效果好于其他模型,且逆光环境对检测影响小;在遮挡条件下各个模型检测精度均有不同程度下降。
中图分类号:
刘海涛, 韩鑫, 兰玉彬, 伊丽丽, 王宝聚, 崔立华. 基于YOLOv4网络的棉花顶芽精准识别方法[J]. 中国农业科技导报, 2022, 24(8): 99-108.
Haitao LIU, Xin HAN, Yubin LAN, Lili YI, Baoju WANG, Lihua CUI. Precise Recognition Method of Cotton Top Buds Based on YOLOv4 Network[J]. Journal of Agricultural Science and Technology, 2022, 24(8): 99-108.
光照 Light | 植株状态 Plant status | 图像数量 Number of images |
---|---|---|
晴天 Sunny | 单株 Single plant | 1 538 |
多株 Multiple plants | 429 | |
遮挡 Shelter | 170 | |
阴天 Cloudy | 单株 Single plant | 318 |
多株 Multiple plants | 24 | |
遮挡 Shelter | 67 | |
雨天 Rainy | 单株 Single plant | 254 |
多株 Multiple plants | 25 | |
遮挡 Shelter | 75 | |
总计Total | 2 900 |
表1 不同条件下棉花顶芽数量统计
Table 1 Statistics of cotton top leaves under different conditions
光照 Light | 植株状态 Plant status | 图像数量 Number of images |
---|---|---|
晴天 Sunny | 单株 Single plant | 1 538 |
多株 Multiple plants | 429 | |
遮挡 Shelter | 170 | |
阴天 Cloudy | 单株 Single plant | 318 |
多株 Multiple plants | 24 | |
遮挡 Shelter | 67 | |
雨天 Rainy | 单株 Single plant | 254 |
多株 Multiple plants | 25 | |
遮挡 Shelter | 75 | |
总计Total | 2 900 |
模型Model | 精确率 Precision/% | 召回率 Recall/% | 调和平均值 F1/% | 平均精度 Average precision/% |
---|---|---|---|---|
1 | 87.82 | 99.30 | 93.21 | 98.86 |
2 | 92.52 | 99.43 | 95.85 | 99.23 |
3 | 92.14 | 99.36 | 95.61 | 99.16 |
4 | 94.21 | 99.62 | 96.84 | 99.40 |
5 | 92.15 | 99.55 | 95.71 | 99.38 |
6 | 90.17 | 99.36 | 94.54 | 99.15 |
7 | 91.75 | 99.24 | 95.35 | 99.05 |
8 | 90.92 | 99.62 | 95.07 | 99.44 |
9 | 92.73 | 99.17 | 95.84 | 98.90 |
表2 训练权重模型对比
Table 2 Comparison of training weight models
模型Model | 精确率 Precision/% | 召回率 Recall/% | 调和平均值 F1/% | 平均精度 Average precision/% |
---|---|---|---|---|
1 | 87.82 | 99.30 | 93.21 | 98.86 |
2 | 92.52 | 99.43 | 95.85 | 99.23 |
3 | 92.14 | 99.36 | 95.61 | 99.16 |
4 | 94.21 | 99.62 | 96.84 | 99.40 |
5 | 92.15 | 99.55 | 95.71 | 99.38 |
6 | 90.17 | 99.36 | 94.54 | 99.15 |
7 | 91.75 | 99.24 | 95.35 | 99.05 |
8 | 90.92 | 99.62 | 95.07 | 99.44 |
9 | 92.73 | 99.17 | 95.84 | 98.90 |
模型 Model | 精确率 Precision/% | 召回率 Recall/% | 调和平均值 F1/% | 平均精度 Average precision/% | 检测时间 Time/s |
---|---|---|---|---|---|
优化前 Before optimization | 92.48 | 99.10 | 95.68 | 99.04 | 0.93 |
优化后 After optimization | 94.21 | 99.62 | 96.84 | 99.40 | 0.65 |
表3 优化前后模型性能的指标对比
Table 3 Comparison of the performance indexes of the model before and after optimization
模型 Model | 精确率 Precision/% | 召回率 Recall/% | 调和平均值 F1/% | 平均精度 Average precision/% | 检测时间 Time/s |
---|---|---|---|---|---|
优化前 Before optimization | 92.48 | 99.10 | 95.68 | 99.04 | 0.93 |
优化后 After optimization | 94.21 | 99.62 | 96.84 | 99.40 | 0.65 |
模型 Model | 精确率 Precision/% | 召回率 Recall/% | 调和平均值 F1/% | 平均精度 Average precision/% | 检测时间 Time/s |
---|---|---|---|---|---|
YOLOv4 | 94.21 | 99.62 | 96.84 | 99.40 | 0.65 |
YOLOv3 | 93.73 | 99.23 | 96.40 | 99.17 | 0.84 |
Tiny-YOLOv4 | 72.56 | 99.70 | 83.99 | 99.48 | 0.53 |
SSD | 72.03 | 99.80 | 83.67 | 99.51 | 0.78 |
表4 四种模型识别棉花顶芽的结果
Table 4 Recognition results of four models for cotton top
模型 Model | 精确率 Precision/% | 召回率 Recall/% | 调和平均值 F1/% | 平均精度 Average precision/% | 检测时间 Time/s |
---|---|---|---|---|---|
YOLOv4 | 94.21 | 99.62 | 96.84 | 99.40 | 0.65 |
YOLOv3 | 93.73 | 99.23 | 96.40 | 99.17 | 0.84 |
Tiny-YOLOv4 | 72.56 | 99.70 | 83.99 | 99.48 | 0.53 |
SSD | 72.03 | 99.80 | 83.67 | 99.51 | 0.78 |
模型 Model | 逆光状态 Backlight environment | 遮挡状态 Shelter environment | ||||||
---|---|---|---|---|---|---|---|---|
精确率 Precision | 召回率 Recall | 调和平均值 F1 | 平均精度 Average precision | 精确率 Precision | 召回率 Recall | 调和平均值 F1 | 平均精度 Average precision | |
YOLOv3 | 92.82 | 99.48 | 96.03 | 99.41 | 92.31 | 99.31 | 95.68 | 98.93 |
YOLOv4 | 90.28 | 100.00 | 94.89 | 99.91 | 89.27 | 99.31 | 94.02 | 99.18 |
Tiny-YOLOv4 | 72.89 | 99.74 | 84.23 | 99.62 | 75.79 | 99.31 | 85.97 | 98.49 |
SSD | 68.30 | 100.00 | 81.16 | 99.92 | 79.67 | 100.00 | 88.68 | 99.22 |
表5 逆光与遮挡状态测试集不同模型检测结果 (%)
Table 5 Test results of backlight and occlusion state test sets by different models
模型 Model | 逆光状态 Backlight environment | 遮挡状态 Shelter environment | ||||||
---|---|---|---|---|---|---|---|---|
精确率 Precision | 召回率 Recall | 调和平均值 F1 | 平均精度 Average precision | 精确率 Precision | 召回率 Recall | 调和平均值 F1 | 平均精度 Average precision | |
YOLOv3 | 92.82 | 99.48 | 96.03 | 99.41 | 92.31 | 99.31 | 95.68 | 98.93 |
YOLOv4 | 90.28 | 100.00 | 94.89 | 99.91 | 89.27 | 99.31 | 94.02 | 99.18 |
Tiny-YOLOv4 | 72.89 | 99.74 | 84.23 | 99.62 | 75.79 | 99.31 | 85.97 | 98.49 |
SSD | 68.30 | 100.00 | 81.16 | 99.92 | 79.67 | 100.00 | 88.68 | 99.22 |
1 | 喻树迅.我国棉花生产现状与发展趋势[J].中国工程科学,2013,15(4):9-13. |
YU S X. Present situation and development trend of cotton production in China [J]. Strategic Study CAE, 2013,15(4):9-13. | |
2 | 卢秀茹,贾肖月,牛佳慧.中国棉花产业发展现状及展望[J].中国农业科学,2018,51(1):26-36. |
LU X R, JIA X Y, NIU J H. The present situation and prospects of cotton industry development in China [J]. Sci. Agric. Sin., 2018,51(1):26-36. | |
3 | KONG H, YI L, LAN Y, et al.. Exploring the operation mode of spraying cotton defoliation agent by plant protection UAV [J]. Int. J. Precision Agric. Aviation, 2018, 1(1):19-24. |
4 | HAN X, YU J, LAN Y, et al.. Determination of application parameters for cotton defoliants in the Yellow River Basin [J]. Int. J. Precision Agric. Aviation, 2019, 2(1): 51-55. |
5 | YANG H, HU X, ZHAO J, et al.. Feature extraction of cotton plant height based on DSM difference method [J]. Int. J. Precision Agric. Aviation, 2018, 1(1):59-69. |
6 | 牛巧鱼.我国棉花机械打顶研究进展[J].中国棉花,2013,40(11):23-24. |
NIU Q Y. Research progress of cotton topping machinery in China [J]. China Cott., 2013,40(11):23-24. | |
7 | 周桂鹏,张晓辉,范国强,等.棉花打顶机械化的研究现状及发展趋势[J].农机化研究,2014,36(4):242-245. |
ZHOU G P, ZHANG X H, FANG G Q, et al.. The research status and development trend on the cotton top-cutting mechanization [J]. J. Agric. Mechan. Res., 2014,36(4):242-245. | |
8 | 滕华灯,王春耀,蒋永新,等.两种棉花打顶机单体仿形机构的对比分析[J].西北农林科技大学学报(自然科学版),2011,39(3):163-167. |
TENG H D, WANG C Y, JIANG Y X, et al.. Contrast and analysis of the profile modeling mechanisms of two kinds of cotton topping monomers [J]. J. Northwest A&F Univ. (Nat. Sci. ), 2011,39(3):163-167. | |
9 | 姚强强,黄勇,陈永,等.单体仿形棉花打顶机的设计与试验[J].甘肃农业大学学报,2018,53(1):174-180, 186. |
YAO Q Q, HUANG Y, CHEN Y, et al.. Design and experimental of single profiling the cotton topping machine [J]. J. Gansu Agric. Univ., 2018,53(1):174-180, 186. | |
10 | 周海燕,尹素珍,朱立成,等.3WDZ-6型自走式棉花打顶机设计[J].农业机械学报,2010,41(S1):86-89. |
ZHOU H Y, YIN S Z, ZHU L C, et al.. Design of 3WDZ-6 self-propelled cotton top cutting [J]. Trans. Chin. Soc. Agric. Mach., 2010,41(S1):86-89. | |
11 | 彭强吉,荐世春,宋和平,等.3MDZJ-1型电力驱动式棉花智能精准打顶机的研制[J].农机化研究,2016,38(12):117-121. |
PENG Q J, JIAN S C, SONG H P, et al.. Development of 3MDZJ-1 type power driven intelligent precision cotton topping machine [J]. J. Agric. Mechan. Res., 2016,38(12):117-121. | |
12 | 宋欢,王维新,李霞,等.棉花打顶机械手的Fuzzy-PID控制[J].江苏农业科学,2017,45(3):172-175. |
13 | 郝延杰,石磊,曹龙龙,等.棉花顶芽识别定位技术研究现状及展望[J].中国农机化学报,2018,39(11):72-78. |
HAO Y J, SHI L, CAO L L, et al.. Research status and prospect of cotton terminal bud identification and location technology [J]. J. Chin. Agric. Mechan., 2018,39(11):72-78. | |
14 | 刘俊奇. 棉花株顶识别系统的研究[D].石河子:石河子大学,2009. |
LIU J Q. The research of automatic recognition of cotton’s top [D]. Shihezi: Shihezi University, 2009. | |
15 | 瞿端阳.基于机器视觉技术的棉株识别系统研究[D].石河子:石河子大学,2013. |
QU D Y. Cotton plant recognition system based on the machine vision technology [D]. Shihezi: Shihezi University, 2013. | |
16 | 沈晓晨. 棉花打顶机棉株高度识别技术的研究[D].石河子:石河子大学,2018. |
SHEN X C. The height of the cotton plant identification technology for cotton top-cutting machine [D]. Shihezi: Shihezi University, 2018. | |
17 | 刘洋,战荫伟.基于深度学习的小目标检测算法综述[J].计算机工程与应用,2021,57(2):37-48. |
LIU Y, ZHAN Y W. Survey of small object detection algorithms based on deep learning [J]. Comput. Eng. Appl., 2021,57(2):37-48. | |
18 | 方路平,何杭江,周国民.目标检测算法研究综述[J].计算机工程与应用,2018,54(13):11-18, 33. |
FANG L P, HE H J, ZHOU G M. Research overview of object detection methods [J]. Comput. Eng. Appl., 2018,54(13):11-18, 33. | |
19 | KRIZHEVSKY A, SUTSKEVER I, E.HINTON G. Image net classification with deep convolutional neural networks [J]. Adv. Neural Inform. Proc. Syst., 2012, 25(2)??. |
20 | BOCHKOVSKIY A, WANG C Y, LIAO H. YOLOv4: optimal speed and accuracy of object detection [J/OL]. 2020,10934 [2022-05-25]. . |
21 | 刘小刚,范诚,李加念,等.基于卷积神经网络的草莓识别方法[J].农业机械学报,2020,51(2):237-244. |
LIU X G, FANG C, LI J N, et al.. Identification method of strawberry based on convolutional neural network [J]. Trans. Chin. Soc. Agric. Machinery, 2020,51(2):237-244. | |
22 | 吕石磊, 卢思华, 李震,等. 基于改进YOLOv3-LITE轻量级神经网络的柑橘识别方法[J]. 农业工程学报, 2019, 35(17):205-214. |
LYU S L, LU S H, LI Z, et al.. Orange recognition method using improved YOLOv3-LIT lightweight neural network [J]. Trans. Chin. Soc. Agric. Eng., 2019, 35(17):205-214. | |
23 | 赵德安, 吴任迪, 刘晓洋,等. 基于YOLO深度卷积神经网络的复杂背景下机器人采摘苹果定位[J]. 农业工程学报, 2019, 35(3):172-181. |
ZHAO D A, WU R D, LIU X Y, et al.. Apple positioning based on YOLO deep convolutional neural network for picking robot in complex background [J]. Trans. Chin. Soc. Agric. Eng., 2019, 35(3):172-181. | |
24 | 武星,齐泽宇,王龙军,等.基于轻量化YOLOv3卷积神经网络的苹果检测方法[J].农业机械学报,2020,51(8):17-25. |
WU X, QI Z Y, WANG L J, et al.. Apple detection method based on light-YOLOv3 convolutional neural network [J]. Trans. Chin. Soc. Agric. Mach., 2020,51(8):17-25. | |
25 | 燕红文,刘振宇,崔清亮,等.基于特征金字塔注意力与深度卷积网络的多目标生猪检测[J].农业工程学报,2020,36(11):193-202. |
YAN H W, LIU Z Y, CUI Q L, et al.. Multi-target detection based on feature pyramid attention and deep convolution network for pigs [J]. Trans. Chin. Soc. Agric. Eng., 2020,36(11):193-202. | |
26 | HE K, ZHANG X, REN S, et al.. Spatial pyramid pooling in deep convolutional networks for visual recognition [J]. IEEE Trans. Pattern Anal. Mach. Int., 2015, 37(9):1904-1916. |
27 | LIU S, QI L, QIN H, et al.. Path aggregation network for instance segmentation [C]// Proceedings of 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). IEEE, 2018. |
28 | ZHENG Z, WANG P, LIU W, et al.. Distance-iou loss: faster and better learning for bounding box regression [C]// Proceedings of AAAI Conference on Artificial Intelligence. AAAI, 2020. |
29 | 李菊霞,李艳文,牛帆,等.基于YOLOv4的猪只饮食行为检测方法[J].农业机械学报,2021,52(3):251-256. |
LI J X, LI Y W, NIU F, et al.. Pig diet behavior detection method based on YOLOv4 [J]. Transact. Chin. Soc. Agric. Mach., 2021,52(3):251-256. | |
30 | REDMON J, FARHADI A. YOLO9000: better, faster, stronger[C]// Proceedings of IEEE Conference on Computer Vision & Pattern Recognition. IEEE, 2017:6517-6525. |
31 | REDMON J, DIVVALA S, GIRSHICK R, et al.. You only look once: unified, real-time object detection [J/OL]. 2016,02640[2022-05-25]. . |
[1] | 吴建伟, 黄杰, 熊晓菲, 高晗, 秦向阳. 基于AI的桃树病害智能识别方法研究与应用[J]. 中国农业科技导报, 2022, 24(5): 111-118. |
[2] | 高姻燕, 孙义, 李葆春. 基于无人机RGB影像估测田间小麦穗数[J]. 中国农业科技导报, 2022, 24(3): 103-110. |
[3] | 周惠汝, 吴波明. 深度学习在作物病害图像识别方面应用的研究进展[J]. 中国农业科技导报, 2021, 23(5): 61-68. |
[4] | 肖菲菲, 蒋蘋, 胡文武, 廖荣华, 张丹慧, 金生. 基于偏移补偿模型的极值点聚类苗带识别算法研究[J]. 中国农业科技导报, 2021, 23(5): 86-97. |
[5] | 吕纯阳, 刘升平, 郭秀明, 肖顺夫, 刘大众, 杨菲菲, 李路华. 基于SSD模型的巢门蜜蜂检测[J]. 中国农业科技导报, 2021, 23(5): 98-107. |
[6] | 许贝贝1,王文生1,2*,郭雷风1,陈桂鹏3. 基于非接触式的牛只身份识别研究进展与展望[J]. 中国农业科技导报, 2020, 22(7): 79-89. |
[7] | 刘哲,乌伟,张善文,崔倩倩,李瑞洋. 基于多元岭回归估计小麦种植密度[J]. 中国农业科技导报, 2020, 22(6): 72-80. |
[8] | 董伟1,钱蓉1,张洁2*,张立平1,陈红波2,张萌1,朱静波1,卜英乔3. 基于深度学习的蔬菜鳞翅目害虫自动识别与检测计数[J]. 中国农业科技导报, 2019, 21(12): 76-84. |
[9] | 夏雪1,周国民1*,丘耘1,李壮2,王健1,樊景超1,郭秀明1. 自然环境下苹果作业机器人双果重叠目标侦测方法[J]. 中国农业科技导报, 2018, 20(7): 63-73. |
[10] | 苏一峰§,杜克明§,李颖,孙忠富*,郑飞翔. 基于物联网平台的小麦病虫害诊断系统设计初探[J]. 中国农业科技导报, 2016, 18(2): 86-94. |
阅读次数 | ||||||
全文 |
|
|||||
摘要 |
|
|||||