
改进YOLOv4的温室环境下草莓生育期识别方法
Strawberry Growth Period Recognition Method Under Greenhouse Environment Based on Improved YOLOv4
针对目前设施农业数字化栽培调控技术中对作物的生育期实时检测与分类问题,提出一种改进YOLOv4的温室环境下草莓生育期识别方法。该方法将注意力机制引入到YOLOv4主干网络的跨阶段局部残差模块(Cross Stage Partial Residual,CSPRes)中,融合草莓不同生长时期的目标特征信息,同时降低复杂背景的干扰,提高模型检测精度的同时保证实时检测效率。以云南地区的智能设施草莓为试验对象,结果表明,本研究提出的YOLOv4-CBAM(YOLOv4-Convolutional Block Attention Module)模型对开花期、果实膨大期、绿果期和成熟期草莓的检测平均精度(Average Precision,AP)分别为92.38%、82.45%、68.01%和92.31%,平均精度均值(Mean Average Precision,mAP)为83.79%,平均交并比(Mean Inetersection over Union,mIoU)为77.88%,检测单张图像时间为26.13 ms。YOLOv4-CBAM模型检测草莓生育期的mAP相比YOLOv4、YOLOv4-SE、YOLOv4-SC模型分别提高8.7%、4.82%和1.63%。该方法可对草莓各生育期目标进行精准识别和分类,并为设施草莓栽培的信息化、规模化调控提供有效的理论依据。
Aiming at the real-time detection and classification of the growth period of crops in the current digital cultivation and regulation technology of facility agriculture, an improved YOLOv4 method for identifying the growth period of strawberries in a greenhouse environment was proposed. The attention mechanism into the Cross Stage Partial Residual (CSPRes) module of the YOLOv4 backbone network was introduced, and the target feature information of different growth periods of strawberries while reducing the interference of complex backgrounds was integrated, the detection accuracy while ensured real-time detection efficiency was improved. Took the smart facility strawberry in Yunnan province as the test object, the results showed that the detection accuracy (AP) of the YOLOv4-CBAM model during flowering, fruit expansion, green and mature period were 92.38%, 82.45%, 68.01% and 92.31%, respectively, the mean average precision (mAP) was 83.78%, the mean inetersection over union (mIoU) was 77.88%, and the detection time for a single image was 26.13 ms. Compared with the YOLOv4-SC model, mAP and mIoU were increased by 1.62% and 2.73%, respectively. Compared with the YOLOv4-SE model, mAP and mIOU increased by 4.81% and 3.46%, respectively. Compared with the YOLOv4 model, mAP and mIOU increased by 8.69% and 5.53%, respectively. As the attention mechanism was added to the improved YOLOv4 model, the amount of parameters increased, but the detection time of improved YOLOv4 models only slightly increased. At the same time, the number of fruit expansion period recognized by YOLOv4 was less than that of YOLOv4-CBAM, YOLOv4-SC and YOLOv4-SE, because the color characteristics of fruit expansion period were similar to those of leaf background, which made YOLOv4 recognition susceptible to leaf background interference, and added attention mechanism could reduce background information interference. YOLOv4-CBAM had higher confidence and number of identifications in identifying strawberry growth stages than YOLOv4-SC, YOLOv4-SE and YOLOv4 models, indicated that YOLOv4-CBAM model can extract more comprehensive and rich features and focus more on identifying targets, thereby improved detection accuracy. YOLOv4-CBAM model can meet the demand for real-time detection of strawberry growth period status.
目标检测 / 草莓 / 生育期识别 / YOLOv4 / 残差模块 / 注意力机制 / 损失函数 {{custom_keyword}} /
object detection / strawberry / growth period recognition / YOLOv4 / residual module / attention mechanism / loss function {{custom_keyword}} /
表1 不同检测模型在草莓生育期测试集上的性能测试结果Table 1 Performance testing results of different detection models on the strawberry growth period test set |
模型 | 参数增量 | 不同生长时期草莓检测精度AP/% | mAP/% | mIoU/% | 平均检测时间/ms | |||
---|---|---|---|---|---|---|---|---|
开花期 | 果实膨大期 | 绿果期 | 成熟期 | |||||
YOLOv4 | 0 | 77.96 | 77.10 | 54.77 | 90.53 | 75.09 | 72.35 | 25.00 |
YOLOv4-SE | 856,576 | 86.29 | 79.17 | 59.41 | 91.01 | 78.97 | 74.42 | 25.45 |
YOLOv4-SC | 856,990 | 90.34 | 81.06 | 65.25 | 91.98 | 82.16 | 75.15 | 25.87 |
YOLOv4-CBAM | 856,990 | 92.38 | 82.45 | 68.01 | 92.31 | 83.79 | 77.88 | 26.13 |
表2 不同模型识别不同生长时期草莓的置信度和个数结果Table 2 Different models recognize the confidence and number of strawberries in different growth periods |
模型 | 样例1 | 样例2 | ||||
---|---|---|---|---|---|---|
生长期 | 置信度 | 数量/个 | 生长期 | 置信度 | 数量/个 | |
YOLOv4 | 开花期 | 0.98、0.98、0.92、0.91、0.86、0.81、0.75、0.64 | 8 | 开花期 | 0.88 | 1 |
果实膨大期 | 0.87、0.71 | 2 | ||||
果实膨大期 | 0.96、0.84、0.84、0.80、0.79、0.76、0.73、0.69、0.63、0.55 | 10 | 绿果期 | 0.93、0.91、0.85、0.72、0.69、 0.59、0.55、0.52 | 8* | |
成熟期 | 0.99、0.99、0.99、0.98、0.95、 0.94、0.90、0.85 | 9 | ||||
YOLOv4-SE | 开花期 | 1.00、0.99、0.95、0.92、0.90、0.87、0.86、0.73、0.53、0.50 | 10 | 开花期 | 0.89 | 1 |
果实膨大期 | 0.84、0.79、0.54 | 3 | ||||
果实膨大期 | 0.92、0.89、0.84、0.83、0.80、0.80、0.79、0.74、0.68、0.64、0.59 | 11 | 绿果期 | 0.96、0.94、0.87、0.87、0.84、 0.81、0.56 | 7 | |
成熟期 | 0.99、0.99、0.99、0.98、0.98、 0.98、0.91、0.85 | 8 | ||||
YOLOv4-SC | 开花期 | 1.00、0.98、0.96、0.95、0.91、0.91、0.79、0.76、0.58、0.54 | 10 | 开花期 | 0.88 | 1 |
果实膨大期 | 0.97、0.92、0.89、0.65 | 4 | ||||
果实膨大期 | 0.96、0.96、0.96、0.88、0.85、0.84、0.79、0.66、0.65、0.64、0.57 | 11 | 绿果期 | 0.97、0.97、0.95、0.95、0.91、 0.90、0.86 | 7 | |
成熟期 | 1.00、0.99、0.99、0.99、0.97、 0.96、0.92、0.81、0.76、0.72 | 10 | ||||
YOLOv4-CBAM | 开花期 | 1.00、1.00、0.96、0.96、0.95、0.87、0.81、0.79、0.76、0.61 | 10 | 开花期 | 0.93 | 1 |
果实膨大期 | 0.98、0.95、0.81、0.65 | 4 | ||||
果实膨大期 | 0.97、0.95、0.94、0.85、0.83、0.82、0.80、0.72、0.71、0.71、0.61 | 11 | 绿果期 | 0.99、0.98、0.98、0.97、0.94、 0.88、0.87 | 7 | |
成熟期 | 0.99、0.99、0.99、0.98、0.98、 0.98、0.93、0.81、0.80、0.74 | 10 |
1 |
张更, 颜志明, 王全智, 等. 我国设施草莓无土栽培技术的研究进展与发展建议[J]. 江苏农业科学, 2019, 47(18): 58-61.
{{custom_citation.content}}
{{custom_citation.annotation}}
|
2 |
林森, 郭文忠, 郑建锋, 等. 基于知识图谱和机器视觉的智慧草莓生产托管服务系统实践[J]. 农业工程技术, 2021, 41(4): 17-20.
{{custom_citation.content}}
{{custom_citation.annotation}}
|
3 |
徐建鹏, 王杰, 徐祥, 等. 基于 RAdam 卷积神经网络的水稻生育期图像识别[J]. 农业工程学报, 2021, 37(8): 143-150.
{{custom_citation.content}}
{{custom_citation.annotation}}
|
4 |
{{custom_citation.content}}
{{custom_citation.annotation}}
|
5 |
{{custom_citation.content}}
{{custom_citation.annotation}}
|
6 |
刘芳, 刘玉坤, 林森, 等. 基于改进型YOLO的复杂环境下番茄果实快速识别方法[J]. 农业机械学报, 2020, 51(6): 229-237.
{{custom_citation.content}}
{{custom_citation.annotation}}
|
7 |
{{custom_citation.content}}
{{custom_citation.annotation}}
|
8 |
{{custom_citation.content}}
{{custom_citation.annotation}}
|
9 |
李志军, 杨圣慧, 史德帅, 等. 基于轻量化改进YOLOv5的苹果树产量测定方法[J]. 智慧农业, 2021, 3(2): 100-114.
{{custom_citation.content}}
{{custom_citation.annotation}}
|
10 |
刘小刚, 范诚, 李加念, 等. 基于卷积神经网络的草莓识别方法[J]. 农业机械学报, 2020, 51(2): 237-244.
{{custom_citation.content}}
{{custom_citation.annotation}}
|
11 |
赵春江, 文朝武, 林森, 等. 基于级联卷积神经网络的番茄花期识别检测方法[J]. 农业工程学报, 2020, 36(24): 143-152.
{{custom_citation.content}}
{{custom_citation.annotation}}
|
12 |
刘天真, 滕桂法, 苑迎春, 等. 基于改进YOLOv3的自然场景下冬枣果实识别方法[J]. 农业机械学报, 2021, 52(5): 17-25.
{{custom_citation.content}}
{{custom_citation.annotation}}
|
13 |
刘立波, 程晓龙, 赖军臣. 基于改进全卷积网络的棉田冠层图像分割方法[J]. 农业工程学报, 2018, 34(12): 193-201.
{{custom_citation.content}}
{{custom_citation.annotation}}
|
14 |
朱逢乐, 郑增威. 基于图像和卷积神经网络的蝴蝶兰种苗生长势评估[J]. 农业工程学报, 2020, 36(9): 185-194.
{{custom_citation.content}}
{{custom_citation.annotation}}
|
15 |
3[ cs.Lg]. 2021.
{{custom_citation.content}}
{{custom_citation.annotation}}
|
16 |
徐诚极, 王晓峰, 杨亚东. Attention-YOLO: 引入注意力机制的YOLO检测算法[J]. 计算机工程与应用, 2019, 55(6): 13-23.
{{custom_citation.content}}
{{custom_citation.annotation}}
|
17 |
{{custom_citation.content}}
{{custom_citation.annotation}}
|
18 |
汶茂宁. 基于轮廓波CNN和选择性注意机制的高分辨SAR目标检测和分类[D]. 西安: 西安电子科技大学, 2018.
{{custom_citation.content}}
{{custom_citation.annotation}}
|
19 |
{{custom_citation.content}}
{{custom_citation.annotation}}
|
20 |
10934 [ cs.CV]. 2020.
{{custom_citation.content}}
{{custom_citation.annotation}}
|
21 |
02767 [ cs.CV]. 2018.
{{custom_citation.content}}
{{custom_citation.annotation}}
|
22 |
蒋镕圻, 彭月平, 谢文宣, 等. 嵌入scSE模块的改进YOLOv4小目标检测算法[J]. 图学学报, 2021, 42(4): 546-555.
{{custom_citation.content}}
{{custom_citation.annotation}}
|
23 |
李文涛, 张岩, 莫锦秋, 等. 基于改进YOLOv3-tiny的田间行人与农机障碍物检测[J]. 农业机械学报, 2020, 51(S1):8-15, 40.
{{custom_citation.content}}
{{custom_citation.annotation}}
|
24 |
{{custom_citation.content}}
{{custom_citation.annotation}}
|
25 |
温长吉, 娄月, 张笑然, 等. 基于改进稠密胶囊网络模型的植物识别方法[J]. 农业工程学报, 2020, 36(8): 143-155.
{{custom_citation.content}}
{{custom_citation.annotation}}
|
26 |
{{custom_citation.content}}
{{custom_citation.annotation}}
|
27 |
{{custom_citation.content}}
{{custom_citation.annotation}}
|
28 |
{{custom_citation.content}}
{{custom_citation.annotation}}
|
{{custom_ref.label}} |
{{custom_citation.content}}
{{custom_citation.annotation}}
|
/
〈 |
|
〉 |