设为首页 联系我们 加入收藏

当前位置: 网站首页 期刊分类目录 2023第3期 正文

一种基于注意力机制的YOLO缺陷检测算法

作者:时间:2023-06-30点击数:

全文下载: 202303014.pdf


文章编号: 1672-6987202303-0110-08 DOI 10.16351/j.1672-6987.2023.03.014



于龙振1 李逸飞1 朱建华1* 赵谦2 王志宪1(1.青岛科技大学 经济与管理学院,山东 青岛 266061 2.九州工业大学 计算机科学与工程研究生院,福冈 北九州 8040000)


摘要: 针对零部件制造质量控制方面的缺陷检测,考虑到工业摄像头角度和零部件表面缺陷特征相对固定的特点,提出一种基于注意力机制的YOLO缺陷检测算法。围绕提升算法注意力,首先采用CZS算法,把图像上的缺陷区域剪切、缩放和拼接成新图像,使注意力集中于缺陷相关区域;然后采用裁减主干网络算法,裁减掉原版YOLOv3主干网络中无用的检测尺度层;最后使用数据增强算法增加训练样本量。实验案例结果表明:该算法检测精度992%,单帧图像检测时间001 s,性能均优于原版YOLOv3;该算法在固定摄像头场景下具有一定先进性,3项提升注意力的策略使算法训练精度收敛的更快、检测速度更快、检测性能更稳定。


关键词: 缺陷检测; YOLO; 注意力机制; CZS算法; 主干网络


中图分类号: TQ 207+.2文献标志码: A

引用格式: 于龙振, 李逸飞, 朱建华, 等. 一种基于注意力机制的YOLO缺陷检测算法研究[J. 青岛科技大学学报(自然科学版), 2023, 44(3): 110-117.


YU Longzhen, LI Yifei, ZHU Jianhua, et al. Defect inspection algorithm using YOLO based on attention mechanismJ. Journal of Qingdao University of Science and TechnologyNatural Science Edition), 2023 443): 110-117.


Defect Inspection Algorithm Using YOLO Based on Attention Mechanism


YU Longzhen1, LI Yifei1, ZHU Jianhua1, ZHAO Qian2, WANG Zhixian1

(1. College of Economics and Management, Qingdao University of Science and Technology Qingdao 266061, China;

2. Graduate School of Computer Science and Engineering, Kyushu Institute of Technology, Fukuoka 8040000, Japan )


Abstract: In this study, considering the industrial camera angle and the relatively fixed defect features on the part surface of parts manufacturing quality control, an attention mechanism based YOLO defect inspection algorithm is proposed. First, CZS algorithm is used to cut, zoom and splice the defect area on the image into a new image to focus on the defect related area; Then the algorithm of pruning the backbone network is used to prune the useless detection scale layer in the original YOLOv3 backbone network; Finally, the data enhancement algorithm is used to increase the training samples. The experimental results show that the detection accuracy of this algorithm is 992%, the detection time of a single frame image is 001 s, and the performance is better than the original YOLOv3; The algorithm is progressiveness in the fixed camera scene, and three strategies to improve attention make the algorithm converge faster in training accuracy and more stable in detection performance.


Key words: defect inspection; YOLO; attention mechanism; CZS algorithm; backbone network


收稿日期: 2022-05-30

基金项目: 山东省科技厅重点研发计划项目(2019GGX105014);青岛市社会科学规划项目 (QDSKL1801166).

作者简介: 于龙振 (1981—),,副教授.*通信联系人.




Copyright © 2011-2017 青岛科技大学学报 (自然科学版)