论文中文题名: | 基于图像处理的钢材表面缺陷检测算法研究 |
姓名: | |
学号: | 21207223105 |
保密级别: | 公开 |
论文语种: | chi |
学科代码: | 085400 |
学科名称: | 工学 - 电子信息 |
学生类型: | 硕士 |
学位级别: | 工程硕士 |
学位年度: | 2024 |
培养单位: | 西安科技大学 |
院系: | |
专业: | |
研究方向: | 数字信号处理 |
第一导师姓名: | |
第一导师单位: | |
论文提交日期: | 2024-06-12 |
论文答辩日期: | 2024-05-29 |
论文外文题名: | Research on detection algorithm of steel surface defect based on image processing |
论文中文关键词: | |
论文外文关键词: | Steel surface defects ; Image processing ; Feature extraction ; Target detection ; YOLOv5s |
论文中文摘要: |
钢材在生产过程中由于生产设备或生产工艺的原因,往往会产生表面缺陷,影响产品的质量,所以快速且准确检测出钢材的表面缺陷,是钢材表面缺陷检测的一项关键技术。随着图像处理和深度学习等理论的发展和完善,为钢材表面缺陷的快速且准确检测提供了重要手段,本文对基于图像处理的钢材表面缺陷检测的有效方法进行了研究。 针对生产过程中采集到的缺陷图像因光照不均匀以及噪声大造成缺陷目标不明显和缺陷边缘模糊不清的问题,提出了一种多层处理机制的图像处理算法,包括CLAHE算法、双边滤波算法和改进Bottom-hat变换。该算法首先使用CLAHE算法对钢材表面缺陷图像进行灰度矫正,突出缺陷图像的内部细节信息。然后,利用双边滤波算法去除噪声。最后,因传统Bottom-hat变换导致缺陷目标较为模糊,于是使用改进Bottom-hat变换,通过放大缺陷目标和图像背景的差异程度,突出缺陷目标的同时抑制图像的背景信息。利用全局阈值分割算法分割出缺陷目标,标注更加精确的位置,提高检测精度。通过主观评价和客观评价进行对比分析,实验结果表明所提算法能够很好的突出缺陷目标及边缘信息,相比原缺陷图像,准确率达到了76.5%。 针对YOLOv5s模型在进行缺陷检测时,因结构信息少导致缺陷目标的特征信息提取不够充分从而造成检测精度低等问题,研究了改进YOLOv5s模型的钢材表面缺陷检测算法。一方面利用全局注意力机制(Global Attention Mechanism, GAM)能够帮助YOLOv5s模型更加关注缺陷图像的关键区域;另一方面构建双向特征金字塔结构(Bidirectional Feature Pyramid Network, BiFPN)既可以充分利用深层特征的语义信息,也能够保留浅层特征的位置信息,同时使用GSConv结构对BottleneckCSP2模块进行改进,减少模型的参数量。在NEU-DET数据集上对改进YOLOv5s模型进行训练和测试,仿真结果表明,改进YOLOv5s模型的mAP值达到了79.2%,比原YOLOv5s模型提高了10.8%,检测速度提高了20.3FPS,具有更好的钢材表面缺陷检测性能。 为了便于工程应用,根据实际需求使用PYQT5设计了钢材表面缺陷检测软件,完成了软件主要功能的开发,并利用图像处理和改进YOLOv5s模型相结合的方式实现了钢材表面缺陷检测。 |
论文外文摘要: |
During the production process of steel, surface defects often occur due to the equipment or production process, affecting the quality of the product. Therefore, detecting surface defects of steel rapidly and accurately is the key technology in steel surface defect detection. The development and improvement of image processing and deep learning theories have provided many important means for the rapid and accurate detection of steel surface defects. This article studies the effective methods of steel surface defect detection based on image processing. Addressing the issues of unclear defect targets and blurred defect edges in defect images that are collected during the production process due to uneven lighting and significant noise, an image processing algorithm with a multi-layer processing mechanism is proposed. This algorithm includes the CLAHE algorithm, bilateral filtering algorithm, and an improved Bottom-hat transformation. Firstly, the CLAHE algorithm is used to correct the grayscale of the steel surface defect image and highlight the internal detail information of the defect image. Then, the bilateral filtering algorithm is employed to remove noise. Finally, the traditional Bottom-hat transformation results in a blurred defect target, an improved Bottom-hat transformation is adopted, which highlights the defect target while suppressing the background information of the image by amplifying the difference between the defect target and the image background. A global threshold segmentation algorithm is used to segment out the defect target, marking a more precise location and improving detection accuracy. Through comparative analysis of subjective and objective evaluations, experimental results show that the proposed algorithm can effectively highlight the defect target and edge information. Compared with the original defect image, the accuracy rate reached 76.5%. When using the YOLOv5s model for defect detection, issues such as low detection accuracy arise due to insufficient feature extraction of defect targets caused by a lack of structural information. Therefore, an improved YOLOv5s algorithm for steel surface defect detection has been studied. On one hand, the Global Attention Mechanism (GAM) is employed to help the YOLOv5s model focus more on the key regions of defect images. On the other hand, a Bidirectional Feature Pyramid Network (BiFPN) is constructed, which not only leverages the semantic information of deep features but also retains the positional information of shallow features. Additionally, the BottleneckCSP2 module is improved using the GSConv structure to reduce the number of model parameters. After training and testing the improved YOLOv5s model on the NEU-DET dataset, simulation results show that the mAP value of the improved YOLOv5s model reaches 79.2%, representing a 10.8% increase compared to the original YOLOv5s model. Meanwhile, the detection speed improves by 20.3 FPS, demonstrating better performance in steel surface defect detection. To facilitate engineering applications, a steel surface defect detection software is designed using PYQT5 based on practical requirements. The development of the software's main functions is completed, and the steel surface defect detection has been achieved through a combination of image processing and the improved YOLOv5s model. |
参考文献: |
[1] 董静媚.2022年钢铁行业形式分析与2023年展望[J].中国物价,2023,3(02):23-25. [2] 张利娜.钢铁行业低碳技术应用及发展研究[J].冶金能源,2023,42(02):3-6. [3] 李志峰,曹光明,王福祥等.热轧钢材表面氧化铁皮微观结构表征技术综述[J].轧钢, 2017,34(03):56-60. [4] 罗克淳.建筑用钢材的生产现状与发展趋势[J].河南建材,2020,8(02):5-5. [5] 张涛,刘玉婷,杨亚宁,等.基于机器视觉的表面缺陷检测研究综述[J].科学技术与工程,2020,20(35):14366-14376. [6] 李福东,黄强,李威,等.表面缺陷检测研究进展与挑战[C]//中国自动化学会过程控制专业委员会,中国自动化学会.第34届中国过程控制会议论文集,2023:120. [7] 柯鹏,刘豪,朱立荣,等.钢材低温轧制技术研发现状与展望[J].硬质合金,2023,40 (04):319-327. [16] 张福虔,李业丽,唐明杰,等.基于机器视觉的印刷辊筒表面缺陷增强与检测[J].数字印刷,2021,37(05):12-20. [17] 吴旭东,闫志鸿,胡飞涛,等.基于光度学特征与SVM的热轧铝板表面缺陷检测[J].热加工工艺,2023,52(06):157-162. [19] 黄晓红,郑天程,肖鹏程,等.基于SVM算法的钢卷边部缺陷识别系统[C]//第十四届全国信号和智能信息处理与应用学术会议论文集.北京:中国高科技产业化研究会, 2021:339-345. [20] 刘圆圆,卜明龙,徐国庆,等.冷轧带钢表面相似线性缺陷检测[J].机械设计与制造, 2023,62(01):120-123. [23] 蒋博,万毅,谢显中.改进YOLOv5s的轻量化钢材表面缺陷检测模型[J].计算机科学, 2023,50(S2):271-277. [29] 方叶祥,甘平,陈俐.金属表面缺陷检测的改进YOLOv3算法研究[J].机械科学与技术,2020,39(09):1390-1394. [30] 耿小芬.低照度图像增强算法研究综述[J].山西电子技术,2022,68(06):86-89. [32] 张威.空间域中均值滤波与中值滤波去噪的应用研究[J].产业科技创新, 2020,2(12):65-66. [33] 郭志明,李杰,李爽,等.机器视觉技术在铸件缺陷检测中的应用[J].内燃机与动力装置,2022,39(03):91-95. [34] 左才,张勇斌,齐元胜,等.基于机器视觉的印刷品表面划痕缺陷检测[J].印刷与数字媒体技术研究,2023,(05):42-48. [35] 朱传清,郑茂溪,肖曙红,等.双边滤波在泵盖定位及缺陷检测中的应用研究[J].电子世界,2021,18(13):18-19. [38] 逢吉祥,厉丹,王玲龙等.基于机器视觉的智慧城市路面裂缝检测关键技术研究[J].电脑知识与技术,2021,17(11):174-186. [50] 李国耀,王腾.基于形态学处理与特征分析的混凝土裂缝检测研究[J].建筑结构, 2020,50(S2):529-533. [51] 孟建军,程思柳,李德仓.基于形态学处理的轨道扣件定位算法研究[J].计算机仿真, 2019,36(11):105-109+170. [53] 王冲,王洪元.基于跨场景迁移学习的行人再识别[J].计算机工程与设计,2018, 39(05):1457-1462. [54] 卢紫微,张燕,常东超,等.基于多特征分析的路面裂缝检测算法[J].控制工程, 2018,25(04):591-595. [57] 肖粲俊,潘睿志,李超,等.基于改进YOLOv5s绝缘子缺陷检测技术研究[J].电子测量技术,2022,45(24):137-144. [58] 徐洪俊,唐自强,张锦东,等.钢材表面缺陷检测的YOLOv5s算法优化研究[J].计算机工程与应用,2024,60(07):306-314. [59] 蔡联明.基于改进YOLOv5s的钢轨表面伤损检测研究[D].华东交通大学,2023. [60] 王娇娇.基于深度学习的混凝土裂缝检测研究[D].华北电力大学(北京),2023. [61] 陆维宽,周志立,阮秀凯,等.基于注意力机制与多尺度融合的PCB缺陷检测[J].无线电工程,2024,54(01):6-13. [62] 苗新法,刘宝莲,李晓琴,等.改进YOLOV5s的铁轨裂纹目标检测算法[J].计算机工程与应用,2023(08):1-11. [64] 张政超.改进YOLOv5的轻量级带钢表面缺陷检测[J].计算机系统应用,2023, 32(06):278-285. |
中图分类号: | TP391.4 |
开放日期: | 2024-06-12 |