| 摘 要: 针对目前人工筛选蚕茧效率低、误检率高,同时机器视觉识别蚕茧缺陷精度低等问题。提出一种基于 YOLOv8(You Only Look Once version 8 )的改进算法蚕茧缺陷检测模型,通过引入C2f-GS到网络结构,融合通道信息、减少了特征信息丢失,提高模型推理运行速度。大小核卷积(LS Conv,Large-Small Convolution)相较基础卷积复杂度和参数较低,引入该卷积能实现模型的轻量化,提高模型的运行速度,同时提升算法的检测能力。在结构的第五层增加高效多尺度注意力EMA (Efficient Multi-Scale Attention),整合通道数为通道维度,使空间语义特征在每个特征组中均匀分布,增强了蚕茧缺陷的识别提取能力。在蚕茧数据集上的实验结果显示,本文提出的算法精确度达到95.7%模型在准确与YOLOv8s基础模型相比准确率提高了2.23%。在缺陷检测方面对比SSD、YOLOv5等算法在精度和模型规模上都具有优势,能准确地识别蚕茧地缺陷,为今后在生产过程的应用提供了指导。 |
| 关键词: 深度学习 蚕茧检测 YOLOv8s 注意力机制 大小卷积 |
|
中图分类号:
文献标识码:
|
| 基金项目: 浙江省高层次人才特殊支持计划,省万人计划 (2023R5212) |
|
| A Lightweight Fine-Grained Silkworm Cocoon Classification Algorithm Based on Improved YOLOv8s |
|
YAN Huajian PENG Laihu
|
School of Mechanical Engineering, Zhejiang Sci-Tech University
|
| Abstract: To address the current issues of low efficiency and high misclassification rates in manual silkworm cocoon screening, as well as the low accuracy of machine vision in detecting cocoon defects, an improved YOLOv8-based algorithm for cocoon defect detection was developed. By incorporating an integrating C2f-GS into the network architecture, channel information was fused, reducing feature information loss and improving model inference speed. The large-small convolution (LS Conv) offers lower computational complexity and parameter requirements compared to standard convolution, enabling model lightweighting and enhanced operational speed while boosting detection capabilities. At the fifth structural layer, an efficient multi-scale attention mechanism (EMA) was added, consolidating channel dimensions to ensure uniform distribution of spatial semantic features across each feature group, thereby strengthening defect recognition and extraction capabilities. Experimental results on the cocoon dataset demonstrated that the proposed algorithm achieved 95.7% accuracy, a 2.23% improvement over the YOLOv8s baseline model. Compared to SSD and YOLOv5 algorithms, this method exhibits advantages in both precision and model size, enabling accurate detection of cocoon defects and providing guidance for future production applications. |
| Keywords: deep learning Silk cocoon detection YOLOv8s attention mechanism size convolution |