中国农业科技导报 ›› 2025, Vol. 27 ›› Issue (5): 103-112.DOI: 10.13304/j.nykjdb.2023.0915
收稿日期:
2023-12-12
接受日期:
2024-03-22
出版日期:
2025-05-15
发布日期:
2025-05-20
通讯作者:
张吴平
作者简介:
袁嘉良E-mail:15605210287@163.com;
基金资助:
Jialiang YUAN(), Runnan LIAN, Wuping ZHANG(
)
Received:
2023-12-12
Accepted:
2024-03-22
Online:
2025-05-15
Published:
2025-05-20
Contact:
Wuping ZHANG
摘要:
针对大田环境下黄花菜花蕾识别背景复杂、个体过小及采摘后分级标准不统一的问题,提出了黄花菜花蕾的识别及采摘后分级方法。选取1 716幅不同光照、遮挡及模糊等复杂环境下的黄花菜花蕾图像建立数据库,在YOLOv5s模型的主干网络中引入Biformer自注意力机制对数据集进行训练,并与多种其他目标检测算法进行对比测试。在识别完成后,使用分级算法通过图像处理技术获取黄花菜花蕾的轮廓,并使用几何计算技术获得黄花菜花蕾的长度及直径,对其进行分级。结果显示,改进的YOLOv5s算法在黄花菜的大田识别中精确率、召回率、平均精确率(mAP)分别达到了94.80%、91.40%、96.60%,识别精确率显著提高,黄花菜分级算法准确率达到97.00%,满足生产实践中对黄花菜分级的要求,为黄花菜产业智能化提供可靠支持。
中图分类号:
袁嘉良, 连润楠, 张吴平. 黄花菜花蕾的精准识别与分级方法[J]. 中国农业科技导报, 2025, 27(5): 103-112.
Jialiang YUAN, Runnan LIAN, Wuping ZHANG. Accurate Identification and Grading Method for Daylily Flower Buds[J]. Journal of Agricultural Science and Technology, 2025, 27(5): 103-112.
模型 Model | P/% | R/% | mAP/% | 每秒传输帧数/(帧·s-1) Frames per second FPS/(frames·s-1) | 模型大小 Model size/Mb |
---|---|---|---|---|---|
YOLOv3 | 85.39 | 78.57 | 88.05 | 61.52 | 235 |
YOLOv4 | 87.67 | 79.20 | 88.00 | 63.40 | 244 |
YOLOv7 | 86.40 | 82.77 | 90.50 | 107.21 | 142 |
Faster-RCNN | 61.75 | 86.13 | 84.86 | 136.69 | 108 |
YOLOv5s | 84.63 | 81.54 | 89.00 | 118.49 | 13.7 |
YOLOv5m | 84.70 | 79.20 | 88.80 | 37.85 | 239 |
YOLOv5l | 85.40 | 85.30 | 91.90 | 26.89 | 88.5 |
YOLOv5x | 84.70 | 85.70 | 90.70 | 17.57 | 165 |
表1 不同网络模型对比
Table 1 Comparison of different networks model
模型 Model | P/% | R/% | mAP/% | 每秒传输帧数/(帧·s-1) Frames per second FPS/(frames·s-1) | 模型大小 Model size/Mb |
---|---|---|---|---|---|
YOLOv3 | 85.39 | 78.57 | 88.05 | 61.52 | 235 |
YOLOv4 | 87.67 | 79.20 | 88.00 | 63.40 | 244 |
YOLOv7 | 86.40 | 82.77 | 90.50 | 107.21 | 142 |
Faster-RCNN | 61.75 | 86.13 | 84.86 | 136.69 | 108 |
YOLOv5s | 84.63 | 81.54 | 89.00 | 118.49 | 13.7 |
YOLOv5m | 84.70 | 79.20 | 88.80 | 37.85 | 239 |
YOLOv5l | 85.40 | 85.30 | 91.90 | 26.89 | 88.5 |
YOLOv5x | 84.70 | 85.70 | 90.70 | 17.57 | 165 |
模型 Model | P/% | R/% | mAP/% | 检测速度/(帧·s-1) Detection speed/(frames·s-1) |
---|---|---|---|---|
YOLOv5s | 84.63 | 81.54 | 89.00 | 118.49 |
YOLOv5s_CA | 78.60 | 80.50 | 86.40 | 64.824 |
YOLOv5s_SA | 91.90 | 87.20 | 93.00 | 118.28 |
YOLOv5s_SimAM | 85.60 | 81.30 | 88.70 | 74.36 |
YOLOv5s_Biformer | 94.80 | 91.40 | 96.60 | 149.75 |
表2 不同网络模型对比
Table 2 Comparison of different networks model
模型 Model | P/% | R/% | mAP/% | 检测速度/(帧·s-1) Detection speed/(frames·s-1) |
---|---|---|---|---|
YOLOv5s | 84.63 | 81.54 | 89.00 | 118.49 |
YOLOv5s_CA | 78.60 | 80.50 | 86.40 | 64.824 |
YOLOv5s_SA | 91.90 | 87.20 | 93.00 | 118.28 |
YOLOv5s_SimAM | 85.60 | 81.30 | 88.70 | 74.36 |
YOLOv5s_Biformer | 94.80 | 91.40 | 96.60 | 149.75 |
模型 Model | 第2层 2nd layer | 第4层4th layer | 第6层 6th layer | P/% | R/% | mAP/% | 检测速度/ (帧·s-1)Detection speed/(Frames·s-1) | 模型大小 Model size/Mb |
---|---|---|---|---|---|---|---|---|
Yolov5s | × | × | × | 84.63 | 81.54 | 89.00 | 118.49 | 13.7 |
Yolov5s_Biformer_1 | × | × | √ | 81.90 | 84.60 | 89.90 | 177.89 | 13.6 |
Yolov5s_Biformer_2 | × | √ | √ | 86.80 | 81.60 | 88.70 | 151.47 | 14.1 |
Yolov5s_Biformer_3 | √ | √ | √ | 94.80 | 91.40 | 96.60 | 149.75 | 16.3 |
表3 增加Biformer在不同层中的模型对比
Table 3 Increasing the model contrast of the Biformer in the different layers
模型 Model | 第2层 2nd layer | 第4层4th layer | 第6层 6th layer | P/% | R/% | mAP/% | 检测速度/ (帧·s-1)Detection speed/(Frames·s-1) | 模型大小 Model size/Mb |
---|---|---|---|---|---|---|---|---|
Yolov5s | × | × | × | 84.63 | 81.54 | 89.00 | 118.49 | 13.7 |
Yolov5s_Biformer_1 | × | × | √ | 81.90 | 84.60 | 89.90 | 177.89 | 13.6 |
Yolov5s_Biformer_2 | × | √ | √ | 86.80 | 81.60 | 88.70 | 151.47 | 14.1 |
Yolov5s_Biformer_3 | √ | √ | √ | 94.80 | 91.40 | 96.60 | 149.75 | 16.3 |
样本编号 Sample No. | 长度Length/cm | 直径Diameter/cm | ||||
---|---|---|---|---|---|---|
人工Manual | 算法Algorithm | 误差Error | 人工Manual | 算法Algorithm | 误差Error | |
1 | 9.21 | 9.00 | 0.21 | 0.85 | 0.83 | 0.02 |
2 | 9.47 | 9.31 | 0.16 | 0.86 | 0.86 | 0.00 |
3 | 9.32 | 9.14 | 0.18 | 0.82 | 0.81 | 0.01 |
4 | 10.92 | 10.67 | 0.25 | 0.85 | 0.87 | -0.02 |
5 | 12.20 | 11.97 | 0.23 | 0.89 | 0.90 | -0.01 |
6 | 11.65 | 11.47 | 0.18 | 0.93 | 0.94 | -0.01 |
7 | 10.28 | 10.22 | 0.06 | 0.86 | 0.88 | -0.02 |
8 | 11.23 | 11.00 | 0.23 | 0.92 | 0.93 | -0.01 |
9 | 9.42 | 9.21 | 0.21 | 0.83 | 0.83 | 0.00 |
10 | 11.15 | 10.76 | 0.39 | 0.86 | 0.84 | 0.02 |
表4 人工与算法测量部分数据对比
Tab. 4 Comparison of manual and algorithm measurements
样本编号 Sample No. | 长度Length/cm | 直径Diameter/cm | ||||
---|---|---|---|---|---|---|
人工Manual | 算法Algorithm | 误差Error | 人工Manual | 算法Algorithm | 误差Error | |
1 | 9.21 | 9.00 | 0.21 | 0.85 | 0.83 | 0.02 |
2 | 9.47 | 9.31 | 0.16 | 0.86 | 0.86 | 0.00 |
3 | 9.32 | 9.14 | 0.18 | 0.82 | 0.81 | 0.01 |
4 | 10.92 | 10.67 | 0.25 | 0.85 | 0.87 | -0.02 |
5 | 12.20 | 11.97 | 0.23 | 0.89 | 0.90 | -0.01 |
6 | 11.65 | 11.47 | 0.18 | 0.93 | 0.94 | -0.01 |
7 | 10.28 | 10.22 | 0.06 | 0.86 | 0.88 | -0.02 |
8 | 11.23 | 11.00 | 0.23 | 0.92 | 0.93 | -0.01 |
9 | 9.42 | 9.21 | 0.21 | 0.83 | 0.83 | 0.00 |
10 | 11.15 | 10.76 | 0.39 | 0.86 | 0.84 | 0.02 |
1 | 刘佩冶,李可昕,张超凡,等.黄花菜生物活性成分及功能研究进展[J].食品与发酵工业,2022,48(12):330-336. |
LIU P Y, LI K X, ZHANG C F, et al.. Research progress on bioactive components and functions of daylily [J]. Food Ferment. Industries, 2022,48(12): 330-336. | |
2 | 武珍珍,洪沙沙,吕虹瑞,等.黄花菜保鲜贮藏及后处理加工技术研究进展[J].食品与发酵工业, 2023,49(22):334-340. |
WU Z Z, HONG S S, LYU H R, et al.. Research progress in fresh-keeping,storage and post-processing technology of daylily [J]. Food and Ferment. Industries, 2023,49(22):334-340. | |
3 | FU M, HE Z, ZHAO Y, et al.. Antioxidant properties and involved compounds of daylily flowers in relation to maturity [J]. Food Chem., 2009,114(4):1192-1197. |
4 | 王卓,王健,王枭雄,等.基于改进YOLO v4的自然环境苹果轻量级检测方法[J].农业机械学报,2022,53(8):294-302. |
WANG Z, WANG J, WANG X X, et al.. Lightweight real-time apple detection method based on improved YOLO v4 [J]. Trans. Chin. Soc. Agric. Mach., 2022, 53(8): 294-302. | |
5 | 卢伟,邹明萱,施浩楠,等.基于YOLO v5-TL的褐菇采摘视觉识别-测量-定位技术[J].农业机械学报,2022,53(11):341-348. |
LU W, ZOU M X, SHI H N, et al.. Technology of visual identification-measuring-location for brown mushroom picking based on YOLO v5-TL [J]. Trans. Chin. Soc. Agric. Mach., 2022, 53(11): 341-348. | |
6 | 靳红杰,马顾彧,唐梦圆,等.复杂环境下黄花菜识别的YOLOv7-MOCA模型[J].农业工程学报,2023,39(15):181-188. |
JIN H J, MA G Y, TANG M Y, et al.. Identifying daylily in complex environment using YOLOv7-MOCA model [J]. Trans. Chin. Soc. Agric. Eng., 2023,39(15): 181-188. | |
7 | 张立杰,周舒骅,李娜,等.基于改进SSD卷积神经网络的苹果定位与分级方法[J].农业机械学报,2023,54(6):223-232. |
ZHANG L J, ZHOU S H, LI N, et al.. Apple location and classification based on improved SSD convolutional neural network [J]. Trans. Chin. Soc. Agric. Mach., 2023, 54(6): 223-232. | |
8 | BHARGAVA A, BANSAL A. Classification and grading of multiple varieties of apple fruit [J]. Food Anal. Meth., 2021, 14(7): 1359-1368. |
9 | 杨其晟,李文宽,杨晓峰,等.改进YOLOv5的苹果花生长状态检测方法[J].计算机工程与应用, 2022,58(4):237-246. |
YANG Q S, LI W K, YANG X F, et al.. Improved YOLOv5 method for detecting growth status of apple flowers [J]. Comput. Eng. Appl., 2022,58(4):237-246. | |
10 | REDMON J, DIVVALA S, GIRSHIVK R, et al.. You only look once: unified, real-time object detection [EB/OL]. (2016-05-09) [2024-09-23]. . |
11 | FARHADI A, REDMON J.YOLOv3:Anincremental improvement [EB/OL]. (2018-04-08) [2024-09-23].. |
12 | ALBAHLI S, NIDA N, IRTAZA A, et al.. Melanoma lesion detection and segmentation using YOLOv4-DarkNet and active contour [J]. IEEE access, 2020,8:198403-198414. |
13 | YAN B, FAN P, LEI X, et al.. A real-time apple targets detection method for picking robot based on improved YOLOv5 [J/OL].Remote Sensing, 2021,13(9):1619 [2024-09-23]. . |
14 | WANG C Y, BOCHKOVSKIY A, LIAO H Y M. YOLOv7:Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors [EB/OL].(2022-07-06) [2024-09-23]. . |
15 | REN S, HE K, GIRSHICK R, et al.. Faster R-CNN: towards real-time object detection with region proposal networks [J]. IEEE Trans. Pattern Anal. Mach. Intell., 2017, 39(6): 1137-1149. |
16 | ZHANG Q L, YANG Y B. Sa-net:shuffle attention for deep convolutional neural networks [C]//Proceedings of ICASSP 2021-2021 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP). IEEE, 2021:2235-2239. |
17 | HOU Q B, ZHOU D Q, FENG J S. Coordinate attention for efficient mobile network design [C]// 2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). IEEE, 2021:13708-13717. |
18 | YANG L X, ZHANG R Y, LI L D, et al.. Simam: A simple, parameter-free attention module for convolutional neural networks [C]//Proceedings of International conference on machine learning. PMLR, 2021, 139:11863-11874. |
19 | VASWANI A, SHAZEER N, PARMAR N, et al.. Attention is all you need [EB/OL].(2017-06-19) [2024-09-23]. . |
20 | ZHU L, WANG X J, KE Z H, et al.. BiFormer: vision transformer with Bi-Level routing attention [EB/OL]. (2023-03-15) [2024-09-23].. |
21 | LAY Y M, STEAD A D, REID M S. Flower senescence in daylily (Hemerocallis) [J]. Physiol. Plant., 1992,86(2):308-314. |
22 | 中国团体标准,大同黄花干制品质量分级标准:T/DTHH 001—2021 [S].大同:大同市云州区黄花菜合作协会,2021. |
23 | JOCHER G, STOKEN A, CHAURASIA A, et al.. ultralytics/yolov5: v6. 0-YOLOv5n'Nano'models, Roboflow integration, TensorFlow export, OpenCV DNN support [J/OL]. Zenodo, 2021: 5563715[2024-09-23]. . |
24 | 王小荣,许燕,周建平,等.基于改进YOLOv7的复杂环境下红花采摘识别[J].农业工程学报,2023,39(6):169-176. |
WANG X R, XU Y, ZHOU J P, et al.. Safflower picking recognition in complex environments based on an improved YOLOv7 [J]. Trans. Chin. Soc. Agric. Eng., 2023, 39(6): 169-176. | |
25 | 龚惟新,杨珍,李凯,等.基于改进YOLOv5s的自然环境下猕猴桃花朵检测方法[J].农业工程学报,2023,39(6):177-185. |
GONG W X, YANG Z, LI K, et al.. Detecting kiwi flowers in natural environments using an improved YOLOv5s [J]. Trans. Chin. Soc. Agric. Eng., 2023, 39(6): 177-185. |
[1] | 陈自立, 林卫, 贺佳, 王来刚, 郑国清, 彭一龙, 焦家东, 郭燕. 基于卷积神经网络的农作物病害识别研究[J]. 中国农业科技导报, 2025, 27(4): 99-109. |
[2] | 陈林涛, 刘兆祥, 蓝莹, 牟向伟, 马旭, 王日俊. 基于高光谱技术与主成分分析的稻种品种识别研究[J]. 中国农业科技导报, 2025, 27(3): 104-111. |
[3] | 吴建伟, 张琳, 郑文刚, 秦向阳, 吴忠高, 方锡红, 王永泉, 芦天罡, 王健, 朴香淑, 王芳, 岳巧云, 张海合, 季婧, 丛小蔓, 李奇峰. 智慧果园关键应用场景研究进展[J]. 中国农业科技导报, 2025, 27(3): 12-23. |
[4] | 郑舒元, 刀剑, 张学林, 刘珊珊, 王建雄. 基于可见光波段的绿色植被提取方法研究[J]. 中国农业科技导报, 2025, 27(1): 107-117. |
[5] | 田祥州, 贺福强, 陈发江, 詹璐歆. 基于休止角标定不同含水率木粉离散元参数[J]. 中国农业科技导报, 2025, 27(1): 118-128. |
[6] | 张彦, 王来刚, 贺佳, 郭燕, 杨秀忠, 张红利, 刘婷. 基于多源遥感数据的茶叶种植面积时空变化研究[J]. 中国农业科技导报, 2024, 26(12): 107-114. |
[7] | 黄诗锐, 王天一, 文韬, 周江龙. 基于改进YOLOv7的农作物虫害识别[J]. 中国农业科技导报, 2024, 26(11): 107-116. |
[8] | 唐天君, 陈洋, 胡军, 江浩田. 基于无人机影像数据的烟草精准识别方法研究[J]. 中国农业科技导报, 2024, 26(10): 145-157. |
[9] | 彭明康, 崔钰, 薛淇元, 殷允振, 尹哲, 张吴平, 李富忠. 基于天气数据增强和微调的苗期作物杂草识别定位模型[J]. 中国农业科技导报, 2024, 26(10): 125-134. |
[10] | 朱芷芫, 王海峰, 李斌, 赵文文, 朱君, 贾楠, 赵宇亮. 深度学习在畜禽典型行为识别中的研究进展[J]. 中国农业科技导报, 2024, 26(10): 110-124. |
[11] | 方松, 姜丽华, 曹景军, 王骁, 邱明慧, 田枭艺. AI for Science在农业领域的应用研究[J]. 中国农业科技导报, 2024, 26(10): 1-10. |
[12] | 胡国玉, 董娅兰, 古丽巴哈尔·托乎提, 刘广, 周建平. 基于机器视觉的葡萄藤结构分割方法研究[J]. 中国农业科技导报, 2024, 26(9): 105-111. |
[13] | 熊晓菲, 王秀琴, 庄翠珍, 郭家贤, 谢新锐, 吴建伟, 李奇峰. 基于ROI融合特征的柑橘炭疽病诊断方法[J]. 中国农业科技导报, 2024, 26(9): 83-92. |
[14] | 金慧萍, 牟海雯, 刘腾, 于佳琳, 金小俊. 基于深度卷积神经网络的青菜和杂草识别[J]. 中国农业科技导报, 2024, 26(8): 122-130. |
[15] | 刘徐冬雨, 郭潇潇, 付晨青, 韩蕊, 李国辉, 王秀萍. 基于RGB和CIELab预测紫苏叶片花青素含量[J]. 中国农业科技导报, 2024, 26(7): 103-110. |
阅读次数 | ||||||
全文 |
|
|||||
摘要 |
|
|||||