高级检索+

基于改进YOLOv8n的轻量化辣椒花目标检测方法

Lightweight chili flower target detection method based on improved YOLOv8n

  • 摘要: 辣椒花目标检测是机械授粉的基础,为提高自然环境下辣椒花目标检测的精度,该研究提出了一种基于YOLOv8n的轻量化辣椒花目标检测模型YOLOv8n-Chili Flower。首先,在Neck层引入高效多尺度轻量化注意力机制模块EMA(efficient multi-scale attention),提升模型对辣椒花特征的识别能力,从而增强检测的灵敏度和准确性;其次,在模型的Backbone层将C2f模块替换为GSConv(group separable convolution)模块,减少不必要的信息冗余,防止特征信息丢失,在提高注意力机制模块效果的同时,降低了模型的复杂度;最后,采用WIoU(weighted intersection over union)损失函数替换CIoU(complete intersection over union)损失函数,优化回归损失的计算,并引入平滑项更准确地计算边界框的重叠度,实现模型更精确匹配辣椒花的形状和分布,从而加快了模型收敛并提高检测精度。结果表明,YOLOv8n-Chili Flower模型的召回率和平均精度均值分别为94.6%和95.9%,较原始YOLOv8n模型分别提升了0.9和0.6个百分点,浮点计算量、参数量和模型大小分别为7.2 G、2.39 M和5.0 MB,较原模型分别降低了12.20%、20.60%和20.63%。与YOLOv5s、YOLOv7tiny、YOLOv8s和YOLOv9主流模型相比,改进模型能够更好地平衡平均精度均值和轻量化,将改进模型部署至NVIDIA Jetson AGX Orin计算平台上开展真实场景测试,正确检测率和检测帧率分别为83.25%和99.02帧/s,具有较好的正确检测率和检测速度。该研究可为辣椒机械授粉的花朵实时检测和轻量化部署提供一定的技术支持。

     

    Abstract: Chili flower target detection can serve as one of the most important steps during mechanical pollination in modern agriculture. It is of great significance to accurately detect chili flowers in natural environments. This study aims to propose a lightweight and efficient detection model (named YOLOv8n-Chili Flower) using the YOLOv8n architecture. Multiple modifications were also carried out to enhance the detection accuracy, sensitivity, and computational efficiency suitable for resource-constrained scenarios, such as mobile pollination robots. Firstly, an Efficient Multi-scale Lightweight Attention Mechanism Module (EMA) was introduced into the neck layer, in order to capture and recognize the multi-scale features of chili flowers. Specifically, the targets were also detected in complex natural environments, such as occlusion, varying lighting conditions, and dense foliage. The EMA module significantly improved the detection sensitivity and accuracy. The robust performance was obtained to focus the critical features under the demanding scenarios. Secondly, the conventional C2f module in the backbone layer was replaced with a Group Separable Convolution (GSConv) module. The information redundancy was effectively reduced during extraction while preserving the key features. The GSConv module was utilized to enhance the effectiveness of the attention mechanism. The model architecture was simplified to reduce the computational complexity. Real-time detection was also realized on low-computing-power devices, like embedded systems. Finally, the Weighted Intersection over Union (WIoU) loss function was used to replace the traditional Complete Intersection over Union (CIoU) loss, in order to optimize the regression loss. Additionally, a smoothing term was introduced to improve the precision of the overlap area computation between predicted and ground-truth bounding boxes. Experimental results show that the YOLOv8n-Chili Flower model achieved a recall rate of 94.6% and a mean average precision (mAP) of 95.9%, which were improved by 0.9 and 0.6 percentage points over the original one. In terms of computational efficiency, the modified model reduced FLOPs to 7.2 G, the parameters to 2.39 M, and the model size to 5.0 MB, which were reduced by 12.20%, 20.60%, and 20.63%, respectively. Compared with the state-of-the-art models, like YOLOv5s, YOLOv7tiny, YOLOv8s, and YOLOv9, there was a superior balance between detection accuracy and lightweight. The improved model was then deployed on an NVIDIA Jetson AGX Orin computing platform for the real-world test. An 83.25% correct detection rate and 99.02 frame per second processing speed were achieved to outperform the existing solutions. This finding can also provide technical support for real-time chili flower detection and lightweight deployment during mechanical pollination.

     

/

返回文章
返回