本平台为互联网非涉密平台,严禁处理、传输国家秘密或工作秘密

基于CM-YOLOv8n模型的烟丝宽度在线检测

Online detection of cut tobacco width based on CM-YOLOv8n model

  • 摘要: 针对烟丝在密集、重叠且无序情况下检测不精确导致其宽度测量精度低的问题,提出了一种基于CM-YOLOv8n模型的轻量化检测方法。先设计C2f-Faster-CGLU网络(简称C2f-FC),通过部分卷积对输入特征的部分通道进行处理,并利用门控机制动态筛选重要特征通道,以有效降低模型参数量和计算复杂度;再设计多尺度卷积注意力(Multi-Scale Convolutional Attention,MSCA)模块,并将其置于主干网络快速空间金字塔池化(Spatial Pyramid Pooling-Fast,SPPF)模块之前,借助多尺度特征聚合和通道注意力机制,提升模型对烟丝特征的感知能力;最后,引入WIOU损失函数,通过动态调整聚焦机制和平衡样本权重,提升了检测精度。此外,基于CM-YOLOv8n模型设计了烟丝宽度在线检测系统。结果表明:①CM-YOLOv8n模型的精确率为90.7%,召回率为86.6%,mAP@0.50为92.4%,mAP@(0.50~0.95)为73.7%,模型参数量为2.38 M,浮点运算次数为6.2 G,在保持低参数量和计算复杂度的同时,兼顾轻量化设计,能够显著提升烟丝检测效果;②与Faster R-CNN等具有代表性的主流目标检测算法相比,CM-YOLOv8n模型的参数量最少,浮点运算次数显著减少,表现出更高的检测效率和更强的泛化能力;③所设计的烟丝宽度在线检测系统与人工检测结果的偏差在±0.1 mm范围内,符合工艺生产标准。该研究为后续烟丝宽度实时在线检测系统的应用奠定了理论基础。

     

    Abstract: To address the issue of low measurement accuracy of cut tobacco width caused by imprecise detection under dense, overlapping, and disordered cut leaf conditions, a lightweight detection method based on the CM-YOLOv8n model was proposed. Firstly, a C2f-Faster-CGLU network abbreviated as C2f-FC, which processed partial channels of input features using partial convolution and employed a gating mechanism to dynamically screen important feature channels, was designed to effectively reduce number of model parameters and computational complexity. Secondly, a multi-scale convolutional attention (MSCA) module was designed and placed before the spatial pyramid pooling-fast (SPPF) module in the backbone network. By leveraging multi-scale feature aggregation and channel attention mechanisms, the model's perception of cut tobacco features was enhanced. Finally, the WIOU loss function was introduced, which dynamically adjusted the focusing mechanism and balanced sample weights to improve detection pression. Finally, an online detection system for cut tobacco width was developed based on the CM-YOLOv8n model. The results showed that: 1) The CM-YOLOv8n model achieved a precision of 90.7%, a recall rate of 86.6%, an mAP@0.50 of 92.4%, and an mAP@ (0.50-0.95) of 73.7%, with a model parameter number of 2.38 M and floating point operation counts of 6.2 G. While maintaining a small number of parameters and low computational complexity, lightweight design was also considered, significantly improving the detection outcome of cut tobacco. 2) Compared with representative mainstream object detection algorithms such as Faster R-CNN, the CM-YOLOv8n model has fewest parameters and significantly reduced floating point operation counts, demonstrating higher detection efficiency and stronger generalization capability. 3) The designed online detection system for cut tobacco width achieved a detection error within ±0.1 mm compared with the results of manual detetion, meeting industrial production standards. This study lays a theoretical foundation for the subsequent application of a real-time online detection system for cut tobacco width.

     

/

返回文章
返回