节点文献

基于机器视觉的金属表面缺陷检测系统研究

Research on Metal Surface Defect Detection System Based on Machine Vision

【作者】 胡皓

【导师】 刘爽;

【作者基本信息】 电子科技大学 , 光学工程, 2023, 硕士

【摘要】 随着科技的进步,当前工业界的发展趋向现代化和智能化,金属加工领域也不例外。金属表面缺陷检测在金属制造加工中扮演着重要的角色,直接影响生产的质量和效率。金属制造厂商之前通常采用人工抽检方式,此方法效率低、效果差,随着生产规模的扩大已无法满足实际需要。目前,基于机器视觉的深度学习方法逐渐成为缺陷检测领域的主流,并因其良好的通用性和灵活性被广泛运用。在深度学习方法在金属表面缺陷检测领域的实际落地中,发现仍存在如下问题:金属板材表面存在反射,不同环境光条件下对系统形成一定干扰,影响了图像采集的质量;金属板材存在小目标缺陷、大尺度缺陷、易混淆缺陷等检测难度较高的缺陷,对算法特征提取能力提出了更高要求;复杂模型巨大的参数量和计算量对运算设备提出了较高要求。为解决上述问题,本文提出了一种集成高速图像采集硬件和深度学习检测算法的金属表面缺陷检测系统设计方法。本文研究内容整体分为四个部分:(1)以FPGA为核心的图像采集硬件设计,包括环形LED光源应用、OV5640图像传感器逻辑设计、DDR3高速存储器控制以及千兆以太网传输实现,最终完成支持多种模式切换的高质量图像数据采集功能。(2)基于YOLOv5l的高性能检测模型实现,包括K-means++自适应锚框算法引入、Mish激活函数替换、ASPPFCSPCG特征提取模块引入、SGD优化器及余弦退火学习率策略调整等模型结构和训练方法的优化,最终模型的精确率达到93.27%,召回率达到90.56%,帧率达到44.2fps,缺陷检测效果良好,能够有效检测小尺度和超大尺度的缺陷。(3)基于YOLOv5s的轻量化模型设计,包括轻量化Ghost Net主干网络替换、轻量级特征提取模块RFB引入以及CA注意力机制引入,大幅降低了模型参数和计算量,改善了模型对缺陷和背景的划分能力,最终模型的精确率达到89.78%,召回率达到87.20%,帧率达到238.1fps,整体计算代价大幅降低且体积极小,为其在移动端部署提供了可能同时扩展了应用前景。(4)可视化界面的设计以及系统的稳定性测试和实际测试,结果证明本系统使用便捷,在真实场景下表现良好,具备较好的研究和实用价值。

【Abstract】 As science and technology advance,the industrial sector,including the field of metal processing,is moving towards modernization and intelligence.Metal surface defect detection is very crucial for metal manufacturing and processing,as it directly affects the quality and efficiency of production.In the past,manufacturers usually relied on traditional manual sampling inspection,which was inefficient and ineffective,and could not meet the actual needs as the production scale expanded.Currently,the deep learning method based on machine vision has become the mainstream in defect detection for its high versatility and flexibility.When it comes to the actual implementation of the deep learning method in metal surface defect detection,following challenges have been found.Firstly,the metal surface is reflective,which interferes with the system performance under different ambient light conditions.As the result,the quality of acquired image becomes worse.Secondly,the metal plate has diverse defects such as tiny defects,large-scale defects and defects which is similar to the background.The various defects demand higher feature extraction ability from the algorithm.The huge number of parameters and computational complexity of sophisticated models require the equipment with sufficient computing power.To solve these problems,this paper proposes a metal surface defect detection system that integrates high-speed image acquisition hardware and excellent deep learning detection algorithm.The research context in this paper is as follows.(1)The paper designs the image acquisition hardware based on FPGA,including the design of ring LED light source,the logic design of OV5640 image sensor,the control of DDR3 high-speed memory and the implementation of Gigabit Ethernet transmission.The design of hardware guarantee the high-quality image data acquisition that supports switching of multiple modes.(2)The paper implements the high-performance model based on YOLOv5l with the optimization of model structure and training methods,such as the improvement of Kmeans++ anchor-box algorithm,the replacement of Mish activation function,the import of ASPPFCSPCG feature extraction module,the adjustment of SGD optimizer and cosine annealing learning-rate strategy,etc.Finally,The final achieves an accuracy of 93.27%,a recall rate of 90.56% and a frame rate of 44.2fps.And this model can effectively detect small-scale and large-scale defects.(3)The paper implements the lightweight model based on YOLOv5 s with several enhancements,such as the replacement of the lightweight Ghost Net backbones,the improvement of the lite RFB feature extraction module and the import of CA attention mechanism.These measures greatly reduce the model’s parameters and computation while improving its ability to distinguish between defects and background.As a result,the model achieves an accuracy of 89.78%,a recall rate of 87.20%,and a frame rate of 238.1fps.Overall,the reduces of computing costs makes it possible to deploy the model on mobile devices and expand the application prospect.(4)The system contains a software interface and is tested in interference and normal situations.The results show that the system is user-friendly and performs well in actual scene,which proves its research and practical value.

  • 【分类号】TH871;TP391.41
节点文献中: 

本文链接的文献网络图示:

本文的引文网络