高级检索+

基于改进的SS-YOLOv8轻量化鲜食玉米果穗优劣检测模型

Lightweight model for detecting fresh corn cobs quality using improved SS-YOLOv8

  • 摘要: 鲜食玉米果穗加工过程需要对优劣(合格与不合格)果穗进行分选,当前检测主要依赖人工完成。为促使检测任务走向自动化,该研究以提高鲜食玉米果穗优劣检测精度、实现轻量化为目标,提出了一种基于改进的SS-YOLOv8轻量化鲜食玉米果穗优劣检测模型。首先,基于鲜食玉米果穗由大量籽粒独立且紧密排列构成这一特征,采用特征重用轻量型网络ShuffleNetV2、用于保留细粒度信息的轻量化卷积层(Space-to-depth-Conv, SPDConv)以及减少计算量的最大池化卷积层(Conv_Maxpool)相结合的策略对特征提取网络进行改进,保证模型对果穗局部及细粒度信息的关注度,同时实现模型轻量化。其次,针对鲜食玉米劣质果穗中缺粒及掉粒表型特征所占整个果穗比例较小,导致主干特征提取网络捕获失败出现误检的现象,在主干特征提取网络模块中引入简单、无参注意力模块(a simple, parameter-free attention module,SimAM),提升模型对掉粒及缺粒果穗的特征提取能力。最后,引入Wise-IoU(WIoU)作为边界框回归损失函数,弥补Complete-IoU(CIoU)损失函数中预测框长宽无法同时变化导致尺寸差异较大的畸形果穗影响训练收敛速度及模型性能下降的不足,进一步保证SS-YOLOv8模型的检测性能。结果表明,改进的SS-YOLOv8模型平均精度均值(mean average precision,mAP)为98.7%,相比于YOLOv8n模型提升1.4个百分点,参数量及模型大小分别为1.99M和4.2MB,减少为原模型的66.1%和66.7%。SS-YOLOv8模型兼顾精度与轻量化,为鲜食玉米果穗优劣分选任务提供可行的检测方法。

     

    Abstract: This study aims to accurately and rapidly detect the fresh corn cobs in modern agriculture. A lightweight model was also proposed for the superior and inferior fresh corn cobs using the improved SS-YOLOv8. Among them, the YOLOv8 model was one of the five size versions in the YOLO series. Furthermore, the YOLOv8n also shared the most lightweight architecture and the high detection speed for real-time tasks. In addition, the high accuracy of the YOLOv8 was comparable to the advanced target detection. Compared with the traditional ones, the YOLOv8 model was the best choice to serve as the base model in the end-to-end detection with significantly higher speeds. Therefore, the quality of the corn cob was evaluated after detection. Firstly, the backbone of the network was improved for the feature extraction, where a large number of the kernels were independently and tightly arranged on the fresh corn cob. The loss of feature information was avoided to reduce the number using feature reuse lightweight network, ShuffleNetV2, the lightweight convolutional layer (SPD-Conv) with the fine-grained information, and the maximally-pooled convolutional layer (Conv_Maxpool). Secondly, a simple and parameter-free attention module (SimAM) was integrated into the backbone network of the feature extraction. The network was enhanced to extract the features from the defective corn cobs. Finally, the Wise-IoU (WIoU) was introduced as the regression loss function of bounding box for the YOLOv8n. The accuracy of the identification was further improved for the flaws of the corn cob. The convergence was also promoted during training. The experimental results show that the improved SS-YOLOv8 model effectively detected the qualified and unqualified fresh corn. The mean average precision (mAP) was achieved at 98.6%, which was 1.3% higher than the baseline model; The number of parameters and model size were only 1.9 M and 4.2 MB, respectively, which were reduced to 66.1% and 66.7% of the baseline model. Additionally, the various attention mechanisms (such as the SimAM, CBAM, and SE) were introduced into the feature extraction network. Among them, the Sim attention mechanism shared the best performance. The regression loss functions of the bounding box were assessed on the performance of the improved model. The WIoU outperformed GIoU, DIoU, and CIoU in the speed of convergence and the size of loss values. A systematic comparison was also made on the two-stage model, Faster R-CNN, the single-stage model, SSD, and the YOLOv5, v6, and v8 of the YOLO series. The results show that the precision, recall, and mAP of the SS-YOLOv8 model were much higher than those of the Faster R-CNN and SSD models, while slightly higher than those of the YOLOv8 and YOLOv5 models. In addition, the improved model was far better than the rest in terms of the computational parameters and size. In summary, the improved SS-YOLOv8 model shared significantly better performance in detection accuracy, the number of parameters, and model size, compared with the rest. As such, the SS-YOLOv8 model can be expected to realize the effective identification of the qualified and unqualified corn cobs with small weights and a number of computational parameters. The finding can provide a strong reference for the detection equipment of the maize grading.

     

/

返回文章
返回