首页 | 本学科首页   官方微博 | 高级检索  
     

基于改进YOLOv5s的白酒瓶盖瑕疵检测
引用本文:王军,万书东,程勇. 基于改进YOLOv5s的白酒瓶盖瑕疵检测[J]. 包装工程, 2024, 45(7): 180-188
作者姓名:王军  万书东  程勇
作者单位:南京信息工程大学 软件学院,南京 210044;南京信息工程大学 科技产业处,南京 210044
基金项目:国家自然科学基金(41975183,41875184)
摘    要:目的 瓶装白酒生产过程中,瓶盖表面瑕疵会影响产品外观质量。针对白酒瓶盖表面瑕疵检测效率低和目标检测效果差的问题,提出一种基于YOLOv5s的改进算法DTS-YOLO。方法 首先,在主干网络中引入可变形卷积,以提高模型对极端长宽比瑕疵的检测精度。其次,引入Transformer编码块,使网络聚焦于提取图像的全局信息。最后,在颈部网络构建C3SE-Lite模块,将C3模块嵌入SE注意力模块的同时引入Ghost卷积,减少参数量的同时,增强对瓶盖瑕疵的检测能力。结果 实验结果表明,本文所提方法相较于基础网络,参数量减少了10%,平均精度均值达95%,平均检测速度达30帧/s。结论 本文方法有效实现了白酒瓶盖表面瑕疵快速、准确地检测,可广泛应用于瓶装白酒生产过程中瓶盖表面检测。

关 键 词:YOLOv5s  瑕疵检测  可变形卷积  Transformer编码块  注意力机制
收稿时间:2023-06-26

Liquor Bottle Cap Defect Detection Based on Improved YOLOv5s
WANG Jun,WAN Shudong,CHENG Yong. Liquor Bottle Cap Defect Detection Based on Improved YOLOv5s[J]. Packaging Engineering, 2024, 45(7): 180-188
Authors:WANG Jun  WAN Shudong  CHENG Yong
Affiliation:School of Software, Nanjing University of Information Science and Technology, Nanjing 210044, China;Science and Technology Industry Division, Nanjing University of Information Science and Technology, Nanjing 210044, China
Abstract:In production of bottled liquor, there are usually surface defects on the bottle cap that affect the quality of the product. The work aims to propose an improved algorithm model DTS-YOLO based on YOLOv5s to solve problems of low detection efficiency of blemishes on the surface of liquor bottle caps and poor detection of small targets. First, deformable convolution was introduced into the backbone network to improve the detection accuracy of the model for extreme aspect ratio defects; Secondly, the Transformer coding block was incorporated into the backbone network to make the backbone network focus on the extraction of global information of the image; Finally, influenced by Inspired by the C3 module in YOLOv5s, the C3SE-Lite module was designed. The C3 module was embedded in the SE attention module and the GhostConv convolution was introduced at the same time, so that the model could reduce the number of parameters while enhancing the ability to detect defects. The experimental results showed that under the premise of reducing the number of parameters by 10%, the average precision of the method in this paper reached 95%, and the average detection speed was 30 f/s. The method presented in this paper can effectively detect the surface defects of bottle caps quickly and accurately, and can be widely applied to the surface detection of bottle caps during the production of bottled liquor.
Keywords:YOLOv5s   flaw detection   deformable convolution   Transformer coding block   attention mechanism
点击此处可从《包装工程》浏览原始摘要信息
点击此处可从《包装工程》下载免费的PDF全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号