严昊,张雷,贾永镒,等. 基于改进YOLOv3-Tiny模型的轻量化莲蓬质量分级算法[J]. 农业工程学报,2024,40(21):1-11. DOI: 10.11975/j.issn.1002-6819.202405093
    引用本文: 严昊,张雷,贾永镒,等. 基于改进YOLOv3-Tiny模型的轻量化莲蓬质量分级算法[J]. 农业工程学报,2024,40(21):1-11. DOI: 10.11975/j.issn.1002-6819.202405093
    YAN Hao, ZHANG Lei, JIA Yongyi, et al. Lightweight lotus seedpod quality classification algorithm based on improved YOLOv3-Tiny model[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2024, 40(21): 1-11. DOI: 10.11975/j.issn.1002-6819.202405093
    Citation: YAN Hao, ZHANG Lei, JIA Yongyi, et al. Lightweight lotus seedpod quality classification algorithm based on improved YOLOv3-Tiny model[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2024, 40(21): 1-11. DOI: 10.11975/j.issn.1002-6819.202405093

    基于改进YOLOv3-Tiny模型的轻量化莲蓬质量分级算法

    Lightweight lotus seedpod quality classification algorithm based on improved YOLOv3-Tiny model

    • 摘要: 精准高效的莲蓬质量分级算法是实现莲蓬采后自动化加工的重要一环。针对目前莲蓬果实的采后质量分级研究较少的问题,本研究建立了莲蓬果实质量分级原则,提出了改进 YOLOv3-Tiny(You Only Look Once version 3-Tiny)模型的莲蓬质量分级算法。首先在3种光照条件下架设摄像头垂直采集莲蓬图像并建立试验数据集,通过数据增强技术扩充数据集;接着使用K均值聚类算法重新设计先验锚框尺度,提高先验锚框的回归精度。随后以YOLOv3-Tiny原骨干网络为基础,加入SPP (Spatial Pyramid Pooling)空间金字塔池化模块,提升网络提取特征信息的能力;最后利用YOLOv3-Tiny的参数进化模块为该模型进化出一套合适的超参数。试验结果表明,改进的 YOLOv3-Tiny模型对莲子识别的平均精度均值mAP(Mean Average Precision)和召回率R(Recall)分别为96.80%和94.60%;与原YOLOv3-Tiny模型相比,mAP提高12.49百分点,召回率提高11.59百分点,并且每秒传输帧数达到25Hz,是Faster R-CNN网络模型的1.24倍。试验数据说明所提改进算法对于莲蓬果实上的莲子具有更好的识别效果,而且满足实时检测的要求,可以为莲蓬质量分级研究提供技术参考。

       

      Abstract: An accurate and efficient quality classification algorithm for lotus is an important part of realizing the automatic processing of lotus after harvest. Regarding the lack of studies on the quality classification of lotus after harvest, this study established a lotus quality classification principle based on the evaluation scheme for white lotus quality published by the Chinese Association of Traditional Chinese Medicine, and proposed an improved YOLOv3-Tiny (You Only Look Once version 3-Tiny) model for quality classification. First, a vertical camera was deployed based on the principles of image recognition to establish an image acquisition platform for lotus seedpod, enabling the collection of lotus seedpod images under three different lighting conditions and the creation of a comprehensive test dataset, the dataset was then augmented using three image augmentation techniques: rotation, colour switching, and affine transformation. The K-means clustering algorithm was subsequently employed to optimize the scales of the prior anchor boxes, aiming to enhance the regression accuracy. Ultimately, six distinct scales for the prior anchor boxes were generated, namely (14, 18), (19, 21), (20, 27), (36, 44), (42, 49), and (50, 56). The achieved accuracy rate is 85.48%. Subsequently, based on the original YOLOv3-Tiny backbone network, the SPP (Spatial Pyramid Pooling) module was added to improve the network’s ability to extract feature information. Finally, the parameter evolution module of YOLOv3-Tiny was used to evolve a set of appropriate hyperparameters for the model. To verify the effectiveness of data augmentation, redesigning the prior anchor box scales, optimizing the feature extraction backbone network and related hyperparameter evolution in improving model performance, ablation experiments were carried out. The ablation experiments showed that recognition precision is increased by 4.95% by using the data augmentation technique. Using the K-Means algorithm to reunite classes, the recognition precision increased by 0.76%, Based on the K-Means algorithm for class reunion, adding the Spatial Pyramid Pooling (SPP) module further improved the recognition precision by 1.12%, By adding the hyperparameter evolution module, the recognition precision reached 93.1%, and the overall robustness of the model improved. To verify the effectiveness of the improved YOLOv3-Tiny model on the quality classification of lotus seedpod, we tested its performance against the original YOLOv3-Tiny network model and Faster R-CNN. The results show that the improved YOLOv3-Tiny model achieved a Mean Average Precision (mAP) of 96.80%, a Precision (P) of 93.10%, and a Recall (R) of 94.60%. Compared to the original YOLOv3-Tiny model, the mAP is increased by 12.49%, the Precision (P) is increased by 14.77%, and the Recall (R) is increased by 11.59%. The number of frames transmitted per second reached 25 Hz, which is 1.24 times that of the Faster R-CNN network model. Ablation experiments showed that the Precision (P), Recall (R) and mAP of the improved YOLOv3-Tiny model increased by 4.95%, 4.52% and 5.61%, respectively. By redesigning the prior anchor box scale, the Precision (P), Recall (R) and mAP of the network model were 0.76%, 0.10% and 0.25% higher than those of the model with the original prior anchor scale. By introducing the SPP module, the Precision (P) increased by 1.12%, the Recall (R) increased by 0.10%, and the mAP increased by 0.23%. Through hyperparameter evolution, the Precision (P) increased by 7.94%, the Recall (R) increased by 6.87%, and mAP is increased by 6.40%. Ablation experiments verified that data augmentation, redesigning the prior anchor box scale, improving the YOLOv3-Tiny feature extraction backbone network, and related hyperparameter evolution can effectively enhance the detection performance of the network model for all levels of lotus after harvest. The data show that the improved algorithm has a better recognition effect for lotus seeds and meets the requirement for real-time detection, providing a technical reference for research on lotus quality classification.

       

    /

    返回文章
    返回