English

Journal of Chinese Agricultural Mechanization

Journal of Chinese Agricultural Mechanization ›› 2023, Vol. 44 ›› Issue (11): 155-161.DOI: 10.13733/j.jcam.issn.2095-5553.2023.11.023

Previous Articles     Next Articles

Identification and counting of phalaenopsis flowers based on improved YOLOv5

Xiao Kehui1, 2, Yang Hong1, 2, Su Zhangshun1, 2, Yang Xiaodan1, 2   

  • Online:2023-11-15 Published:2023-12-07

基于改进YOLOv5的蝴蝶兰花朵识别与计数

肖克辉1, 2,杨宏1, 2,苏章顺1, 2,杨小丹1, 2   

  • 基金资助:
    广东省自然科学基金项目(2020A1515010691);国家重点研发计划重点专项(2021YFD2000802)

Abstract:  In order to accurately predict the yield of phalaenopsis and scientifically manage the production of phalaenopsis, this study identified and detected the flowers and buds of phalaenopsis plants in the big seedling stage and counted the number of flowers and buds. Due to the small target volume of phalaenopsis bud,, a phalaenopsis flower and bud recognition method based on improved YOLOv5 was proposed. Firstly, the structure of the neck network was modified in feature pyramid network and Path Aggregation Network. A 160×160 feature map was introduced to improve the detection effect of small targets. Secondly, the Kmeans++ clustering algorithm was used to generate a more appropriate anchor box for the training set, and the training method of loading pretraining weights and freezing the backbone network was adopted to make the model easier to learn and improve the convergence speed and generalization ability of the network model. Finally, a lightweight attention mechanism was added to the neck network to strengthen the attention to the target and reduce the background interference, to improve the feature extraction ability of the model. The experimental results showed that the AP of the algorithm for buds was 89.54%, which was 9.83% higher than that before the improvement, and the mAP of buds and flowers was 91.81%, which was 5.56% higher than that before the improvement. So, the algorithm has excellent detection accuracy and effectively improves the detection ability of small targets.

Key words: phalaenopsis flower, deep learning, target detection, YOLOv5, clustering algorithm, attention mechanism

摘要: 为精确预测蝴蝶兰产量和对蝴蝶兰的生产进行科学管理,对大苗时期的蝴蝶兰植株花朵和花苞进行识别与检测,统计其花量。由于蝴蝶兰花苞目标体积较小,提出一种基于改进YOLOv5的蝴蝶兰花朵与花苞识别方法。首先,修改颈部网络的结构,在特征金字塔FPN(Feature Pyramid Network)和路径聚合网络PANet(Path Aggregation Network)中引入有利于小目标检测的160×160尺度特征层,以提升对小目标的检测效果;其次,使用Kmeans++聚类算法针对训练集生成更合适的先验框,并采用载入预训练权重和冻结主干网络的训练方式,以使模型更加容易学习,提高网络模型收敛速度和泛化能力;最后,在颈部网络加入轻量级注意力机制,加强对目标的关注,减少背景干扰,以提升模型的特征提取能力。试验结果显示,该算法对花苞的检测精确率达到89.54%,比改进前提升9.83%;对花苞和花朵的平均精确率达到91.81%,比改进前提升5.56%。该算法有优异的检测精度并有效提高对小目标的检测能力。

关键词: 蝴蝶兰花朵, 深度学习, 目标检测, YOLOv5, 聚类算法, 注意力机制

CLC Number: