WO2023236372A1 - Surface defect detection method based on image recognition - Google Patents

Surface defect detection method based on image recognition Download PDF

Info

Publication number
WO2023236372A1
WO2023236372A1 PCT/CN2022/116053 CN2022116053W WO2023236372A1 WO 2023236372 A1 WO2023236372 A1 WO 2023236372A1 CN 2022116053 W CN2022116053 W CN 2022116053W WO 2023236372 A1 WO2023236372 A1 WO 2023236372A1
Authority
WO
WIPO (PCT)
Prior art keywords
picture
image data
neural network
network model
image
Prior art date
Application number
PCT/CN2022/116053
Other languages
French (fr)
Chinese (zh)
Inventor
刘晓升
王宜怀
罗喜召
马小虎
韦雪婷
Original Assignee
苏州大学
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 苏州大学 filed Critical 苏州大学
Publication of WO2023236372A1 publication Critical patent/WO2023236372A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/54Extraction of image or video features relating to texture
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/7715Feature extraction, e.g. by transforming the feature space, e.g. multi-dimensional scaling [MDS]; Mappings, e.g. subspace methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Definitions

  • the purpose of the present invention is to provide a surface defect detection method based on picture recognition, which preprocesses the collected picture data and converts it into a number of associated picture data to form a picture data set; and uses the picture data set to perform the first preprocessing Assume that the neural network model and the second preset neural network model are trained, and the target picture is recognized and analyzed through the two neural network models to determine the object status information contained in the target picture and the surface structure defect status information of the object present in the target picture.
  • the above surface defect detection method preprocesses the collected picture data and converts it into associated picture data, which can fully enrich the types of picture data in the picture data collection and realize the neural network Comprehensive and effective training of the model enables the above method to be applied to pictures obtained under different shooting conditions, effectively extended to different picture recognition situations, and improves the accuracy and reliability of object surface defect detection.
  • Step S2 Use the picture data set to train the first preset neural network model; input the target picture into the first preset neural network model for recognition and analysis to determine the object state information contained in the target picture;
  • Step S3 Determine whether the target picture is a valid picture according to the object status information contained in the frame of the target picture; and use the picture data set to train the second preset neural network model;
  • Step S4 Input the target picture judged to be a valid picture into the second preset neural network model for identification and analysis to determine the surface structure defect status information of the object present in the target picture; and then according to the surface structure defect status information to mark the target image.
  • step S1 collecting a predetermined amount of picture data, preprocessing each picture data, thereby converting each picture data into several associated picture data specifically includes:
  • At least one of flipping preprocessing, scaling preprocessing and shearing preprocessing is performed on each image data, thereby converting each image data into several associated image data.
  • step S1 flipping preprocessing on each picture data specifically includes:
  • the image is rotated at several random angles, thereby converting the image data into several associated image data;
  • step S1 scaling preprocessing of each image data specifically includes:
  • the image corresponding to the image data is scaled by several random scaling factors, thereby converting the image data into several associated image data;
  • the shearing preprocessing of each picture data specifically includes:
  • a number of random amplitude shearing processes are performed along different boundaries of the image corresponding to the image data, thereby converting the image data into a number of associated image data.
  • step S1 forming a picture data set from a number of associated picture data corresponding to all picture data specifically includes:
  • All associated image data corresponding to each image data are randomly arranged and combined to form a corresponding image data set.
  • step S2 using the picture data set to train the first preset neural network model specifically includes:
  • the training of the first preset neural network model is completed; otherwise, a predetermined number of associated picture data is randomly selected from the picture data set to train the first preset neural network model.
  • the neural network model is trained again until the model convergence degree meets predetermined convergence conditions.
  • step S2 the target picture is input into the first preset neural network model for recognition and analysis, and it is determined that the object state information contained in the frame of the target picture specifically includes:
  • the target picture is input into the first preset neural network model that has completed training for recognition and analysis, and the type of object contained in the picture of the target picture and the total pixel area of the corresponding object in the picture are determined.
  • step S3 judging whether the target picture is a valid picture according to the object status information contained in the frame of the target picture specifically includes:
  • step S3 using the picture data set to train the second preset neural network model specifically includes:
  • the target picture judged to be a valid picture is input into the second preset neural network model for identification and analysis, and the location coordinates of the surface defect of the object present in the target picture and the shape and size of the surface defect are determined.
  • marking the target image according to the surface structure defect status information specifically includes:
  • an embodiment means that a particular feature, structure or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application.
  • the appearances of this phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those skilled in the art understand, both explicitly and implicitly, that the embodiments described herein may be combined with other embodiments.
  • An embodiment of the present application provides a surface defect detection method based on image recognition.
  • the surface defect detection method based on image recognition includes the following steps:
  • Step S1 collect a predetermined amount of picture data, preprocess each picture data, thereby converting each picture data into a number of associated picture data; then form a picture data set by forming a number of associated picture data corresponding to all the picture data;
  • the above-mentioned surface defect detection method preprocesses the collected picture data and converts it into a number of related picture data to form a picture data set; and uses the picture data set to train the first preset neural network model and the second preset neural network model. , identify and analyze the target picture through two neural network models, determine the object status information contained in the target picture and the surface structure defect status information of the objects present in the target picture, and then conduct the target picture based on the surface structure defect status information.
  • the above surface defect detection method preprocesses the collected image data and converts it into associated image data, which can fully enrich the types of image data in the image data collection and achieve comprehensive and effective training of the neural network model, making the above method applicable to different The pictures obtained under the shooting conditions can be effectively extended to different picture recognition situations to improve the accuracy and reliability of object surface defect detection.
  • step S1 a predetermined amount of picture data is collected, and each picture data is preprocessed, thereby converting each picture data into several associated picture data, specifically including:
  • At least one of flipping preprocessing, scaling preprocessing and shearing preprocessing is performed on each image data, thereby converting each image data into several associated image data.
  • each image data is separately subjected to flipping preprocessing, scaling preprocessing and shearing preprocessing, so that each image data can derive multiple associated image data respectively, thereby maximizing Enrich the type and content of image data to the maximum extent to ensure comprehensive and reliable subsequent training of neural network models.
  • step S1 performing flip preprocessing on each image data specifically includes:
  • the image is rotated at several random angles, thereby converting the image data into several associated image data;
  • step S1 scaling preprocessing of each image data specifically includes:
  • the image corresponding to the image data is scaled by several random scaling factors, thereby converting the image data into several associated image data;
  • a number of random amplitude shearing processes are performed along different boundaries of the image corresponding to the image data, thereby converting the image data into a number of associated image data.
  • the image corresponding to the image data is flipped, scaled, and cut, so that the same image data can be converted into multiple associated image data in different content forms through simple image processing operations, thereby improving the conversion of associated image data.
  • step S1 forming a picture data set from several associated picture data corresponding to all picture data specifically includes:
  • All associated image data corresponding to each image data are randomly arranged and combined to form a corresponding image data set.
  • step S2 using the picture data set to train the first preset neural network model specifically includes:
  • the target picture is input into the first preset neural network model that has completed training for recognition and analysis, and the type of object contained in the picture of the target picture and the total pixel area of the corresponding object in the picture are determined.
  • the first preset neural network model can perform outline and texture recognition of objects that always exist in the target picture, thereby determining the types of objects contained in the target picture and the total pixel area of the corresponding objects in the picture, and realizing All objects present in the target picture are comprehensively and accurately recognized and detected.
  • the object type determine whether the target picture contains a predetermined type of object; if not, determine that the target picture does not belong to a valid picture;
  • the training of the second preset neural network model is completed; otherwise, a predetermined number of associated image data is randomly selected from the image data set to train the second preset neural network model again. Training is performed until the model convergence degree meets predetermined convergence conditions.
  • the second preset neural network model is trained at least once using the picture data set as the training data source, so that the second preset neural network model can reliably identify and detect objects in the target picture.
  • the second preset neural network model can be but is not limited to YOLO v5 model.
  • the pixel sharpening process is performed on the picture area corresponding to the surface defect, and the position coordinates of the surface defect and the shape and size related information of the surface defect are added to the picture area corresponding to the surface defect.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Software Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • Databases & Information Systems (AREA)
  • Medical Informatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Molecular Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Quality & Reliability (AREA)
  • Image Analysis (AREA)

Abstract

A surface defect detection method based on image recognition, characterized by: preprocessing collected image data to convert into a plurality of pieces of associated image data so as to form an image data set; training a first preset neural network model and a second preset neural network model by using the image data set, recognizing and analyzing a target image by means of the two neural network models to determine object state information comprised in a picture of the target image and surface structure defect state information of an object existing in the target image, and marking the target image according to the surface structure defect state information. According to the surface defect detection method, the collected image data is preprocessed to convert into the associated image data, such that the type of the image data in the image data set can be fully enriched, and comprehensive and effective training of the neural network models is achieved. The method can be suitable for images obtained under different photographing conditions, such that the accuracy and reliability of object surface defect detection are improved.

Description

基于图片识别的表面缺陷检测方法Surface defect detection method based on image recognition 技术领域Technical field
本发明涉及图片识别领域,尤其涉及一种基于图片识别的表面缺陷检测方法。The invention relates to the field of image recognition, and in particular to a surface defect detection method based on image recognition.
背景技术Background technique
目前,在工业生产中,已经普遍使用产品检测算法对工业生产产品对应的图片进行分析处理,得到产品的表面结构状态,从而判断产品的质量高低。At present, in industrial production, product detection algorithms have been commonly used to analyze and process pictures corresponding to industrial production products to obtain the surface structure status of the product, thereby judging the quality of the product.
技术问题technical problem
现有的产品检测算法只能针对特定状态的图片进行分析,即其对于工业生产产品的拍摄提出了较高的要求,无法对推广应用到任意的工业生产场合中,从而无法提高对工业生产产品的表面缺陷检测准确性,降低工业生产的质量品质和稳定性。Existing product detection algorithms can only analyze pictures of specific states, that is, they put forward higher requirements for the photography of industrial production products, and cannot be promoted and applied to any industrial production occasions, thus failing to improve the detection of industrial production products. The accuracy of surface defect detection reduces the quality and stability of industrial production.
技术解决方案Technical solutions
本发明的目的在于提供一种基于图片识别的表面缺陷检测方法,其对收集的图片数据进行预处理,转换得到若干关联图片数据,以此形成图片数据集合;并利用图片数据集合对第一预设神经网络模型和第二预设神经网络模型训练,通过两个神经网络模型对目标图片进行识别分析,确定目标图片的画面包含的物体状态信息以及目标图片中存在的物体的表面结构缺陷状态信息,再根据表面结构缺陷状态信息,对目标图片进行标记;上述表面缺陷检测方法将收集到的图片数据预处理转换成关联图片数据,能够充分丰富图片数据集合中图片数据的类型,实现对神经网络模型的全面有效训练,使得上述方法能够适用于不同拍摄条件得到的图片,有效推广到不同图片识别场合中,提高对物体表面缺陷检测的准确性和可靠性。The purpose of the present invention is to provide a surface defect detection method based on picture recognition, which preprocesses the collected picture data and converts it into a number of associated picture data to form a picture data set; and uses the picture data set to perform the first preprocessing Assume that the neural network model and the second preset neural network model are trained, and the target picture is recognized and analyzed through the two neural network models to determine the object status information contained in the target picture and the surface structure defect status information of the object present in the target picture. , and then mark the target picture according to the surface structure defect status information; the above surface defect detection method preprocesses the collected picture data and converts it into associated picture data, which can fully enrich the types of picture data in the picture data collection and realize the neural network Comprehensive and effective training of the model enables the above method to be applied to pictures obtained under different shooting conditions, effectively extended to different picture recognition situations, and improves the accuracy and reliability of object surface defect detection.
本发明的目的是通过以下技术方案实现: The purpose of the present invention is achieved through the following technical solutions:
一种基于图片识别的表面缺陷检测方法,包括如下步骤:A surface defect detection method based on image recognition, including the following steps:
步骤S1,收集预定数量的图片数据,对每个图片数据进行预处理,从而将每个图片数据转换为若干关联图片数据;再将所有图片数据各自对应的若干关联图片数据形成图片数据集合;Step S1, collect a predetermined amount of picture data, preprocess each picture data, thereby converting each picture data into a number of associated picture data; then form a picture data set by forming a number of associated picture data corresponding to all the picture data;
步骤S2,利用所述图片数据集合,对第一预设神经网络模型进行训练;将目标图片输入到第一预设神经网络模型进行识别分析,确定所述目标图片的画面包含的物体状态信息;Step S2: Use the picture data set to train the first preset neural network model; input the target picture into the first preset neural network model for recognition and analysis to determine the object state information contained in the target picture;
步骤S3,根据所述目标图片的画面包含的物体状态信息,判断所述目标图片是否属于有效图片;并利用所述图片数据集合,对第二预设神经网络模型进行训练;Step S3: Determine whether the target picture is a valid picture according to the object status information contained in the frame of the target picture; and use the picture data set to train the second preset neural network model;
步骤S4,将被判断为属于有效图片的目标图片输入到第二预设神经网络模型进行识别分析,确定所述目标图片中存在的物体的表面结构缺陷状态信息;再根据所述表面结构缺陷状态信息,对所述目标图片进行标记。Step S4: Input the target picture judged to be a valid picture into the second preset neural network model for identification and analysis to determine the surface structure defect status information of the object present in the target picture; and then according to the surface structure defect status information to mark the target image.
在其中一实施例中,在所述步骤S1中,收集预定数量的图片数据,对每个图片数据进行预处理,从而将每个图片数据转换为若干关联图片数据具体包括:In one embodiment, in step S1, collecting a predetermined amount of picture data, preprocessing each picture data, thereby converting each picture data into several associated picture data specifically includes:
收集不少于200个的图片数据,其中收集的每个图片数据分别具有不同的图像亮度、对比度和色度;Collect no less than 200 image data, each of which has different image brightness, contrast and chroma;
对每个图片数据进行翻转预处理、缩放预处理和剪切预处理中的至少一种,从而将每个图片数据转换为若干关联图片数据。At least one of flipping preprocessing, scaling preprocessing and shearing preprocessing is performed on each image data, thereby converting each image data into several associated image data.
在其中一实施例中,在所述步骤S1中,对每个图片数据进行翻转预处理具体包括:In one embodiment, in step S1, flipping preprocessing on each picture data specifically includes:
以图片数据对应的图像中的某一像素点为旋转中心点,对图像进行若干随机角度的旋转,从而将图片数据转换为若干关联图片数据;Using a certain pixel in the image corresponding to the image data as the rotation center point, the image is rotated at several random angles, thereby converting the image data into several associated image data;
或者,or,
在所述步骤S1中,对每个图片数据进行缩放预处理具体包括:In step S1, scaling preprocessing of each image data specifically includes:
对图片数据对应的图像进行若干随机缩放倍数的缩放处理,从而将图片数据转换为若干关联图片数据;The image corresponding to the image data is scaled by several random scaling factors, thereby converting the image data into several associated image data;
或者,or,
在所述步骤S1中,对每个图片数据进行剪切预处理具体包括:In the step S1, the shearing preprocessing of each picture data specifically includes:
沿着图片数据对应的图像的不同边界进行若干随机幅度的剪切处理,从而将图片数据转换为若干关联图片数据。A number of random amplitude shearing processes are performed along different boundaries of the image corresponding to the image data, thereby converting the image data into a number of associated image data.
在其中一实施例中,在所述步骤S1中,将所有图片数据各自对应的若干关联图片数据形成图片数据集合具体包括:In one embodiment, in step S1, forming a picture data set from a number of associated picture data corresponding to all picture data specifically includes:
将每个图片数据各自对应的所有关联图片数据进行随机排列组合后,形成相应的图片数据集合。All associated image data corresponding to each image data are randomly arranged and combined to form a corresponding image data set.
在其中一实施例中,在所述步骤S2中,利用所述图片数据集合,对第一预设神经网络模型进行训练具体包括:In one embodiment, in step S2, using the picture data set to train the first preset neural network model specifically includes:
从所述图片数据集合中随机选取预定数量的关联图片数据,并将选取的关联图片数据输入到第一预设神经网络模型进行训练,从而确定训练后的第一预设神经网络模型的模型收敛程度;Randomly select a predetermined number of associated image data from the image data set, and input the selected associated image data into the first preset neural network model for training, thereby determining model convergence of the trained first preset neural network model. degree;
若所述模型收敛程度满足预定收敛条件,则完成对第一预设神经网络模型的训练;否则,重新从所述图片数据集合中随机选取预定数量的关联图片数据,以此对第一预设神经网络模型再次进行训练,直到所述模型收敛程度满足预定收敛条件为止。If the convergence degree of the model meets the predetermined convergence condition, then the training of the first preset neural network model is completed; otherwise, a predetermined number of associated picture data is randomly selected from the picture data set to train the first preset neural network model. The neural network model is trained again until the model convergence degree meets predetermined convergence conditions.
在其中一实施例中,在所述步骤S2中,将目标图片输入到第一预设神经网络模型进行识别分析,确定所述目标图片的画面包含的物体状态信息具体包括:In one embodiment, in step S2, the target picture is input into the first preset neural network model for recognition and analysis, and it is determined that the object state information contained in the frame of the target picture specifically includes:
将目标图片输入到完成训练的第一预设神经网络模型中进行识别分析,确定所述目标图片的画面包含的物体类型以及对应物体在画面中的像素总面积。The target picture is input into the first preset neural network model that has completed training for recognition and analysis, and the type of object contained in the picture of the target picture and the total pixel area of the corresponding object in the picture are determined.
在其中一实施例中,在所述步骤S3中,根据所述目标图片的画面包含的物体状态信息,判断所述目标图片是否属于有效图片具体包括:In one embodiment, in step S3, judging whether the target picture is a valid picture according to the object status information contained in the frame of the target picture specifically includes:
根据所述物体类型,判断所述目标图片的画面是否包含预定类型的物体;若不包含,则确定所述目标图片不属于有效图片;According to the object type, determine whether the target picture contains an object of a predetermined type; if not, determine that the target picture does not belong to a valid picture;
若包含,则判断对应物体在画面中的像素总面积是否大于预设面积阈值;若是,则确定所述目标图片属于有效图片;若否,则确定所述目标图片不属于有效图片。If included, it is determined whether the total pixel area of the corresponding object in the picture is greater than the preset area threshold; if so, it is determined that the target picture is a valid picture; if not, it is determined that the target picture is not a valid picture.
在其中一实施例中,在所述步骤S3中,利用所述图片数据集合,对第二预设神经网络模型进行训练具体包括:In one embodiment, in step S3, using the picture data set to train the second preset neural network model specifically includes:
从所述图片数据集合中随机选取预定数量的关联图片数据,并将选取的关联图片数据输入到第二预设神经网络模型进行训练,从而确定训练后的第二预设神经网络模型的模型收敛程度;Randomly select a predetermined number of associated image data from the image data set, and input the selected associated image data into the second preset neural network model for training, thereby determining model convergence of the trained second preset neural network model. degree;
若所述模型收敛程度满足预定收敛条件,则完成对第二预设神经网络模型的训练;否则,重新从所述图片数据集合中随机选取预定数量的关联图片数据,以此对第二预设神经网络模型再次进行训练,直到所述模型收敛程度满足预定收敛条件为止。If the convergence degree of the model meets the predetermined convergence condition, then the training of the second preset neural network model is completed; otherwise, a predetermined number of associated picture data is randomly selected from the picture data set to train the second preset neural network model. The neural network model is trained again until the model convergence degree meets predetermined convergence conditions.
在其中一实施例中,在所述步骤S4中,将被判断为属于有效图片的目标图片输入到第二预设神经网络模型进行识别分析,确定所述目标图片中存在的物体的表面结构缺陷状态信息具体包括:In one embodiment, in step S4, the target picture judged to be a valid picture is input to the second preset neural network model for identification and analysis to determine the surface structure defects of the object present in the target picture. Status information specifically includes:
将被判断为属于有效图片的目标图片输入到第二预设神经网络模型进行识别分析,确定所述目标图片中存在的物体的表面缺陷所在位置坐标以及表面缺陷形状与尺寸。The target picture judged to be a valid picture is input into the second preset neural network model for identification and analysis, and the location coordinates of the surface defect of the object present in the target picture and the shape and size of the surface defect are determined.
在其中一实施例中,在所述步骤S4中,根据所述表面结构缺陷状态信息,对所述目标图片进行标记具体包括:In one embodiment, in step S4, marking the target image according to the surface structure defect status information specifically includes:
在所述目标图片中对表面缺陷对应存在的画面区域进行像素锐化处理,以及对表面缺陷对应存在的画面区域增加表面缺陷所在位置坐标以及表面缺陷形状与尺寸关联信息。In the target image, pixel sharpening is performed on the picture area corresponding to the surface defect, and the location coordinates of the surface defect and the shape and size related information of the surface defect are added to the picture area corresponding to the surface defect.
有益效果beneficial effects
与现有技术相比,本发明具有如下有益效果:Compared with the prior art, the present invention has the following beneficial effects:
本申请提供的基于图片识别的表面缺陷检测方法对收集的图片数据进行预处理,转换得到若干关联图片数据,以此形成图片数据集合;并利用图片数据集合对第一预设神经网络模型和第二预设神经网络模型训练,通过两个神经网络模型对目标图片进行识别分析,确定目标图片的画面包含的物体状态信息以及目标图片中存在的物体的表面结构缺陷状态信息,再根据表面结构缺陷状态信息,对目标图片进行标记;上述表面缺陷检测方法将收集到的图片数据预处理转换成关联图片数据,能够充分丰富图片数据集合中图片数据的类型,实现对神经网络模型的全面有效训练,使得上述方法能够适用于不同拍摄条件得到的图片,有效推广到不同图片识别场合中,提高对物体表面缺陷检测的准确性和可靠性。The surface defect detection method based on image recognition provided by this application preprocesses the collected image data and converts it to obtain a number of associated image data to form a image data set; and uses the image data set to compare the first preset neural network model and the third Two preset neural network models are trained to identify and analyze the target picture through two neural network models, determine the object status information contained in the target picture and the surface structure defect status information of the object present in the target picture, and then based on the surface structure defects status information to mark the target image; the above surface defect detection method preprocesses the collected image data and converts it into associated image data, which can fully enrich the types of image data in the image data collection and achieve comprehensive and effective training of the neural network model. This enables the above method to be applied to pictures obtained under different shooting conditions, effectively extended to different picture recognition situations, and improves the accuracy and reliability of object surface defect detection.
附图说明Description of the drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。其中:In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without exerting creative efforts. in:
图1是本申请提供的基于图片识别的表面缺陷检测方法的流程示意图。Figure 1 is a schematic flow chart of the surface defect detection method based on image recognition provided by this application.
本发明的实施方式Embodiments of the invention
为使本申请的上述目的、特征和优点能够更为明显易懂,下面结合附图,对本申请的具体实施方式做详细的说明。可以理解的是,此处所描述的具体实施例仅用于解释本申请,而非对本申请的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本申请相关的部分而非全部结构。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本申请保护的范围。In order to make the above objects, features and advantages of the present application more obvious and easy to understand, the specific implementation modes of the present application will be described in detail below with reference to the accompanying drawings. It can be understood that the specific embodiments described here are only used to explain the present application, but not to limit the present application. In addition, it should be noted that, for convenience of description, only some but not all structures related to the present application are shown in the drawings. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of this application.
本申请中的术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "including" and "having" and any variations thereof in this application are intended to cover a non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes Other steps or units inherent to such processes, methods, products or devices.
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。Reference herein to "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application. The appearances of this phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those skilled in the art understand, both explicitly and implicitly, that the embodiments described herein may be combined with other embodiments.
请参阅图1所示,本申请一实施例提供的基于图片识别的表面缺陷检测方法,基于图片识别的表面缺陷检测方法包括如下步骤:Please refer to FIG. 1 . An embodiment of the present application provides a surface defect detection method based on image recognition. The surface defect detection method based on image recognition includes the following steps:
步骤S1,收集预定数量的图片数据,对每个图片数据进行预处理,从而将每个图片数据转换为若干关联图片数据;再将所有图片数据各自对应的若干关联图片数据形成图片数据集合;Step S1, collect a predetermined amount of picture data, preprocess each picture data, thereby converting each picture data into a number of associated picture data; then form a picture data set by forming a number of associated picture data corresponding to all the picture data;
步骤S2,利用图片数据集合,对第一预设神经网络模型进行训练;将目标图片输入到第一预设神经网络模型进行识别分析,确定目标图片的画面包含的物体状态信息;Step S2, use the picture data set to train the first preset neural network model; input the target picture into the first preset neural network model for recognition and analysis to determine the object state information contained in the target picture;
步骤S3,根据目标图片的画面包含的物体状态信息,判断目标图片是否属于有效图片;并利用图片数据集合,对第二预设神经网络模型进行训练;Step S3: Determine whether the target picture is a valid picture based on the object status information contained in the frame of the target picture; and use the picture data set to train the second preset neural network model;
步骤S4,将被判断为属于有效图片的目标图片输入到第二预设神经网络模型进行识别分析,确定目标图片中存在的物体的表面结构缺陷状态信息;再根据表面结构缺陷状态信息,对目标图片进行标记。Step S4: Input the target picture that is judged to be a valid picture into the second preset neural network model for identification and analysis to determine the surface structure defect status information of the object present in the target picture; then, based on the surface structure defect status information, the target Pictures are tagged.
上述表面缺陷检测方法对收集的图片数据进行预处理,转换得到若干关联图片数据,以此形成图片数据集合;并利用图片数据集合对第一预设神经网络模型和第二预设神经网络模型训练,通过两个神经网络模型对目标图片进行识别分析,确定目标图片的画面包含的物体状态信息以及目标图片中存在的物体的表面结构缺陷状态信息,再根据表面结构缺陷状态信息,对目标图片进行标记;上述表面缺陷检测方法将收集到的图片数据预处理转换成关联图片数据,能够充分丰富图片数据集合中图片数据的类型,实现对神经网络模型的全面有效训练,使得上述方法能够适用于不同拍摄条件得到的图片,有效推广到不同图片识别场合中,提高对物体表面缺陷检测的准确性和可靠性。The above-mentioned surface defect detection method preprocesses the collected picture data and converts it into a number of related picture data to form a picture data set; and uses the picture data set to train the first preset neural network model and the second preset neural network model. , identify and analyze the target picture through two neural network models, determine the object status information contained in the target picture and the surface structure defect status information of the objects present in the target picture, and then conduct the target picture based on the surface structure defect status information. mark; the above surface defect detection method preprocesses the collected image data and converts it into associated image data, which can fully enrich the types of image data in the image data collection and achieve comprehensive and effective training of the neural network model, making the above method applicable to different The pictures obtained under the shooting conditions can be effectively extended to different picture recognition situations to improve the accuracy and reliability of object surface defect detection.
可选地,在步骤S1中,收集预定数量的图片数据,对每个图片数据进行预处理,从而将每个图片数据转换为若干关联图片数据具体包括:Optionally, in step S1, a predetermined amount of picture data is collected, and each picture data is preprocessed, thereby converting each picture data into several associated picture data, specifically including:
收集不少于200个的图片数据,其中收集的每个图片数据分别具有不同的图像亮度、对比度和色度;Collect no less than 200 image data, each of which has different image brightness, contrast and chroma;
对每个图片数据进行翻转预处理、缩放预处理和剪切预处理中的至少一种,从而将每个图片数据转换为若干关联图片数据。At least one of flipping preprocessing, scaling preprocessing and shearing preprocessing is performed on each image data, thereby converting each image data into several associated image data.
通过上述方式,以收集得到的图片数据为基础,对每个图片数据分别进行翻转预处理、缩放预处理和剪切预处理,这样每个图片数据能够分别衍生得到多个关联图片数据,从而最大限度丰富图片数据的类型和内容,保证后续对神经网络模型进行全面可靠的训练。Through the above method, based on the collected image data, each image data is separately subjected to flipping preprocessing, scaling preprocessing and shearing preprocessing, so that each image data can derive multiple associated image data respectively, thereby maximizing Enrich the type and content of image data to the maximum extent to ensure comprehensive and reliable subsequent training of neural network models.
可选地,在步骤S1中,对每个图片数据进行翻转预处理具体包括:Optionally, in step S1, performing flip preprocessing on each image data specifically includes:
以图片数据对应的图像中的某一像素点为旋转中心点,对图像进行若干随机角度的旋转,从而将图片数据转换为若干关联图片数据;Using a certain pixel in the image corresponding to the image data as the rotation center point, the image is rotated at several random angles, thereby converting the image data into several associated image data;
或者,or,
在步骤S1中,对每个图片数据进行缩放预处理具体包括:In step S1, scaling preprocessing of each image data specifically includes:
对图片数据对应的图像进行若干随机缩放倍数的缩放处理,从而将图片数据转换为若干关联图片数据;The image corresponding to the image data is scaled by several random scaling factors, thereby converting the image data into several associated image data;
或者,or,
在步骤S1中,对每个图片数据进行剪切预处理具体包括:In step S1, the shearing preprocessing of each image data specifically includes:
沿着图片数据对应的图像的不同边界进行若干随机幅度的剪切处理,从而将图片数据转换为若干关联图片数据。A number of random amplitude shearing processes are performed along different boundaries of the image corresponding to the image data, thereby converting the image data into a number of associated image data.
通过上述方式,对图片数据对应的图像进行翻转、缩放、剪切,这样能够通过简单的图像处理操作,将同一图片数据转换成多个不同内容形式的关联图片数据,从而提高关联图片数据的转换效率和保证图片数据集合的图片种类多样化。Through the above method, the image corresponding to the image data is flipped, scaled, and cut, so that the same image data can be converted into multiple associated image data in different content forms through simple image processing operations, thereby improving the conversion of associated image data. Efficiency and ensuring diverse image types in image data collections.
可选地,在步骤S1中,将所有图片数据各自对应的若干关联图片数据形成图片数据集合具体包括:Optionally, in step S1, forming a picture data set from several associated picture data corresponding to all picture data specifically includes:
将每个图片数据各自对应的所有关联图片数据进行随机排列组合后,形成相应的图片数据集合。All associated image data corresponding to each image data are randomly arranged and combined to form a corresponding image data set.
通过上述方式,将每个图片数据各自对应的所有关联图片数据进行随机排列组合后,有效避免图片数据集合中同源于同一图片数据的关联图片数据过度聚集而不利于后续对神经网络模型的训练可靠性。Through the above method, after randomly arranging and combining all associated image data corresponding to each image data, it can effectively avoid excessive aggregation of associated image data originating from the same image data in the image data set, which is not conducive to subsequent training of the neural network model. reliability.
可选地,在步骤S2中,利用图片数据集合,对第一预设神经网络模型进行训练具体包括:Optionally, in step S2, using the picture data set to train the first preset neural network model specifically includes:
从图片数据集合中随机选取预定数量的关联图片数据,并将选取的关联图片数据输入到第一预设神经网络模型进行训练,从而确定训练后的第一预设神经网络模型的模型收敛程度;Randomly select a predetermined number of associated image data from the image data set, and input the selected associated image data into the first preset neural network model for training, thereby determining the degree of model convergence of the trained first preset neural network model;
若模型收敛程度满足预定收敛条件,则完成对第一预设神经网络模型的训练;否则,重新从图片数据集合中随机选取预定数量的关联图片数据,以此对第一预设神经网络模型再次进行训练,直到模型收敛程度满足预定收敛条件为止。If the convergence degree of the model meets the predetermined convergence conditions, the training of the first preset neural network model is completed; otherwise, a predetermined number of associated picture data is randomly selected from the picture data set to train the first preset neural network model again. Training is performed until the model convergence degree meets predetermined convergence conditions.
通过上述方式,以图片数据集合为训练数据来源,对第一预设神经网络模型进行至少一次的训练,这样使得第一预设神经网络模型能够对目标图片中的物体进行可靠的识别检测。其中,第一预设神经网络模型可为但不限于是Inception v4模型。In the above manner, the first preset neural network model is trained at least once using the picture data set as the training data source, so that the first preset neural network model can reliably identify and detect objects in the target picture. Among them, the first preset neural network model may be but is not limited to Inception v4 model.
可选地,在步骤S2中,将目标图片输入到第一预设神经网络模型进行识别分析,确定目标图片的画面包含的物体状态信息具体包括:Optionally, in step S2, the target picture is input into the first preset neural network model for recognition and analysis, and it is determined that the object state information contained in the target picture specifically includes:
将目标图片输入到完成训练的第一预设神经网络模型中进行识别分析,确定目标图片的画面包含的物体类型以及对应物体在画面中的像素总面积。The target picture is input into the first preset neural network model that has completed training for recognition and analysis, and the type of object contained in the picture of the target picture and the total pixel area of the corresponding object in the picture are determined.
通过上述方式,第一预设神经网络模型能够对目标图片的画面总存在的物体进行轮廓和纹理识别,从而确定目标图片的画面包含的物体类型以及对应物体在画面中的像素总面积,实现对目标图片画面中存在的所有物体进行全面准确的识别检测。Through the above method, the first preset neural network model can perform outline and texture recognition of objects that always exist in the target picture, thereby determining the types of objects contained in the target picture and the total pixel area of the corresponding objects in the picture, and realizing All objects present in the target picture are comprehensively and accurately recognized and detected.
可选地,在步骤S3中,根据目标图片的画面包含的物体状态信息,判断目标图片是否属于有效图片具体包括:Optionally, in step S3, judging whether the target picture is a valid picture according to the object status information contained in the frame of the target picture specifically includes:
根据物体类型,判断目标图片的画面是否包含预定类型的物体;若不包含,则确定目标图片不属于有效图片;According to the object type, determine whether the target picture contains a predetermined type of object; if not, determine that the target picture does not belong to a valid picture;
若包含,则判断对应物体在画面中的像素总面积是否大于预设面积阈值;若是,则确定目标图片属于有效图片;若否,则确定目标图片不属于有效图片。If included, determine whether the total pixel area of the corresponding object in the picture is greater than the preset area threshold; if so, determine that the target picture is a valid picture; if not, determine that the target picture is not a valid picture.
通过上述方式,当目标图片的画面包含预定类型的物体以及对应物体在画面中的像素总面积大于预设面积阈值,表明目标图片中存在的物体具有充足的像素面积进行表面缺陷的检测,这样能够保证后续进行物体表面缺陷检测的可信度。Through the above method, when the target picture contains a predetermined type of object and the total pixel area of the corresponding object in the picture is greater than the preset area threshold, it indicates that the object existing in the target picture has sufficient pixel area for surface defect detection, which can Ensure the reliability of subsequent object surface defect detection.
可选地,在步骤S3中,利用图片数据集合,对第二预设神经网络模型进行训练具体包括:Optionally, in step S3, using the picture data set to train the second preset neural network model specifically includes:
从图片数据集合中随机选取预定数量的关联图片数据,并将选取的关联图片数据输入到第二预设神经网络模型进行训练,从而确定训练后的第二预设神经网络模型的模型收敛程度;Randomly select a predetermined number of associated image data from the image data set, and input the selected associated image data into the second preset neural network model for training, thereby determining the degree of model convergence of the trained second preset neural network model;
若模型收敛程度满足预定收敛条件,则完成对第二预设神经网络模型的训练;否则,重新从图片数据集合中随机选取预定数量的关联图片数据,以此对第二预设神经网络模型再次进行训练,直到模型收敛程度满足预定收敛条件为止。If the convergence degree of the model meets the predetermined convergence conditions, the training of the second preset neural network model is completed; otherwise, a predetermined number of associated image data is randomly selected from the image data set to train the second preset neural network model again. Training is performed until the model convergence degree meets predetermined convergence conditions.
通过上述方式,以图片数据集合为训练数据来源,对第二预设神经网络模型进行至少一次的训练,这样使得第二预设神经网络模型能够对目标图片中的物体进行可靠的识别检测。其中,第二预设神经网络模型可为但不限于是YOLO v5模型。In the above manner, the second preset neural network model is trained at least once using the picture data set as the training data source, so that the second preset neural network model can reliably identify and detect objects in the target picture. Among them, the second preset neural network model can be but is not limited to YOLO v5 model.
可选地,在步骤S4中,将被判断为属于有效图片的目标图片输入到第二预设神经网络模型进行识别分析,确定目标图片中存在的物体的表面结构缺陷状态信息具体包括:Optionally, in step S4, the target picture judged to be a valid picture is input into the second preset neural network model for identification and analysis. Determining the surface structure defect status information of the object present in the target picture specifically includes:
将被判断为属于有效图片的目标图片输入到第二预设神经网络模型进行识别分析,确定目标图片中存在的物体的表面缺陷所在位置坐标以及表面缺陷形状与尺寸。The target picture judged to be a valid picture is input into the second preset neural network model for identification and analysis, and the position coordinates of the surface defect of the object present in the target picture and the shape and size of the surface defect are determined.
通过上述方式,第二预设神经网络模型能够对目标图片画面中物体表面在色度、亮度和对比度等方面存在差异的表面区域进行提取,从而作为判断物体表面存在的缺陷区域,并进一步对提取得到的表面区域进行像素层面的识别分析,从而确定目标图片中存在的物体的表面缺陷所在位置坐标以及表面缺陷形状与尺寸。Through the above method, the second preset neural network model can extract surface areas with differences in chromaticity, brightness, contrast, etc. on the surface of the object in the target picture, so as to determine the defect areas present on the surface of the object, and further extract The obtained surface area is identified and analyzed at the pixel level to determine the location coordinates of the surface defects of the object present in the target picture, as well as the shape and size of the surface defects.
可选地,在步骤S4中,根据表面结构缺陷状态信息,对目标图片进行标记具体包括:Optionally, in step S4, marking the target image according to the surface structure defect status information specifically includes:
在目标图片中对表面缺陷对应存在的画面区域进行像素锐化处理,以及对表面缺陷对应存在的画面区域增加表面缺陷所在位置坐标以及表面缺陷形状与尺寸关联信息。In the target image, the pixel sharpening process is performed on the picture area corresponding to the surface defect, and the position coordinates of the surface defect and the shape and size related information of the surface defect are added to the picture area corresponding to the surface defect.
通过上述方式,在目标图片中对表面缺陷对应存在的画面区域进行像素锐化处理,能够对表面缺陷所在的区域进行像素强化表征;此外。对表面缺陷对应存在的画面区域增加表面缺陷所在位置坐标以及表面缺陷形状与尺寸关联信息,这样便于直观和准确地确定表面缺陷的实际状态。Through the above method, pixel sharpening processing is performed on the image area corresponding to the surface defect in the target image, and the pixel enhanced characterization of the area where the surface defect is located can be performed; in addition. Add the location coordinates of the surface defect and the associated information on the shape and size of the surface defect to the picture area corresponding to the surface defect, so that the actual state of the surface defect can be determined intuitively and accurately.
上述仅为本发明的一个具体实施方式,其它基于本发明构思的前提下做出的任何改进都视为本发明的保护范围。The above is only a specific embodiment of the present invention, and any other improvements made based on the concept of the present invention are deemed to be within the protection scope of the present invention.

Claims (10)

  1. 一种基于图片识别的表面缺陷检测方法,其特征在于,包括如下步骤:A surface defect detection method based on image recognition, which is characterized by including the following steps:
    步骤S1,收集预定数量的图片数据,对每个图片数据进行预处理,从而将每个图片数据转换为若干关联图片数据;再将所有图片数据各自对应的若干关联图片数据形成图片数据集合;Step S1, collect a predetermined amount of picture data, preprocess each picture data, thereby converting each picture data into a number of associated picture data; then form a picture data set by forming a number of associated picture data corresponding to all the picture data;
    步骤S2,利用所述图片数据集合,对第一预设神经网络模型进行训练;将目标图片输入到第一预设神经网络模型进行识别分析,确定所述目标图片的画面包含的物体状态信息;Step S2: Use the picture data set to train the first preset neural network model; input the target picture into the first preset neural network model for recognition and analysis to determine the object state information contained in the target picture;
    步骤S3,根据所述目标图片的画面包含的物体状态信息,判断所述目标图片是否属于有效图片;并利用所述图片数据集合,对第二预设神经网络模型进行训练;Step S3: Determine whether the target picture is a valid picture according to the object status information contained in the frame of the target picture; and use the picture data set to train the second preset neural network model;
    步骤S4,将被判断为属于有效图片的目标图片输入到第二预设神经网络模型进行识别分析,确定所述目标图片中存在的物体的表面结构缺陷状态信息;再根据所述表面结构缺陷状态信息,对所述目标图片进行标记。Step S4: Input the target picture judged to be a valid picture into the second preset neural network model for identification and analysis to determine the surface structure defect status information of the object present in the target picture; and then according to the surface structure defect status information to mark the target image.
  2. 根据权利要求1所述的基于图片识别的表面缺陷检测方法,其特征在于,The surface defect detection method based on image recognition according to claim 1, characterized in that:
    在所述步骤S1中,收集预定数量的图片数据,对每个图片数据进行预处理,从而将每个图片数据转换为若干关联图片数据具体包括:In the step S1, a predetermined amount of picture data is collected, each picture data is preprocessed, and each picture data is converted into several associated picture data, which specifically includes:
    收集不少于200个的图片数据,其中收集的每个图片数据分别具有不同的图像亮度、对比度和色度;Collect no less than 200 image data, each of which has different image brightness, contrast and chroma;
    对每个图片数据进行翻转预处理、缩放预处理和剪切预处理中的至少一种,从而将每个图片数据转换为若干关联图片数据。At least one of flipping preprocessing, scaling preprocessing and shearing preprocessing is performed on each image data, thereby converting each image data into several associated image data.
  3. 根据权利要求2所述的基于图片识别的表面缺陷检测方法,其特征在于,The surface defect detection method based on image recognition according to claim 2, characterized in that:
    在所述步骤S1中,对每个图片数据进行翻转预处理具体包括:In step S1, flipping preprocessing of each picture data specifically includes:
    以图片数据对应的图像中的某一像素点为旋转中心点,对图像进行若干随机角度的旋转,从而将图片数据转换为若干关联图片数据;Using a certain pixel in the image corresponding to the image data as the rotation center point, the image is rotated at several random angles, thereby converting the image data into several associated image data;
    或者,or,
    在所述步骤S1中,对每个图片数据进行缩放预处理具体包括:In step S1, scaling preprocessing of each image data specifically includes:
    对图片数据对应的图像进行若干随机缩放倍数的缩放处理,从而将图片数据转换为若干关联图片数据;The image corresponding to the image data is scaled by several random scaling factors, thereby converting the image data into several associated image data;
    或者,or,
    在所述步骤S1中,对每个图片数据进行剪切预处理具体包括:In the step S1, the shearing preprocessing of each picture data specifically includes:
    沿着图片数据对应的图像的不同边界进行若干随机幅度的剪切处理,从而将图片数据转换为若干关联图片数据。A number of random amplitude shearing processes are performed along different boundaries of the image corresponding to the image data, thereby converting the image data into a number of associated image data.
  4. 根据权利要求3所述的基于图片识别的表面缺陷检测方法,其特征在于,The surface defect detection method based on image recognition according to claim 3, characterized in that:
    在所述步骤S1中,将所有图片数据各自对应的若干关联图片数据形成图片数据集合具体包括:In the step S1, forming a picture data set from several associated picture data corresponding to all picture data specifically includes:
    将每个图片数据各自对应的所有关联图片数据进行随机排列组合后,形成相应的图片数据集合。All associated image data corresponding to each image data are randomly arranged and combined to form a corresponding image data set.
  5. 根据权利要求4所述的基于图片识别的表面缺陷检测方法,其特征在于,The surface defect detection method based on image recognition according to claim 4, characterized in that:
    在所述步骤S2中,利用所述图片数据集合,对第一预设神经网络模型进行训练具体包括:In step S2, using the picture data set to train the first preset neural network model specifically includes:
    从所述图片数据集合中随机选取预定数量的关联图片数据,并将选取的关联图片数据输入到第一预设神经网络模型进行训练,从而确定训练后的第一预设神经网络模型的模型收敛程度;Randomly select a predetermined number of associated image data from the image data set, and input the selected associated image data into the first preset neural network model for training, thereby determining model convergence of the trained first preset neural network model. degree;
    若所述模型收敛程度满足预定收敛条件,则完成对第一预设神经网络模型的训练;否则,重新从所述图片数据集合中随机选取预定数量的关联图片数据,以此对第一预设神经网络模型再次进行训练,直到所述模型收敛程度满足预定收敛条件为止。If the convergence degree of the model meets the predetermined convergence condition, then the training of the first preset neural network model is completed; otherwise, a predetermined number of associated picture data is randomly selected from the picture data set to train the first preset neural network model. The neural network model is trained again until the model convergence degree meets predetermined convergence conditions.
  6. 根据权利要求5所述的基于图片识别的表面缺陷检测方法,其特征在于,The surface defect detection method based on image recognition according to claim 5, characterized in that:
    在所述步骤S2中,将目标图片输入到第一预设神经网络模型进行识别分析,确定所述目标图片的画面包含的物体状态信息具体包括:In the step S2, the target picture is input into the first preset neural network model for recognition and analysis, and it is determined that the object state information contained in the frame of the target picture specifically includes:
    将目标图片输入到完成训练的第一预设神经网络模型中进行识别分析,确定所述目标图片的画面包含的物体类型以及对应物体在画面中的像素总面积。The target picture is input into the first preset neural network model that has completed training for recognition and analysis, and the type of object contained in the picture of the target picture and the total pixel area of the corresponding object in the picture are determined.
  7. 根据权利要求6所述的基于图片识别的表面缺陷检测方法,其特征在于,The surface defect detection method based on image recognition according to claim 6, characterized in that:
    在所述步骤S3中,根据所述目标图片的画面包含的物体状态信息,判断所述目标图片是否属于有效图片具体包括:In step S3, judging whether the target picture is a valid picture according to the object status information contained in the frame of the target picture specifically includes:
    根据所述物体类型,判断所述目标图片的画面是否包含预定类型的物体;若不包含,则确定所述目标图片不属于有效图片;According to the object type, determine whether the target picture contains an object of a predetermined type; if not, determine that the target picture does not belong to a valid picture;
    若包含,则判断对应物体在画面中的像素总面积是否大于预设面积阈值;若是,则确定所述目标图片属于有效图片;若否,则确定所述目标图片不属于有效图片。If included, it is determined whether the total pixel area of the corresponding object in the picture is greater than the preset area threshold; if so, it is determined that the target picture is a valid picture; if not, it is determined that the target picture is not a valid picture.
  8. 根据权利要求7所述的基于图片识别的表面缺陷检测方法,其特征在于,The surface defect detection method based on image recognition according to claim 7, characterized in that:
    在所述步骤S3中,利用所述图片数据集合,对第二预设神经网络模型进行训练具体包括:In step S3, using the picture data set to train the second preset neural network model specifically includes:
    从所述图片数据集合中随机选取预定数量的关联图片数据,并将选取的关联图片数据输入到第二预设神经网络模型进行训练,从而确定训练后的第二预设神经网络模型的模型收敛程度;Randomly select a predetermined number of associated image data from the image data set, and input the selected associated image data into the second preset neural network model for training, thereby determining model convergence of the trained second preset neural network model. degree;
    若所述模型收敛程度满足预定收敛条件,则完成对第二预设神经网络模型的训练;否则,重新从所述图片数据集合中随机选取预定数量的关联图片数据,以此对第二预设神经网络模型再次进行训练,直到所述模型收敛程度满足预定收敛条件为止。If the convergence degree of the model meets the predetermined convergence condition, then the training of the second preset neural network model is completed; otherwise, a predetermined number of associated picture data is randomly selected from the picture data set to train the second preset neural network model. The neural network model is trained again until the model convergence degree meets predetermined convergence conditions.
  9. 根据权利要求8所述的基于图片识别的表面缺陷检测方法,其特征在于,The surface defect detection method based on image recognition according to claim 8, characterized in that:
    在所述步骤S4中,将被判断为属于有效图片的目标图片输入到第二预设神经网络模型进行识别分析,确定所述目标图片中存在的物体的表面结构缺陷状态信息具体包括:In the step S4, the target picture judged to be a valid picture is input into the second preset neural network model for identification and analysis. Determining the surface structure defect status information of the object present in the target picture specifically includes:
    将被判断为属于有效图片的目标图片输入到第二预设神经网络模型进行识别分析,确定所述目标图片中存在的物体的表面缺陷所在位置坐标以及表面缺陷形状与尺寸。The target picture judged to be a valid picture is input into the second preset neural network model for identification and analysis, and the location coordinates of the surface defect of the object present in the target picture and the shape and size of the surface defect are determined.
  10. 根据权利要求9所述的基于图片识别的表面缺陷检测方法,其特征在于,The surface defect detection method based on image recognition according to claim 9, characterized in that:
    在所述步骤S4中,根据所述表面结构缺陷状态信息,对所述目标图片进行标记具体包括:In step S4, marking the target image according to the surface structure defect status information specifically includes:
    在所述目标图片中对表面缺陷对应存在的画面区域进行像素锐化处理,以及对表面缺陷对应存在的画面区域增加表面缺陷所在位置坐标以及表面缺陷形状与尺寸关联信息。In the target image, pixel sharpening is performed on the picture area corresponding to the surface defect, and the location coordinates of the surface defect and the shape and size related information of the surface defect are added to the picture area corresponding to the surface defect.
PCT/CN2022/116053 2022-06-09 2022-08-31 Surface defect detection method based on image recognition WO2023236372A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210649891.8 2022-06-09
CN202210649891.8A CN114882010A (en) 2022-06-09 2022-06-09 Surface defect detection method based on picture recognition

Publications (1)

Publication Number Publication Date
WO2023236372A1 true WO2023236372A1 (en) 2023-12-14

Family

ID=82682521

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/116053 WO2023236372A1 (en) 2022-06-09 2022-08-31 Surface defect detection method based on image recognition

Country Status (2)

Country Link
CN (1) CN114882010A (en)
WO (1) WO2023236372A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118396974A (en) * 2024-05-22 2024-07-26 河海大学 Pressure steel pipe surface weld defect identification method and system

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114882010A (en) * 2022-06-09 2022-08-09 苏州大学 Surface defect detection method based on picture recognition
CN115165920B (en) * 2022-09-06 2023-06-16 南昌昂坤半导体设备有限公司 Three-dimensional defect detection method and detection equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106067020A (en) * 2016-06-02 2016-11-02 广东工业大学 The system and method for quick obtaining effective image under real-time scene
CN108022235A (en) * 2017-11-23 2018-05-11 中国科学院自动化研究所 High-voltage power transmission tower critical component defect identification method
CN108647648A (en) * 2018-05-14 2018-10-12 电子科技大学 A kind of Ship Recognition system and method under visible light conditions based on convolutional neural networks
CN111681215A (en) * 2020-05-29 2020-09-18 无锡赛睿科技有限公司 Convolutional neural network model training method, and workpiece defect detection method and device
WO2021143343A1 (en) * 2020-01-15 2021-07-22 歌尔股份有限公司 Method and device for testing product quality
CN114882010A (en) * 2022-06-09 2022-08-09 苏州大学 Surface defect detection method based on picture recognition

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110163236B (en) * 2018-10-15 2023-08-29 腾讯科技(深圳)有限公司 Model training method and device, storage medium and electronic device
CN111650204B (en) * 2020-05-11 2023-05-12 安徽继远软件有限公司 Power transmission line hardware defect detection method and system based on cascade target detection
CN112070135B (en) * 2020-08-28 2024-08-02 广东电网有限责任公司 Power equipment image detection method and device, power equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106067020A (en) * 2016-06-02 2016-11-02 广东工业大学 The system and method for quick obtaining effective image under real-time scene
CN108022235A (en) * 2017-11-23 2018-05-11 中国科学院自动化研究所 High-voltage power transmission tower critical component defect identification method
CN108647648A (en) * 2018-05-14 2018-10-12 电子科技大学 A kind of Ship Recognition system and method under visible light conditions based on convolutional neural networks
WO2021143343A1 (en) * 2020-01-15 2021-07-22 歌尔股份有限公司 Method and device for testing product quality
CN111681215A (en) * 2020-05-29 2020-09-18 无锡赛睿科技有限公司 Convolutional neural network model training method, and workpiece defect detection method and device
CN114882010A (en) * 2022-06-09 2022-08-09 苏州大学 Surface defect detection method based on picture recognition

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118396974A (en) * 2024-05-22 2024-07-26 河海大学 Pressure steel pipe surface weld defect identification method and system

Also Published As

Publication number Publication date
CN114882010A (en) 2022-08-09

Similar Documents

Publication Publication Date Title
WO2023236372A1 (en) Surface defect detection method based on image recognition
US11922615B2 (en) Information processing device, information processing method, and storage medium
US8351662B2 (en) System and method for face verification using video sequence
CN108985170A (en) Transmission line of electricity hanger recognition methods based on Three image difference and deep learning
CN109740572A (en) A kind of human face in-vivo detection method based on partial color textural characteristics
CN104361357B (en) Photo album categorizing system and sorting technique based on image content analysis
CN110096945B (en) Indoor monitoring video key frame real-time extraction method based on machine learning
CN106548131A (en) A kind of workmen's safety helmet real-time detection method based on pedestrian detection
CN111259891A (en) Method, device, equipment and medium for identifying identity card in natural scene
CN115861210B (en) Transformer substation equipment abnormality detection method and system based on twin network
WO2023236371A1 (en) Visual analysis method for cable element identification
CN110728214B (en) Weak and small figure target detection method based on scale matching
TWI620148B (en) Device and method for monitoring, method for counting people at a location
CN103544692A (en) Blind detection method for tamper with double-compressed JPEG (joint photographic experts group) images on basis of statistical judgment
CN112686285B (en) Engineering quality detection method and system based on computer vision
CN111597939A (en) High-speed rail line nest defect detection method based on deep learning
CN108334823A (en) High-resolution remote sensing image container area area detecting method based on machine learning
CN111209863B (en) Living model training and human face living body detection method and device and electronic equipment
CN112907553A (en) High-definition image target detection method based on Yolov3
CN113569880A (en) Rapid primary sorting system and method for naturally curled tobacco leaves after baking
CN112991252A (en) Method for detecting loss of vibration damper on power transmission line
CN118570501B (en) AI-based image recognition concrete test piece anti-counterfeiting method
CN112001927B (en) Power line detection method based on geometric spatial relation connection of line primitives
CN111612800A (en) Ship image retrieval method, computer-readable storage medium and equipment
CN114821305B (en) Method, device, equipment and storage medium for identifying safety belt of electric power operation site

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22945506

Country of ref document: EP

Kind code of ref document: A1