基于机器视觉的零部件的缺陷检测
2021-08-09齐金龙张俊峰戴贤萍张劲松胡陟
齐金龙 张俊峰 戴贤萍 张劲松 胡陟



摘 要:汽车零部件在实际生产过程中,打磨、抛光等各种无法确定的因素会在零部件的表面留下缺陷,从而严重影响车辆的组装、制造,存在巨大的安全隐患,因此车辆零部件的缺陷检测十分重要。零部件缺陷检测已从传统的手工分类发展为基于机器视觉的方法。本文基于卷积神经网络对VGG16网络模型进行改进,提高了模型对汽车零部件缺陷的检测精度。首先,改进了网络模型的全连接层;其次,在模型中引入了AMF-Softmax损失函数,在达到更优的聚类效果的同时解决了数据不平衡问题,最终实现了零部件缺陷的识别与定位。与传统模型的缺陷检测效果比较表明,改进的VGG16网络结构模型测试准确率可以达到97.59%,在零部件缺陷检测方面具有优越性。
关键词: 机器视觉; 缺陷检测; 卷积神经网络; VGG16
文章编号: 2095-2163(2021)03-0167-05 中图分类号: R391.9 文献标志码: A
【Abstract】 In the actual production process of automobile parts, polishing, polishing and other uncertain factors will leave defects on the surface of the parts, which will seriously affect the assembly and manufacturing of vehicles, and there are huge safety risks, so the defect detection of vehicle parts is very important. Part defect detection has developed from traditional manual classification to machine vision based method. In this paper, the VGG16 network model is improved based on convolutional neural network to improve the detection accuracy of the model for automobile parts defects. Firstly, the full connection layer of the network model is improved. Secondly, AMF-Softmax loss function is introduced into the model, which solves the problem of data imbalance while achieving better clustering effect. Finally, the paper realizes the identification and location of parts defects. Compared with the traditional model, the test accuracy of the improved VGG16 network structure model can reach 97.59%, which has advantages in parts defect detection.
【Key words】 machine vision; defect detection; Convolutional neural network; VGG16
0 引 言
基于機器视觉的图像分类是根据图像特征使用算法对其进行识别,类似于人眼识别的一个过程,车辆零部件的缺陷检测是图像分类的一种应用。伴随人工智能技术的发展,提供了准确更高、识别效果更显著的缺陷检测识别分类方法。其中,2种最常用的方法是基于机器学习的支持向量机(SVM)和基于深度学习的卷积神经网络法(CNN)[1]。
国内外利用机器视觉的方法进行缺陷检测的研究也越来越多,Han等人[2]提出了基于深度学习的目标检测算法对轮毂表面缺陷检测;Liu等人[3]提出了Haar-Weibull-Variance模型,可以对钢体表面存在的缺陷进行检测;李瑶等人[4]利用CCD摄像机机器视觉系统对金属等工业生成板材表面进行在线缺陷检测。……
