基于YOLOv5的马铃薯种薯芽眼轻量化检测算法

    Lightweight detection algorithm of seed potato eyes based on YOLOv5

    • 摘要: 为了实现种薯芽眼的精准检测,方便后续实现马铃薯种薯的智能化切块,该研究提出一种基于深度学习一阶段目标检测算法YOLO的种薯芽眼检测改进模型。改进后的模型在YOLOv5检测模型基础上引入C3 Faster,降低参数量的同时加强了芽眼特征的提取能力;引入GOLD-YOLO中信息聚集-分发结构,提高模型检测芽眼的准确性;使用WIoU Loss代替CIoU Loss作为边界框损失函数,加快网络模型收敛的同时提高检测精度;使用遗传算法对超参数进行优化;最后使用剪枝与蒸馏技术,降低模型运行参数量与运行内存。优化后的模型大小为8.7 MB,仅为原始模型的61.3%,模型参数量约为原始模型的57.1%,最终的检测平均精确度在自制的种薯数据集中的测试集与验证集上分别为90.5%以及90.1%,该改进模型于自制种薯数据集的测试集上相较同类型的轻量级网络YOLOv7-tiny、YOLOv8n、YOLOv5n、YOLOv5s,平均精度均值分别高出0.5、1.3、2.8、1.1个百分点,在验证集上平均精度均值分别高出2.9、1.9、3.2、1.6个百分点,在本地计算机上检测速度达到了27.5帧/s,该研究结果可为后续种薯芽眼识别及实时切块技术提供参考。

       

      Abstract: Potatoes have been a versatile food and cash crop to ensure food security and grain planting structure in China. The total planting area has declined in the planting industries at present. Some challenges also remain in the mechanization of the potato planting industry. The current process of seed potato cutting can rely heavily on manual and mechanical blind cutting, leading to labor-intensive and inefficient tasks. Moreover, there is a high rate of blind cuts and significant loss of seed potatoes. Therefore, it is highly urgent to accurately and rapidly identify the potato eyes before cutting. In this study, an improved model was proposed to detect the potato bud eyes using YOLOv5. Dutch 15 potato variety was taken as the experimental material. The high-quality samples of seed potatoes were carefully chosen to be free of diseases, dry rot, disease spots, and worm eyes. The dataset was used for training, verification, and testing. 1 400 pictures of seed potatoes were obtained with a ratio of 8:1:1. Data expansion techniques (such as mirroring, rotating, cropping, and adjusting brightness) were applied to enhance the dataset, thus resulting in a total of 5 600 images. Since the features of seed potato eyes were relatively simple, there was a decrease to even disappear after multiple convolutions. C3 Faster was integrated into the original framework. While the extraction of sprout eye features was enhanced to reduce the parameters. Additionally, the GD structure was incorporated from the Neck component of GOLD-YOLO to improve the detection accuracy of sprout eye. The bounding box loss function CIoU Loss was replaced with WIoU Loss to expedite the convergence of the network model for high detection accuracy. The hyperparameters of the original YOLO model were optimized for the COCO dataset. There were significant differences from the dataset of seed potato sprout eye in this experiment. Therefore, a genetic algorithm (GA) was employed to fine-tune the hyperparameters specifically for the detection of seed potato sprout eye at the end of the experiment. Furthermore, pruning and distillation techniques were used to reduce the running parameters and memory consumption, in order to make the model more suitable for the detection tasks of seed potato bud eye. The optimized model was presented with a size of 8.7 MB, which was only 61.3% of the original model. Params comprised approximately 57.1% of the original model. The final average accuracies of detection were 90.5% and 90.1%, respectively, in the test and validation sets of the self-made potato dataset. Compared with the lightweight networks YOLOv7-tiny, YOLOv8n, YOLOv5n, and YOLOv5s, the average accuracies of the improved model were 0.5, 1.3, 2.8, and 1.1 percentage points higher, respectively, in the test set of seed potato dataset. The average accuracy of the verification set was 2.9, 1.9, 3.2, and 1.6 percentage points higher. The detection speed on a local computer reached 27.5 frames per second, fully meeting the real-time requirements. Substantial benefits were offered to significantly enhance the efficiency and accuracy of seed potato bud eye detection in the potato cultivation industry.

       

    /

    返回文章
    返回