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

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

Research on appearance defect recognition of small cigarette pack based on improved YOLOv8

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

     

    Abstract: To address the problems of missed detection, false detection and low detection efficiency in the appearance defect recognition of small cigarette packs under complex backgrounds, an appearance defect recognition method for small cigarette packs based on the improved YOLOv8 model is proposed. Firstly, the input images are preprocessed by a chain-of-thought-based adaptive image enhancement method to eliminate background noise in the images. Secondly, an improved YOLOv8 model is constructed, in which the lightweight Coordinate Attention (CA) module is used to embed the positional information of features into the channel attention module, and the Deformable Convolutional Network (DCN) is 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 text of small cigarette packs. Finally, the accurate classification of defect types is realized through a joint weight function. The results show that compared with the original YOLOv8 model, the accuracy, detection precision and recall of the improved YOLOv8 model are increased by 7.0, 4.9 and 7.0 percentage points respectively, and the model size is significantly reduced; compared with mainstream object detection models such as Faster R-CNN, the improved YOLOv8 model has obviously higher accuracy, detection precision and recall, and exhibits excellent performance in the defect recognition task of small cigarette packs; in practical application, the defect recognition is carried out on 20 000 real-time collected images of small cigarette packs, with a recognition accuracy of 99.995%, a recall of 100%, a precision of 96.30% and an average detection speed of 50 FPS, and the proposed method can effectively identify different types of defects of small cigarette packs and meet the application requirements under actual working conditions. This study provides technical support for the appearance defect detection of small cigarette packs.

     

/

返回文章
返回