基于改进YOLOv8s的杭白菊检测与花期分类

    Detecting chrysanthemum to classify flowering stages using improved YOLOv8s

    • 摘要: 为精准识别与分类不同花期杭白菊,满足自动化采摘要求,该研究提出一种基于改进YOLOv8s的杭白菊检测模型-YOLOv8s-RDL。首先,该研究将颈部网络(neck)的C2f(faster implementation of CSP bottleneck with 2 convolutions)模块替换为RCS-OSA(one-shot aggregation of reparameterized convolution based on channel shuffle)模块,以提升骨干网络(backbone)特征融合效率;其次,将检测头更换为DyHead(dynamic head),并融合DCNv3(deformable convolutional networks v3),借助多头自注意机制增强目标检测头的表达能力;最后,采用LAMP(layer-adaptive magnitude-based pruning)通道剪枝算法减少参数量,降低模型复杂度。试验结果表明,YOLOv8s-RDL模型在菊米和胎菊的花期分类中平均精度分别达到96.3%和97.7%,相较于YOLOv8s模型,分别提升了3.8和1.5个百分点,同时权重文件大小较YOLOv8s减小了6 MB。该研究引入TIDE(toolkit for identifying detection and segmentation errors)评估指标,结果显示,YOLOv8s-RDL模型分类错误和背景检测错误相较YOLOv8s模型分别降低0.55和1.26。该研究为杭白菊分花期自动化采摘提供了理论依据和技术支撑。

       

      Abstract: Chrysanthemum tea has been one of the most popular food products, due to the health benefits and high commercial value. The medicinal and economic chrysanthemum can greatly vary in the different flowering stages. Among them, the flowering stages of Chrysanthemum can be categorized into the Jumi (flower buds), Taiju (flower buds just before blooming), and Duohua (fully bloomed flowers). At the same time, the chrysanthemum is required for the best picking time. However, manual picking cannot fully meet the requirement of large-scale production at the early flowering stage, due mainly to the labor-intensive and time-consuming. Untimely picking or picking errors at the different flowering stages can also lead to the waste of chrysanthemum, even the serious economic losses. Therefore, the picking robot can be expected to realize the accurate and rapid recognition of chrysanthemum in different flowering stages using lightweight model. In this study, an improved YOLOv8s model (YOLOv8s-RDL) was proposed for the object detection of chrysanthemum. Firstly, the C2f (faster implementation of CSP bottleneck with 2 convolutions) in Neck network was replaced by RCS-OSA (one-shot aggregation of reparameterized convolution using channel shuffle). The features were extracted to more efficiently fuse by the Backbone layer; Secondly, the decoupled head was replaced with the Dyhead (dynamic head), and then integrated into the DCNv3 (deformable convolutional networks v3). The multi-head self-attention mechanism was combined to strengthen the expression of the target detection head. Finally, the LAMP (layer-adaptive magnitude-based pruning) was used to reduce the number of parameters and the complexity of the model network. The amount of calculation was significantly reduced to maintain a high average precision level of the improved model. A comparison was also made to explore the effect of RCS-OSA in the different positions of the network. The performance of the model was depended mainly on the different pruning conditions and rates in the same pruning direction. The best improved model was obtained after network structure improvement and pruning. The best solution was attributed to the replacement of the C2f with the RCS-OSA only in the Neck part, particularly in the pruning condition of the adaptation model. The ablation experiments show that the mean average accuracies of the improved model for Duohua, Taiju and Jumi were 99.0%, 97.7% and 96.3%, respectively, in the classification and detection of flowering stage, which were 0.3, 1.9 and 3.8 percentage points higher than that of YOLOv8s. The mean average precision, precision and recall of the YOLOv8s-RDL for the Jumi, Taiju, and Duohua were 97.7%, 96.5%, and 95.2%, respectively, which were 1.9, 5.2 and 6.4 percentage points higher than YOLOv8s baseline model, respectively. The size of model weight also decreased by 6 MB. The improved model was greatly reduced the number of parameters and weight size, indicating the high detection accuracy. The mean average accuracies of YOLOv8S-RDL were 35.3, 2.9, 3.4, 1.9, 3.8 and 1.7 percentage points higher than those of SSD, YOLOv5s, YOLOv6s, YOLOv8s, Ginger-YOLOv5s and MSC-YOLOv8, respectively. At the same time, there were the smallest weight size and parameters of the improved model. In addition, the superiority of the algorithm was verified to introduce the TIDE (toolkit for identifying detection and segmentation errors) indicator. The detection errors of classification and background were reduced by 0.55 and 1.26, respectively, in the YOLOv8s-RDL, compared with the YOLOv8s. The better performance of detection and classification was achieved to reduce the influence of background and interference factors. The improved model was also fully met the requirements of accurately and rapidly distinguish the chrysanthemum flowering stages. This finding can also provide the theoretical reference and technical support to realize the automatic picking of chrysanthemum in the various flowering period.

       

    /

    返回文章
    返回