基于改进YOLOv5s的草莓多阶段识别检测轻量化算法

    Recognizing and detecting the strawberry at multi-stages usingimproved lightweight YOLOv5s

    • 摘要: 为解决草莓采摘过程中被遮挡及目标较小情况下漏检的问题,同时提升草莓的识别精度与计算速率,该研究提出了一种基于改进的轻量级Mobile-YOLOv5s草莓识别检测算法。首先,为了提高计算效率,使用了轻量化的MobileNetV3网络替代了原始的YOLOv5s主干网络,并引入了Alpha-IoU损失函数以加快模型的收敛速度,提高对重叠目标的识别准确率;其次,考虑到草莓目标较小的情况,使用K-Means++算法对原始YOLO的anchor进行重聚类,并增加了一个检测头,使其更加适应草莓的尺寸。试验结果表明,改进后的网络模型检测帧率为44帧/s,比原模型提升了15.7%;计算量为8.3×109/s,比原模型降低了48%;模型大小为4.5 MB,比原模型降低了41.5%;成熟草莓检测精度为99.5%,均值平均精度为99.4%,相较于原YOLOv5s算法分别提高了3.6和9.2个百分点。改进后的模型可以更快速、准确地识别出各阶段的草莓,为草莓智能化采摘提供技术支撑。

       

      Abstract: Strawberries have been one of the most popular fruits, due to their the taste and rich nutrition. However, the manual picking cannot fully meet the large-scale cultivation in recent years. Moreover, the short maturity cycle of strawberry can be easy to cause the decay of strawberry fruits, particularly for the untimely picking. Consequently, it is ever increasingly urgent to develop the automatic picking of strawberry. Among them, one of crucial links is the strawberry recognition and detection. The main challenge is to accurately detect the blocked and small target strawberries. In this study, an algorithm was proposed to recognize and detect the obstructed strawberries or the blur target using an improved lightweight Mobile-YOLOv5s. The objective was to enhance both the recognition accuracy and computational speed of strawberry identification during fruit picking. The two-fold strategy was used for the optimization. Firstly, a more lightweight MobileNetV3 network was selected to replace the backbone network of YOLOv5s. The recognition accuracy was improved to reduce the model size and computational complexity. Additionally, Alpha-IOU loss function was also introduced to accelerate the convergence speed of the model. At the same time, the Alpha parameter was used to flexibly adjust the loss function. The recognition accuracy was improved on the blocked and the overlap between strawberries. Secondly, K-Means++ clustering was added to optimize the anchor boxes in target detection. The detection accuracy of blocked strawberries was further optimized to strengthen the detection of small targets. The improved model was also better adapted to the targets with different sizes and shapes. At the same time, the number of detection heads increased to four, in order to expand the receptive field of the model for the detection accuracy of small targets. The experimental results showed that the higher efficacy of the improved model was achieved in the detection frame rate of 44 frames per second (FPS), indicating a significant 15.7% improvement over the original. Furthermore, the computational complexity was measured at 8.3×109 per second, with a substantial 48% reduction from the original. The parameter count was trimmed to 4.5MB with a 15.6% reduction than before. Importantly, the recognition accuracy of mature strawberries reached an impressive 99.5% with an average accuracy of 99.4%, surpassing the original YOLOv5s by 3.6 and 9.2 percentage points, respectively. The more rapid and accurate identification of strawberries was obtained at various stages of growth in practical terms. This technological advancement can hold the promise to realize the intelligent strawberry picking for the high efficiency and productivity in the cultivation of fruits.

       

    /

    返回文章
    返回