Chen Guojun, Hou Yongjie, Chen Haozhen, Cao Lei, Yuan Jianqiang
Qingdao Institute of Software, College of Computer Science and Technology, China University of Petroleum (East China), Qingdao, China.
Faculty of Light Industry, Qilu University of Technology, Jinan, China.
Front Plant Sci. 2024 Jul 22;15:1406593. doi: 10.3389/fpls.2024.1406593. eCollection 2024.
Color-changing melons are a kind of cucurbit plant that combines ornamental and food. With the aim of increasing the efficiency of harvesting Color-changing melon fruits while reducing the deployment cost of detection models on agricultural equipment, this study presents an improved YOLOv8s network approach that uses model pruning and knowledge distillation techniques. The method first merges Dilated Wise Residual (DWR) and Dilated Reparam Block (DRB) to reconstruct the C2f module in the Backbone for better feature fusion. Next, we designed a multilevel scale fusion feature pyramid network (HS-PAN) to enrich semantic information and strengthen localization information to enhance the detection of Color-changing melon fruits with different maturity levels. Finally, we used Layer-Adaptive Sparsity Pruning and Block-Correlation Knowledge Distillation to simplify the model and recover its accuracy. In the Color-changing melon images dataset, the mAP0.5 of the improved model reaches 96.1%, the detection speed is 9.1% faster than YOLOv8s, the number of Params is reduced from 6.47M to 1.14M, the number of computed FLOPs is reduced from 22.8GFLOPs to 7.5GFLOPs. The model's size has also decreased from 12.64MB to 2.47MB, and the performance of the improved YOLOv8 is significantly more outstanding than other lightweight networks. The experimental results verify the effectiveness of the proposed method in complex scenarios, which provides a reference basis and technical support for the subsequent automatic picking of Color-changing melons.
变色瓜是一种兼具观赏性和食用性的葫芦科植物。为了提高变色瓜果实的采摘效率,同时降低检测模型在农业设备上的部署成本,本研究提出了一种改进的YOLOv8s网络方法,该方法采用了模型剪枝和知识蒸馏技术。该方法首先将扩张明智残差(DWR)和扩张重参数化模块(DRB)合并,以重构主干中的C2f模块,实现更好的特征融合。接下来,我们设计了一种多级尺度融合特征金字塔网络(HS-PAN),以丰富语义信息并增强定位信息,从而提高对不同成熟度变色瓜果实的检测能力。最后,我们使用层自适应稀疏剪枝和块相关知识蒸馏来简化模型并恢复其精度。在变色瓜图像数据集中,改进模型的mAP0.5达到96.1%,检测速度比YOLOv8s快9.1%,参数数量从647万个减少到114万个,计算量从228亿次浮点运算减少到75亿次浮点运算。模型大小也从12.64MB减小到2.47MB,改进后的YOLOv8性能明显优于其他轻量级网络。实验结果验证了该方法在复杂场景中的有效性,为后续变色瓜的自动采摘提供了参考依据和技术支持。