CN115424050A - Method and system for detecting and positioning ceramic tile surface defects and storage medium - Google Patents

Method and system for detecting and positioning ceramic tile surface defects and storage medium Download PDF

Info

Publication number
CN115424050A
CN115424050A CN202211096656.9A CN202211096656A CN115424050A CN 115424050 A CN115424050 A CN 115424050A CN 202211096656 A CN202211096656 A CN 202211096656A CN 115424050 A CN115424050 A CN 115424050A
Authority
CN
China
Prior art keywords
feature
cluster
picture
tile
features
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202211096656.9A
Other languages
Chinese (zh)
Inventor
高向东
刘永恒
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong University of Technology
Original Assignee
Guangdong University of Technology
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 Guangdong University of Technology filed Critical Guangdong University of Technology
Priority to CN202211096656.9A priority Critical patent/CN115424050A/en
Publication of CN115424050A publication Critical patent/CN115424050A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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/762Arrangements for image or video recognition or understanding using pattern recognition or machine learning using clustering, e.g. of similar faces in social networks
    • G06V10/763Non-hierarchical techniques, e.g. based on statistics of modelling distributions
    • 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/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • 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/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/80Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Medical Informatics (AREA)
  • Multimedia (AREA)
  • Probability & Statistics with Applications (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)
  • Image Analysis (AREA)

Abstract

The invention provides a method, a system and a storage medium for detecting and positioning defects on the surface of a ceramic tile, and relates to the technical field of ceramic tile defect detection.

Description

Method and system for detecting and positioning ceramic tile surface defects and storage medium
Technical Field
The invention relates to the technical field of ceramic tile defect detection, in particular to a ceramic tile surface defect detection and positioning method, a ceramic tile surface defect detection and positioning system and a storage medium.
Background
In modern life, ceramic tiles are used in large quantities for both aesthetic and practical value in building decoration. With the development of the times, although the tile process has many progress, the requirements of users and producers on the quality of tiles are higher and higher, the improvement of the quality of products is imperative, and the improvement of the quality of products cannot leave the key link of quality detection.
At present, the quality detection of the ceramic tiles of most ceramic tile manufacturers is still finished manually, and the visual sense of people is influenced by other factors, so that the uncertainty is high; meanwhile, the information of the ceramic tiles cannot be converted into data information to be stored by means of manual detection, so that later statistics, analysis and judgment are influenced, a closed-loop real-time quality feedback system cannot be formed in the whole production link, and production and decision efficiency of ceramic production enterprises is influenced.
With the rise of artificial intelligence, a plurality of methods which are more novel than the traditional artificial visual detection are applied to the quality detection production of the ceramic tiles. Among them, the innovation and improvement of ceramic tile quality detection by using an artificial intelligence method become the research focus in the field. The prior art discloses a tile flaw detection and identification method and a tile flaw detection and identification system, wherein a tile flaw picture under a real scene is transmitted to a pre-constructed tile flaw detection and identification network training network based on deep learning to obtain trained tile flaw detection and identification network parameters, the trained tile flaw detection and identification network parameters are loaded into a manual pre-designed tile flaw detection and identification neural network based on deep learning, and finally tile picture information acquired from a production line is acquired and input into the trained tile flaw detection and identification network to judge whether a flaw exists in a current tile. However, in this scheme, a large amount of labeling data is required for training, and in the actual production of the ceramic tiles, defect samples are generated, but a large amount of labeling samples cannot exist unless industrial accidents occur, so that the number of labeling samples which can be used for training is small, and it is difficult to comprehensively collect the ceramic tile defect samples, so that the accuracy is not high enough in the mode of training by using the labeling data to identify the ceramic tile defects.
Disclosure of Invention
In order to solve the problem that a large number of defect samples need to be collected by adopting a tile defect detection method at present, the invention provides a tile surface defect detection and positioning method, a tile surface defect detection and positioning system and a storage medium, which do not need to be trained by marking data, only need to provide a normal sample set, and save cost and manpower.
In order to achieve the technical effects, the technical scheme of the invention is as follows:
a method, a system and a storage medium for detecting and positioning ceramic tile surface defects comprise the following steps:
s1, constructing a feature extraction and processing model, and inputting a data set constructed by a normal tile sample picture set into the feature extraction and processing model to obtain picture features;
s2, constructing a clustering cluster to which a feature point on each pixel position of the picture features belongs by utilizing multiple multivariate Gaussian clustering, and performing optimized redistribution to obtain the latest mean value and covariance of each clustering cluster, wherein the latest mean value and covariance are used as the clustering cluster center;
s3, calculating the Mahalanobis distance from the feature point on each pixel position of the picture feature to the center of the cluster to which the feature point belongs;
s4, establishing a loss function, training the feature extraction and processing model, updating the extracted feature points on each pixel position in each training round to obtain the trained feature extraction and processing model, and storing the updated feature points as a feature group;
and S5, inputting the picture to be detected into the trained feature extraction and processing model, extracting the features of the picture to be detected, searching the feature group closest to the features of the picture to be detected and regarding the feature group as a same type, calculating the abnormal score of each pixel position through a KNN algorithm, judging whether the surface of the ceramic tile has defects or not according to the scores, and positioning the positions of the defects.
According to the technical scheme, ceramic tile defect samples do not need to be collected and marked, and marking cost and manpower are saved while the ceramic tile defect detection precision and efficiency are guaranteed.
Preferably, in step S1, when the normal tile sample picture set is constructed as the data set, the images in the normal tile sample picture set are preprocessed, where the preprocessing includes reading RGB images and resizing the images to have a uniform size, which is beneficial to enhancing the detectability of related information, simplifying the data to the maximum extent, and improving the recognition accuracy of the feature extraction and processing model.
Preferably, in step S1, the feature extraction and processing model includes: the system comprises a feature extraction network, a mean pooling layer, a splicing fusion layer, a position coding layer and a convolution fusion layer;
after the data set picture is input into a feature extraction network, extracting a plurality of feature layers, wherein each layer of feature passes through a mean pooling layer, and then splicing partial feature layers in the plurality of feature layers together through a splicing and fusing layer to obtain a feature map; and then adding position codes to the feature graph in the x direction and the y direction respectively on a position coding layer to obtain the feature graph with the coordinate direction, and finally performing convolution fusion on the feature graph through a convolution fusion layer to obtain the picture features.
Preferably, in step S2, the process of constructing a cluster to which a feature point at each pixel position of the picture feature belongs and performing optimized redistribution includes:
s21, constructing a cluster to which a feature point on each pixel position of the picture features belongs by using multiple multivariate Gaussian clusters, and calculating the mean value and covariance of each cluster;
and S22, iteratively updating the cluster to which the feature point at each pixel position belongs, and performing optimized redistribution on the clusters to obtain the latest mean value and covariance of each cluster, wherein the latest mean value and covariance are used as the cluster center.
Preferably, in step S21, first, initializing clustering by using a k-means algorithm to obtain k clusters G, and making the feature point at each pixel position have a unique cluster:
Figure BDA0003839109080000031
wherein G is k Represents the k-th cluster, phi i,j A feature point representing the position of each pixel point (j);
and distributing the extracted picture features to each cluster:
Figure BDA0003839109080000032
wherein n is k Represents the total number of features assigned to each cluster, H represents the height of the feature map, and W represents the width of the feature map;
let the mean value of each cluster be μ k Covariance of Σ k The calculation formula is as follows:
Figure BDA0003839109080000033
Figure BDA0003839109080000034
the multiple multivariate Gaussian clustering is utilized to enable the features of the normal ceramic tile samples extracted by the feature extraction and processing model to be closer to Gaussian distribution, and the features are not only simply divided into two groups, but also divided into a plurality of groups in a more detailed manner, so that the method is beneficial to adapting to more complex detection objects.
Preferably, in step S22, an iteration threshold value t is set for θ i,j,k Performing iterative updating, and setting the sum of the square difference between each iterative calculation and the last mean and covariance as I, wherein the calculation formula is as follows:
I=(μ′-μ) 2 +(∑′-∑) 2
wherein mu represents the mean value obtained in the previous iteration, mu 'represents the mean value obtained in the new iteration, sigma represents the covariance obtained in the previous iteration, and sigma' represents the covariance obtained in the new iteration;
after each iterationMechanical change theta i,j,k Correspondingly reducing the value I, if I is more than or equal to t, carrying out the next iteration, and when I is more than or equal to t<Stopping iteration at t, and storing updated mu k 、∑ k And updated theta i,j,k Updated mu k 、∑ k As cluster center.
Preferably, in step S3, the formula for calculating the mahalanobis distance from the feature point at each pixel position of the picture feature to the center of the cluster to which each feature point belongs is as follows:
Figure BDA0003839109080000041
wherein mu k Sum Σ k The mean and covariance obtained in step S2.
Preferably, in step S4, according to the characteristic point φ i,j Mahalanobis distance to cluster center establishes loss function L c And L o :
Figure BDA0003839109080000042
Wherein D () represents a distance calculation function, φ i,j Representing the feature at each location, H represents the height of the feature map, W represents the width of the feature map, C k Represents the kth clustering center, and K represents the total number of the clustering centers;
Figure BDA0003839109080000043
wherein C is 1 Representing the cluster center first closest to the feature point, C 2 Representing the cluster center that is the second closest to the feature point; the total loss function is equal to the sum of two loss functions, namely:
L=L c +L o
wherein L represents the total loss function;
the loss function is used for optimizing the precision of the feature extraction and processing model, and the error in the detection and positioning process of the surface defect of the ceramic tile is reduced.
When the feature extraction and processing model is trained, setting the upper limit of the number of training rounds, re-extracting the image features of the data set in each round of training, calculating the distance of the extracted features, further calculating the value of a loss function L, and updating the parameters of the feature extraction network through the back propagation of the feature extraction and processing model; and updating the features extracted by the feature extraction and processing model in each training round, selecting the training round with the best detection result and storing the parameters of the feature extraction network in the training round after the training round reaches the upper limit.
Preferably, in step S5, the picture of the tile to be detected is input into the trained feature extraction and processing module, the picture features are extracted, a KNN algorithm is used to retrieve a feature group nearest to the picture features and regard the feature group as a similar type, a tile defect abnormality score threshold is set, an abnormality score of each pixel position is obtained by using an euclidean distance formula, the abnormality score of each pixel position is compared with the tile defect abnormality score threshold, if the abnormality score is smaller than the tile defect abnormality score threshold, the tile to be detected has no surface defects, otherwise, the tile to be detected has surface defects, and the tile surface defects are located.
The present application further provides a computer storage medium for computer-readable storage, wherein the computer storage medium stores a program for detecting and positioning surface defects of tiles, and the program for detecting and positioning surface defects of tiles is executed by a processor to implement the steps of the method for detecting and positioning surface defects of tiles.
The present application further provides a system for detecting and locating tile surface defects, the system comprising:
the data processing module is used for constructing a data set by utilizing the normal tile sample picture set;
the characteristic extraction and processing module is used for constructing a characteristic extraction and processing model and extracting the picture characteristics of the data set picture input into the characteristic extraction and processing model;
the multivariate Gaussian clustering module is used for constructing a clustering cluster to which the feature point on each pixel position of the image features belongs, optimizing and redistributing to obtain the latest mean value and covariance of each clustering cluster and using the latest mean value and covariance as the clustering cluster center;
the Mahalanobis distance calculation module is used for calculating the Mahalanobis distance from the feature point at each pixel position of the image feature to the center of the cluster to which the feature point belongs;
the characteristic updating module is used for training the characteristic extracting and processing model, updating parameters of the characteristic extracting network and updating the characteristics extracted by the characteristic extracting network;
and the detection module is used for judging whether the surface defect exists in the ceramic tile to be detected or not and positioning the surface defect of the ceramic tile.
In the technical scheme, a data set constructed by a normal tile sample picture set obtained by a data processing module is input to a feature extraction and processing module to obtain picture features of a picture of the data set, then a multi-Gaussian clustering module is used for constructing a cluster to which a feature point on each pixel position of the picture features belongs to perform optimized redistribution to obtain the latest mean value and covariance of each cluster, a Mahalanobis distance calculation module is used for calculating the Mahalanobis distance from the feature point on each pixel position of the picture features to the center of the cluster to which the feature point belongs, a feature extraction and processing module is used for training the feature extraction and processing module to update the features extracted by a feature extraction network to obtain a trained feature extraction and processing model, so that the features of the normal tile sample picture are distributed more compactly according to the belonged clusters, the picture features have higher discrimination, and the use space of a memory is reduced.
Compared with the prior art, the technical scheme of the invention has the beneficial effects that:
the invention provides a method, a system and a storage medium for detecting and positioning defects on the surface of a ceramic tile.
Drawings
Fig. 1 is a schematic flow chart of a method for detecting and positioning surface defects of a ceramic tile according to embodiment 1 of the present invention;
fig. 2 is a schematic structural diagram of a feature extraction and processing model proposed in embodiment 1 of the present invention;
FIG. 3 is a diagram showing the detection effect of the method for detecting and positioning the surface defects of ceramic tiles proposed in embodiment 1 of the present invention;
FIG. 4 is a schematic view showing the construction of a system for detecting and locating defects on the surface of a tile according to embodiment 3 of the present invention;
Detailed Description
The drawings are for illustrative purposes only and are not to be construed as limiting the patent;
for better illustration of the present embodiment, certain parts of the drawings may be omitted, enlarged or reduced, and do not represent actual dimensions;
it will be understood by those skilled in the art that certain descriptions of well-known structures in the drawings may be omitted.
The technical solution of the present invention is further described with reference to the drawings and the embodiments.
The positional relationships depicted in the drawings are for illustrative purposes only and should not be construed as limiting the present patent;
example 1
As shown in fig. 1, the present embodiment provides a method for detecting and positioning surface defects of a tile, the method including the following steps:
s1, constructing a feature extraction and processing model, and inputting a data set constructed by a normal tile sample picture set into the feature extraction and processing model to obtain picture features;
in this embodiment, when the normal tile sample picture set is constructed as the data set, the images in the normal tile sample picture set are preprocessed, and the preprocessing includes reading the RGB images, resizing the images to a uniform size, such as 256 × 256, randomly rotating the images by 10 °, clipping the random centers of the images to 224 × 224, and uniformly normalizing the pixel values of the images.
In addition, the structure of the feature extraction and processing model, referring to fig. 2, includes: the system comprises a feature extraction network, a mean pooling layer, a splicing fusion layer, a position coding layer and a convolution fusion layer. After the data set picture is input into a feature extraction network, extracting a plurality of feature layers, wherein each layer of feature passes through a mean pooling layer, and then splicing partial feature layers in the plurality of feature layers together through a splicing and fusing layer to obtain a feature map; and then adding position codes to the feature graph in the x direction and the y direction respectively on a position coding layer to obtain the feature graph with the coordinate direction, and finally performing convolution fusion on the feature graph through a convolution fusion layer to obtain the picture features.
In this embodiment, a Wide _ ResNet50 network pre-trained based on the ImageNet dataset is selected as the feature extraction network.
S2, constructing a cluster to which a feature point on each pixel position of the image features belongs by utilizing multiple multivariate Gaussian clusters, and performing optimized redistribution to obtain the latest mean value and covariance of each cluster, wherein the method comprises the following steps:
s21, constructing a cluster to which a feature point on each pixel position of the picture features belongs by using multiple multivariate Gaussian clusters, and calculating the mean value and covariance of each cluster;
firstly, initializing and clustering by using a k-means algorithm to obtain k clustering clusters G, and enabling feature points on each pixel position to have a unique clustering cluster:
Figure BDA0003839109080000071
wherein, G k Represents the k-th cluster, phi i,j A feature point representing the position of each pixel point (, j);
and distributing the extracted picture features to each cluster:
Figure BDA0003839109080000072
wherein n is k Representing the total number of features assigned to each cluster, H representing the height of the feature map, and W representing the width of the feature map;
let the mean value of each cluster be μ k Covariance of Σ k The calculation formula is as follows:
Figure BDA0003839109080000073
Figure BDA0003839109080000074
and S22, iteratively updating the cluster to which the feature point at each pixel position belongs, and performing optimized redistribution on the clusters to obtain the latest mean value and covariance of each cluster, and using the latest mean value and covariance as the cluster center.
Setting iteration critical value t to theta i,j,k Performing iterative updating, and setting the sum of the square difference between each iterative calculation and the last mean and covariance as I, wherein the calculation formula is as follows:
I=(μ′-μ) 2 +(∑′-∑) 2
wherein mu represents the mean value obtained in the previous iteration, mu 'represents the mean value obtained in the new iteration, sigma represents the covariance obtained in the previous iteration, and sigma' represents the covariance obtained in the new iteration;
after each iteration, θ is randomly changed i,j,k Correspondingly reducing the value I, if I is more than or equal to t, carrying out the next iteration, and when I is more than or equal to t<Stopping iteration at t, and storing updated mu k 、∑ k And updated theta i,j,k Updated μ k 、∑ k As cluster center.
S3, calculating the Mahalanobis distance from the feature point on each pixel position of the picture feature to the center of the cluster to which the feature point belongs;
using the mean value mu obtained in step S2 k Sum covariance ∑ k The formula for calculating the mahalanobis distance from the feature point at each pixel position of the picture feature to the center of the cluster to which the feature point belongs is as follows:
Figure BDA0003839109080000081
s4, establishing a loss function, training the feature extraction and processing model, updating the extracted feature points on each pixel position in each training round to obtain the trained feature extraction and processing model, and storing the updated feature points as a feature group;
according to the characteristic point phi i,j Mahalanobis distance to cluster center establishes loss function L c And L o :
Figure BDA0003839109080000082
Wherein D () represents a distance calculation function, φ i,j Representing the feature point of each position, H representing the height of the feature map, W representing the width of the feature map, C k Represents the kth clustering center, and K represents the total number of the clustering centers;
Figure BDA0003839109080000083
wherein C is 1 Representing the cluster center first closest to the feature point, C 2 Representing the cluster center that is the second closest to the feature point; the total loss function is equal to the addition of two loss functions, namely:
L=L c +L o
wherein L represents a total loss function;
when the feature extraction and processing model is trained, setting the upper limit of the number of training rounds, re-extracting the image features of the data set in each round of training, calculating the distance of the extracted features, further calculating the value of a loss function L, and updating the parameters of the feature extraction network through the back propagation of the feature extraction and processing model; and updating the features extracted by the feature extraction and processing model in each training round, selecting the training round with the best detection result after the training round reaches the upper limit, and storing the parameters of the feature extraction network in the training round.
And S5, inputting the picture to be detected into the trained feature extraction and processing model, extracting the features of the picture to be detected, searching the feature group closest to the features of the picture to be detected and regarding the feature group as a same type, calculating the abnormal score of each pixel position through a KNN algorithm, judging whether the surface of the ceramic tile has defects or not according to the scores and positioning the positions of the defects, wherein the detection result is shown in figure 3.
Searching k features nearest to the features of the picture to be detected in the feature group by using an Euclidean distance formula, and calculating the Euclidean distance d between the features of the picture to be detected and the features updated in the step S4 O The calculation formula is as follows:
d O =||t i,ji,j ||
wherein, t i,j Is the characteristic of the picture to be measured, phi i,j Is a feature point in the stored feature group, and in the present embodiment, k =3 is taken as an average value of 3 sets of euclidean distances and regarded as an abnormality score.
Example 2
In this embodiment, a computer-readable storage medium is provided, where a computer program is stored, where the computer program includes program instructions, and when the computer program is executed by a processor, the processor is enabled to implement the steps of the tile surface defect detecting and positioning method provided in the foregoing embodiment.
Wherein the computer-readable storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Example 3
In this embodiment, as shown in fig. 4, a system for detecting and positioning surface defects of ceramic tiles is provided, where the system includes:
a data processing module 101, configured to construct a data set by using the normal tile sample picture set;
the feature extraction and processing module 102 is configured to construct a feature extraction and processing model, and extract picture features of a data set picture input into the feature extraction and processing model;
the multivariate Gaussian clustering module 103 is used for constructing a clustering cluster to which the feature point at each pixel position of the picture features belongs, optimizing and redistributing to obtain the latest mean value and covariance of each clustering cluster, and using the latest mean value and covariance as the clustering cluster center;
a mahalanobis distance calculation module 104, configured to calculate mahalanobis distances from feature points at each pixel position of the image feature to respective cluster centers of the cluster to which the feature points belong;
a feature updating module 105, configured to train the feature extraction and processing model, update parameters of the feature extraction network, and update features extracted by the feature extraction network;
and the detection module 106 is used for judging whether the surface defects exist in the ceramic tiles to be detected and positioning the surface defects of the ceramic tiles.
On the whole, a data set constructed by a normal tile sample picture set obtained by a data processing module 101 is input to a feature extraction and processing module 102 to obtain picture features of a picture of the data set, then a multi-Gaussian clustering module 103 is used for constructing a cluster to which a feature point at each pixel position of the picture features belongs, optimization redistribution is carried out to obtain the latest mean value and covariance of each cluster, a Mahalanobis distance calculation module 104 is used for calculating the Mahalanobis distance from the feature point at each pixel position of the picture features to the center of the cluster to which the feature point belongs, a feature extraction and processing module 105 is used for training the feature extraction and processing module to update parameters of a feature extraction network and update the features of the feature extraction network, and finally a detection module 106 is used for efficiently and accurately completing detection and defect positioning of tile surface defects under the condition that a tile defect sample does not need to be marked.
It should be understood that the above-described embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. Other variations and modifications will be apparent to persons skilled in the art in light of the above description. This need not be, nor should it be exhaustive of all embodiments. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the claims of the present invention.

Claims (10)

1. A method for detecting and positioning surface defects of ceramic tiles is characterized by comprising the following steps:
s1, constructing a feature extraction and processing model, and inputting a data set constructed by a normal tile sample picture set into the feature extraction and processing model to obtain picture features;
s2, constructing a clustering cluster to which a feature point on each pixel position of the picture features belongs by utilizing multiple multivariate Gaussian clustering, and performing optimized redistribution to obtain the latest mean value and covariance of each clustering cluster, wherein the latest mean value and covariance are used as the clustering cluster center;
s3, calculating the Mahalanobis distance from the feature point on each pixel position of the picture feature to the center of the cluster to which the feature point belongs;
s4, establishing a loss function, training the feature extraction and processing model, updating the extracted feature points on each pixel position in each training round to obtain the trained feature extraction and processing model, and storing the updated feature points as a feature group;
and S5, inputting the picture to be detected into the trained feature extraction and processing model, extracting the features of the picture to be detected, searching the feature group closest to the features of the picture to be detected and regarding the feature group as a same type, calculating the abnormal score of each pixel position through a KNN algorithm, judging whether the surface of the ceramic tile has defects or not according to the scores, and positioning the positions of the defects.
2. The tile surface defect detecting and locating method according to claim 1, wherein in step S1, when the normal tile sample picture set is constructed as the data set, the images in the normal tile sample picture set are preprocessed, the preprocessing including reading RGB images and resizing the images to a uniform size.
3. The tile surface defect detecting and positioning method according to claim 1, wherein in step S1, the feature extraction and processing model comprises: the system comprises a feature extraction network, a mean value pooling layer, a splicing fusion layer, a position coding layer and a convolution fusion layer;
after the data set picture is input into a feature extraction network, extracting a plurality of feature layers, wherein each layer of feature passes through a mean pooling layer, and then splicing partial feature layers in the plurality of feature layers together through a splicing and fusing layer to obtain a feature map; and then adding position codes to the feature graph in the x direction and the y direction respectively on a position coding layer to obtain the feature graph with the coordinate direction, and finally performing convolution fusion on the feature graph through a convolution fusion layer to obtain the picture features.
4. The method for detecting and positioning the defects on the surface of the ceramic tile according to claim 1, wherein the process of constructing the cluster to which the feature points at each pixel position of the picture feature belong in the step S2 and performing the optimized redistribution comprises:
s21, constructing a cluster to which a feature point on each pixel position of the picture features belongs by utilizing multiple multivariate Gaussian clusters, and calculating the mean value and covariance of each cluster;
and S22, iteratively updating the cluster to which the feature point at each pixel position belongs, and performing optimized redistribution on the clusters to obtain the latest mean value and covariance of each cluster, wherein the latest mean value and covariance are used as the cluster center.
5. The tile surface defect detecting and positioning method according to claim 4, wherein the specific process of step S21 is as follows:
firstly, carrying out initialization clustering by using a k-means algorithm to obtain k clustering clusters G, and enabling feature points on each pixel position to have unique clustering clusters:
Figure FDA0003839109070000021
wherein G is k Represents the k-th cluster, phi i,j A feature point representing the position of each pixel point (i, j);
and distributing the extracted picture features to each cluster:
Figure FDA0003839109070000022
wherein n is k Represents the total number of features assigned to each cluster, H represents the height of the feature map, and W represents the width of the feature map;
let the mean value of each cluster be μ k Covariance of Σ k The calculation formula is as follows:
Figure FDA0003839109070000023
Figure FDA0003839109070000024
6. the tile surface defect detecting and positioning method according to claim 5, wherein the process of step S22 is:
setting iteration critical value t to theta i,j,k Performing iterative updating, setting the sum of the square difference of each iterative calculation and the last mean value and covariance as I, and the calculation formula is as follows:
I=(μ′-μ) 2 +(∑′-∑) 2
wherein mu represents the mean value obtained in the previous iteration, mu 'represents the mean value obtained in the new iteration, sigma represents the covariance obtained in the previous iteration, and sigma' represents the covariance obtained in the new iteration;
after each iteration, θ is randomly changed i,j,k Correspondingly reducing the value I, if I is more than or equal to t, carrying out the next iteration, stopping the iteration when I is less than t, and storing the updated mu k 、∑ k And updated theta i,j,k Updated μ k 、∑ k As cluster center.
7. The tile surface defect detecting and positioning method according to claim 6, wherein the formula for calculating the Mahalanobis distance from the feature point at each pixel position of the picture feature to the center of the cluster to which the feature point belongs is as follows:
Figure FDA0003839109070000031
according to the characteristic point phi i,j Mahalanobis distance to cluster center establishes loss function L c And L o
Figure FDA0003839109070000032
Wherein D () represents a distance calculation function, φ i,j Representing the feature at each location, H represents the height of the feature map, W represents the width of the feature map, C k Represents the kth clustering center, and K represents the total number of the clustering centers;
Figure FDA0003839109070000033
wherein C 1 Representing the cluster center first closest to the feature point, C 2 Representing the second closest to the feature pointThe cluster center of (a); the total loss function is equal to the sum of two loss functions, namely:
L=L c +L o
wherein L represents the total loss function;
when the feature extraction and processing model is trained, setting an upper limit of the number of training rounds, re-extracting the image features of the data set in each round of training, calculating the distance of the extracted features, further calculating the value of a loss function L, and updating the parameters of the feature extraction network through the back propagation of the feature extraction and processing model; and updating the features extracted by the feature extraction and processing model in each training round, selecting the training round with the best detection result after the training round reaches the upper limit, and storing the parameters of the feature extraction network in the training round.
8. The method for detecting and locating the surface defects of the ceramic tiles according to claim 1, wherein in step S5, the ceramic tile picture to be detected is input into a trained feature extraction and processing module, picture features are extracted, a KNN algorithm is used for retrieving a feature group closest to the picture features and considering the feature group as the same type, a ceramic tile defect abnormality score threshold is set, an euclidean distance formula is used for obtaining an abnormality score of each pixel position, the abnormality score of each pixel position is compared with the ceramic tile defect abnormality score threshold, if the abnormality score is smaller than the ceramic tile defect abnormality score threshold, the ceramic tile to be detected has no surface defects, otherwise, the ceramic tile to be detected has surface defects, and the ceramic tile surface defects are located.
9. A computer storage medium for computer readable storage, characterized in that said computer storage medium has stored thereon an unsupervised tile surface defect detection and localization program for implementing the steps of the unsupervised tile surface defect detection and localization method of any one of claims 1 to 8 when executed by a processor.
10. An unsupervised computer system for detecting and locating surface defects of ceramic tiles, comprising:
the data processing module is used for constructing a data set by utilizing the normal tile sample picture set;
the characteristic extraction and processing module is used for constructing a characteristic extraction and processing model and extracting the picture characteristics of the data set picture input into the characteristic extraction and processing model;
the multivariate Gaussian clustering module is used for constructing a clustering cluster to which the feature point on each pixel position of the image features belongs, optimizing and redistributing to obtain the latest mean value and covariance of each clustering cluster and using the latest mean value and covariance as the clustering cluster center;
the Mahalanobis distance calculation module is used for calculating the Mahalanobis distance from the feature point at each pixel position of the image feature to the center of the cluster to which the feature point belongs;
the characteristic updating module is used for training the characteristic extracting and processing model, updating parameters of the characteristic extracting network and updating the characteristics extracted by the characteristic extracting network;
and the detection module is used for judging whether the surface defect exists in the ceramic tile to be detected or not and positioning the surface defect of the ceramic tile.
CN202211096656.9A 2022-09-08 2022-09-08 Method and system for detecting and positioning ceramic tile surface defects and storage medium Pending CN115424050A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211096656.9A CN115424050A (en) 2022-09-08 2022-09-08 Method and system for detecting and positioning ceramic tile surface defects and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211096656.9A CN115424050A (en) 2022-09-08 2022-09-08 Method and system for detecting and positioning ceramic tile surface defects and storage medium

Publications (1)

Publication Number Publication Date
CN115424050A true CN115424050A (en) 2022-12-02

Family

ID=84201889

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211096656.9A Pending CN115424050A (en) 2022-09-08 2022-09-08 Method and system for detecting and positioning ceramic tile surface defects and storage medium

Country Status (1)

Country Link
CN (1) CN115424050A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116228754A (en) * 2023-05-08 2023-06-06 山东锋士信息技术有限公司 Surface defect detection method based on deep learning and global difference information
CN118154561A (en) * 2024-03-21 2024-06-07 苏州岽睿微电子科技有限公司 Surface defect detection method based on optimized memory module and U-Net++

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116228754A (en) * 2023-05-08 2023-06-06 山东锋士信息技术有限公司 Surface defect detection method based on deep learning and global difference information
CN116228754B (en) * 2023-05-08 2023-08-25 山东锋士信息技术有限公司 Surface defect detection method based on deep learning and global difference information
CN118154561A (en) * 2024-03-21 2024-06-07 苏州岽睿微电子科技有限公司 Surface defect detection method based on optimized memory module and U-Net++

Similar Documents

Publication Publication Date Title
CN111191732B (en) Target detection method based on full-automatic learning
CN111723675B (en) Remote sensing image scene classification method based on multiple similarity measurement deep learning
CN115424050A (en) Method and system for detecting and positioning ceramic tile surface defects and storage medium
CN112883839B (en) Remote sensing image interpretation method based on adaptive sample set construction and deep learning
CN110717526A (en) Unsupervised transfer learning method based on graph convolution network
CN106203490A (en) Based on attribute study and the image ONLINE RECOGNITION of interaction feedback, search method under a kind of Android platform
CN111860106B (en) Unsupervised bridge crack identification method
CN110443257B (en) Significance detection method based on active learning
CN112633382A (en) Mutual-neighbor-based few-sample image classification method and system
CN109829414B (en) Pedestrian re-identification method based on label uncertainty and human body component model
CN110619059A (en) Building marking method based on transfer learning
CN111062928A (en) Method for identifying lesion in medical CT image
CN112784921A (en) Task attention guided small sample image complementary learning classification algorithm
CN113989747A (en) Terminal area meteorological scene recognition system
CN116310647A (en) Labor insurance object target detection method and system based on incremental learning
CN114357307B (en) News recommendation method based on multidimensional features
CN115457044A (en) Pavement crack segmentation method based on class activation mapping
CN109886206B (en) Three-dimensional object identification method and equipment
CN114399687A (en) Semi-supervised self-training hyperspectral remote sensing image classification method based on spatial correction
CN113516156A (en) Fine-grained image classification method based on multi-source information fusion
CN112232885A (en) Multi-mode information fusion-based warehouse rental price prediction method
CN116206208A (en) Forestry plant diseases and insect pests rapid analysis system based on artificial intelligence
CN113673534B (en) RGB-D image fruit detection method based on FASTER RCNN
CN112733067B (en) Data set selection method for robot target detection algorithm
CN110348323B (en) Wearable device gesture recognition method based on neural network optimization

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination