摘要
由于需要通过木板表面缺陷对木板分级,而人工检测存在一定问题。为解决木板表面缺陷识别问题,提出一种融合ViT的卷积神经网络模型,用于提高缺陷识别的准确率。为此,收集裂缝、虫眼、节子和纹理4种木板表面缺陷图片,其中裂缝和虫眼图片数量远少于节子和纹理。为解决模型训练时样本不均衡问题,利用ProGAN对裂缝和虫眼图片进行训练并生成同类型缺陷图片,以增加其数量,使4种图片数量保持平衡,并在实验前对缺陷图片进行数据增强并添加椒盐噪声,整理得到所需图片数据集。基于融合ViT的卷积神经网络模型,利用数据集验证两种不同激活函数的模型,结果表明使用GELU作为激活函数的模型性能更高。并测试不同的transformer深度时模型的性能,得到的模型缺陷识别的最高准确率可达到98.54%。实验结果表明,融合ViT的卷积神经网络模型是可行的,为木板表面缺陷自动检测提供了新思路。
There are some problems in manual detection because it is necessary to grade the wood board through its surface defects.In order to solve the problem of wood surface defect recognition,a convolution neural network model integrating ViT is proposed to improve the accuracy of defect recognition.For this purpose,four kinds of wood surface defect pictures of crack,wormhole,knot and texture are collected,in which the number of crack and wormhole pictures is far less than that of knot and texture.In order to solve the problem of sample imbalance in model training,ProGAN is used to train crack and wormhole pictures and generate pictures of the same type of defects,so as to increase their number and keep the number of four kinds of pictures balanced.Before the experiment,the data of defect images are enhanced and salt and pepper noise is added to sort out the required image data set.Based on the convolutional neural network model fused with ViT,two models with different activation functions are tested by using the data set.It is found that the model using GELU as the activation function has higher performance.The model performance at different transformer depths is tested,and the highest accuracy of model defect identification can reach 98.54%.Experiments show that the convolutional neural network model fused with ViT is feasible,which provides a new idea for the automatic detection of wood surface defects.
作者
郭文龙
刘芳华
吴万毅
李冲
肖鹏
刘朝
GUO Wen-long;LIU Fang-hua;WU Wan-yi;LI Chong;XIAO Peng;LIU Chao(School of Mechanical Engineering,Jiangsu University of Science and Technology,Zhenjiang,Jiangsu 212100,China)
出处
《计算机科学》
CSCD
北大核心
2022年第S02期609-614,共6页
Computer Science
基金
国家自然科学基金青年科学基金(51905228)