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

基于改进YOLOv8模型的小盒烟包外观缺陷识别方法

Appearance defect recognition of cigarette packets based on improved YOLOv8 model

  • 摘要: 为解决复杂背景下小盒烟包外观缺陷识别存在漏检、误检及检测效率低等问题,设计了一种基于改进YOLOv8模型的小盒烟包外观缺陷识别方法。先通过基于链式思维提示的自适应图像增强模块对输入图像进行预处理,消除图像中的背景噪声;再构建改进YOLOv8模型,利用轻量级注意力(CA)模块,将特征的位置信息嵌入到通道注意力模块中,并采用可变形卷积网络(DCN),使卷积核能够自适应地调整感受野形状,以精准捕获小盒烟包封口褶皱、图文残缺等不规则轮廓特征;最后,通过联合权重函数实现缺陷类型的精准分类。结果表明:①相较于原始YOLOv8模型,改进YOLOv8模型的精确率、平均检测精度和召回率分别提升了7.0、4.9和7.0百分点,且模型大小降低。②与Faster R-CNN等主流目标检测模型相比,改进YOLOv8模型的精确率、平均检测精度和召回率明显较高,在小盒烟包缺陷识别任务中表现优异。③在实际应用中,对实时采集到的20 000张小盒烟包图像进行缺陷识别,识别准确率为99.995%,召回率为100%,平均检测速率为50 FPS,能够对不同类别的小盒烟包缺陷进行有效识别,满足实际工况下的使用需求。该研究为小盒烟包外观缺陷检测提供了技术支撑。

     

    Abstract: To address the problems of missed or false detection and low detection efficiency in the appearance defect recognition of cigarette packets under complex backgrounds, an appearance defect recognition method based on the improved YOLOv8 model was proposed. Firstly, the input images were preprocessed by a chain-of-thought promoted adaptive enhancer to eliminate background noise in the images. Secondly, an improved YOLOv8 model was constructed, in which the lightweight coordinate attention (CA) module was employed to embed the positional information of features into the channel attention module, and the deformable convolutional network (DCN) was adopted to enable the convolution kernel to adaptively adjust the receptive field shape, so as to accurately capture the irregular contour features such as seal wrinkles and incomplete graphics and texts of cigarette packets. Finally, the accurate classification of defect types was realized through a joint weighting function. The results showed that: 1) Compared with the original YOLOv8 model, the accuracy, average detection precision and recall rate of the improved YOLOv8 model increased by 7.0, 4.9 and 7.0 percentage points respectively, and the model size was reduced. 2) Compared with mainstream object detection models such as Faster R-CNN, the improved YOLOv8 model had significantly higher accuracy, average detection precision and recall rate, exhibiting excellent performance in the defect recognition task of cigarette packets. 3) In practical application, defect recognition was performed on 20 000 real-time collected images of cigarette packets, with an accuracy of 99.995%, a recall rate of 100%, and an average detection speed of 50 FPS. The proposed method effectively identifies different types of defects of cigarette packets and meets the application requirements under actual working conditions, and this study provides technical support for the appearance defect detection of cigarette packets.

     

/

返回文章
返回