Ma Na, Wu Yulong, Bo Yifan, Yan Hongwen
College of Information Science and Engineering, Shanxi Agricultural University, Jinzhong 030801, China.
Plants (Basel). 2024 Aug 28;13(17):2402. doi: 10.3390/plants13172402.
In response to the low accuracy and slow detection speed of chili recognition in natural environments, this study proposes a chili pepper object detection method based on the improved YOLOv8n. Evaluations were conducted among YOLOv5n, YOLOv6n, YOLOv7-tiny, YOLOv8n, YOLOv9, and YOLOv10 to select the optimal model. YOLOv8n was chosen as the baseline and improved as follows: (1) Replacing the YOLOv8 backbone with the improved HGNetV2 model to reduce floating-point operations and computational load during convolution. (2) Integrating the SEAM (spatially enhanced attention module) into the YOLOv8 detection head to enhance feature extraction capability under chili fruit occlusion. (3) Optimizing feature fusion using the dilated reparam block module in certain C2f (CSP bottleneck with two convolutions). (4) Substituting the traditional upsample operator with the CARAFE(content-aware reassembly of features) upsampling operator to further enhance network feature fusion capability and improve detection performance. On a custom-built chili dataset, the F, mAP, and mAP metrics improved by 1.98, 2, and 5.2 percentage points, respectively, over the original model, achieving 96.47%, 96.3%, and 79.4%. The improved model reduced parameter count and GFLOPs by 29.5% and 28.4% respectively, with a final model size of 4.6 MB. Thus, this method effectively enhances chili target detection, providing a technical foundation for intelligent chili harvesting processes.
针对自然环境中辣椒识别准确率低、检测速度慢的问题,本研究提出了一种基于改进YOLOv8n的辣椒目标检测方法。在YOLOv5n、YOLOv6n、YOLOv7-tiny、YOLOv8n、YOLOv9和YOLOv10之间进行了评估,以选择最优模型。选择YOLOv8n作为基线并进行如下改进:(1)用改进的HGNetV2模型替换YOLOv8主干,以减少卷积过程中的浮点运算和计算量。(2)将SEAM(空间增强注意力模块)集成到YOLOv8检测头中,以增强辣椒果实遮挡情况下的特征提取能力。(3)在某些C2f(带两个卷积的CSP瓶颈)中使用扩张重参数化块模块优化特征融合。(4)用CARAFE(内容感知特征重组)上采样算子替换传统上采样算子,以进一步增强网络特征融合能力并提高检测性能。在自定义的辣椒数据集上,F、mAP和mAP指标分别比原始模型提高了1.98、2和5.2个百分点,达到了96.47%、96.3%和79.4%。改进后的模型参数数量和GFLOPs分别减少了29.5%和28.4%,最终模型大小为4.6MB。因此,该方法有效地增强了辣椒目标检测,为智能辣椒收获过程提供了技术基础。