English

Journal of Chinese Agricultural Mechanization

Journal of Chinese Agricultural Mechanization ›› 2025, Vol. 46 ›› Issue (2): 230-236.DOI: 10.13733/j.jcam.issn.2095‑5553.2025.02.034

Previous Articles     Next Articles

Real‑time peanut pods detection method based on improved YOLOv5n

Wu Yanghua1, Wang Jiannan1, Liu Minji1, You Zhaoyan1, Xie Huanxiong1, Du Yuanjie2   

  • Online:2025-02-15 Published:2025-01-24

基于改进YOLOv5n的花生荚果实时检测方法

吴阳华1,王建楠1,刘敏基1,游兆延1,谢焕雄1,杜元杰2   

  • 基金资助:
    国家重点研发项目子课题(2023YFD2001005—3);国家花生产业技术体系产后加工机械化岗位(CARS—13—产后加工机械化)

Abstract: The grading of peanut pods is a crucial step in the commercialization process of peanuts. In view of the low mechanical precision and large limitations of traditional peanut pod grading machines, a YOLOv5n—SP algorithm for peanut pod detection based on deep learning was proposed, which could classify peanut pods according to the number of kernels and whether they were damaged. By incorporating the GSConv, a lightweight neck network was constructed, achieving performance improvement while reducing computational complexity. In order to mitigate computational redundancy, the Slimming algorithm was employed for channel pruning, further reducing the parameter count while maintaining performance. Additionally, the channel wise distillation algorithm was introduced to enhance the performance of pruned model. Experimental results demonstrate that compared to the original YOLOv5n model, the improved YOLOv5n—SP model reduces floating point operations by 58.5%, with a 2.0% and 1.1% increase in model precision and recall rate. The real‑time detection speed reaches 84 frame/s, representing a 7.7% improvement.

Key words:  , peanut pod, grading machines, lightweight model, pruning algorithm, intelligent distillation, real?time detection

摘要: 花生荚果分级是花生商品化过程中的重要环节。针对传统花生荚果分级机械精度较低、局限性较大等问题,提出一种基于深度学习的YOLOv5n—SP花生荚果检测算法,对花生荚果按籽仁数量和是否破损进行分级。结合GSConv构建轻量级颈部网络,轻量化的同时实现性能提升;为减少计算冗余,引入Slimming算法进行通道剪枝,在保证性能的前提下进一步降低模型参数量;引入通道智慧蒸馏算法,提高剪枝模型性能。结果表明,改进后的YOLOv5n—SP相较于原模型YOLOv5n,浮点计算量减少58.5%,模型精确率、召回率分别提高2.0%和1.1%,实时检测速度达到84帧/s,提升7.7%。

关键词: 花生荚果, 分级机械, 轻量化模型, 剪枝算法, 智慧蒸馏算法, 实时检测

CLC Number: