计算机工程与应用 ›› 2024, Vol. 60 ›› Issue (23): 257-267.DOI: 10.3778/j.issn.1002-8331.2407-0060

• 图形图像处理 • 上一篇    下一篇

改进YOLOv8n的花生品质检测方法

黄英来,牛达伟,侯畅,杨柳松   

  1. 东北林业大学 计算机与控制工程学院,哈尔滨 150040
  • 出版日期:2024-12-01 发布日期:2024-11-29

Improved Peanut Quality Detection Method of YOLOv8n

HUANG Yinglai, NIU Dawei, HOU Chang, YANG Liusong   

  1. College of Computer and Control Engineering, Northeast Forestry University, Harbin 150040, China
  • Online:2024-12-01 Published:2024-11-29

摘要: 花生品质筛选在农业生产和食品安全中具有重要意义。针对传统花生品质筛选方法效率低的问题,提出改进YOLOv8n算法的轻量化花生品质检测模型LE-YOLO(lightweight and efficient)。提出一种分组重序颈部模块(grouped shuffling bottleneck,GSBottleneck),增加了模型非线性拟合能力,减少了模型推理时间;设计了残差分组重序模块(residual group shuffling block,ResGSBlock),并结合GSConv(grouped shuffle convolution)构建轻量颈部网络(lightweight neck,LW-Neck),减少了模型计算成本,提升了模型推理速度;提出自适应特征优化模块(adaptive feature optimization block,AFOB),增强了通道间信息交互和模型表征能力。在DW花生数据集上进行实验验证,相较于YOLOv8n算法,LE-YOLO的计算量减少了1?GFlops,FPS提升了25%,平均精度均值mAP@0.5达到了98%,验证了该算法在检测精度和速度上的良好性能,为花生品质筛选提供了一种有效的方法。

关键词: YOLOv8n, GSConv, GSBottleneck, 花生品质筛选, 轻量化模型

Abstract: Peanut quality screening is of great significance in agricultural production and food safety. In order to solve the problem of low efficiency of traditional peanut quality screening methods, a lightweight peanut quality detection model LE-YOLO (lightweight and efficient) with improved YOLOv8n algorithm is proposed. A grouped shuffling bottleneck (GSBottleneck) module is proposed, which increases the nonlinear fitting ability of the model and reduces the model inference time. A residual group shuffling block (ResGSBlock) is designed, and a lightweight neck (LW-Neck) is constructed by combining GSConv (grouped shuffle convolution), which reduces the cost of model calculation and improves the inference speed of the model. An adaptive feature optimization block (AFOB) is proposed to enhance the information interaction and model characterization capabilities between channels. Experimental verification on the DW peanut dataset shows that compared with the YOLOv8n algorithm, the computational cost of LE-YOLO is reduced by 1 GFlops, the FPS is increased by 25%, and the average accuracy reaches 98% mAP@0.5, which verifies the good performance of the algorithm in detection accuracy and speed, and provides an effective method for peanut quality screening.

Key words: YOLOv8n, grouped shuffle convolution (GSConv), grouped shuffling bottleneck (GSBottleneck), peanut quality screening, lightweight model