CN114299040A - Ceramic tile flaw detection method and device and electronic equipment - Google Patents

Ceramic tile flaw detection method and device and electronic equipment Download PDF

Info

Publication number
CN114299040A
CN114299040A CN202111658072.1A CN202111658072A CN114299040A CN 114299040 A CN114299040 A CN 114299040A CN 202111658072 A CN202111658072 A CN 202111658072A CN 114299040 A CN114299040 A CN 114299040A
Authority
CN
China
Prior art keywords
network
data set
defective
tile
defect
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
CN202111658072.1A
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.)
Ji Hua Laboratory
Original Assignee
Ji Hua Laboratory
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 Ji Hua Laboratory filed Critical Ji Hua Laboratory
Priority to CN202111658072.1A priority Critical patent/CN114299040A/en
Publication of CN114299040A publication Critical patent/CN114299040A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)

Abstract

The disclosure relates to the technical field of image processing, and provides a method and a device for detecting a ceramic tile flaw and electronic equipment. The method comprises the following steps: inputting a tile image set to be detected into an anomaly detection network so that the anomaly detection network determines defective samples in the tile image set to be detected, and manually marks the samples to obtain an initial defective sample set, wherein the anomaly detection network is obtained by training according to the initial non-defective sample set; obtaining a detection data set based on a tile image set to be detected and an abnormal detection network, obtaining a supervision data set based on the detection data set and a defect supervision network, and obtaining a target flawless sample set and a target flawed sample set according to the detection data set and the supervision data set; according to the target flawless sample set and the target flawed sample set, the abnormity detection network and the flaw supervision network are respectively updated, excessive manual participation can be reduced by adopting the method, and the precision of flaw detection on the surface of the tile image is improved.

Description

Ceramic tile flaw detection method and device and electronic equipment
Technical Field
The present disclosure relates to the field of image processing technologies, and in particular, to a method and an apparatus for detecting a tile defect, and an electronic device.
Background
In the ceramic tile production process, because various reasons, can lead to the ceramic tile surface to produce various flaws, and the surface defect of ceramic tile detects the very important content among the ceramic tile quality testing process, at present, the surface defect of ceramic tile detects and relies on artifical range estimation and the machine of foreign import to detect, however, artifical range estimation's working strength is great, easy fatigue, and the testing result receives subjective factor's influence more easily, lead to the surface defect testing result accuracy of ceramic tile low, and use foreign import's machine to detect, the cost of machine equipment is higher, and can't adapt to the detection demand of domestic ceramic tile, therefore, realize the high-efficient automated inspection of ceramic tile surface defect, be one of improvement domestic ceramic tile production automation level's urgent demand.
In the prior art, a supervised model is trained by using a large number of artificially marked pictures with flaws, and the flaws on the surface of the ceramic tile are realized by using the trained supervised model, or an unsupervised model is trained according to a normal ceramic tile picture and the flaws on the surface of the ceramic tile are realized by using the trained unsupervised model.
However, the adoption of a supervised model requires a large number of manually marked defective pictures, which has the problems of high cost and long period; the problem of low detection precision exists by adopting an unsupervised model.
Disclosure of Invention
In view of the above, it is necessary to provide a tile defect detecting method, device and electronic apparatus.
In a first aspect, an embodiment of the present disclosure provides a tile defect detection method, where the method includes:
inputting a tile image set to be detected into an anomaly detection network so that the anomaly detection network determines defective samples in the tile image set to be detected and carries out manual marking to obtain an initial defective sample set, wherein the anomaly detection network is obtained by training according to an initial flawless sample set;
obtaining a detection data set based on the tile image set to be detected and the anomaly detection network, wherein the detection data set comprises at least one of an unblemished tile image and a flawed tile image;
obtaining a supervision data set based on the detection data set and a defect supervision network, wherein the defect supervision network is trained according to the initial flawed sample set, and the supervision data set comprises at least one of flawless tile images and flawed tile images;
obtaining a target flawless sample set and a target flawed sample set according to the detection data set and the supervision data set;
and respectively updating the abnormal detection network and the defect supervision network according to the target flawless sample set and the target flawed sample set.
In one embodiment, the anomaly detection network comprises a multi-scale feature extraction module, a two-dimensional normalized flow module, and a multi-scale feature aggregation module;
obtaining a detection data set based on the tile image set to be detected and the anomaly detection network, wherein the detection data set comprises:
inputting the tile image set to be detected into the multi-scale feature extraction module to obtain a multi-scale feature map corresponding to each tile image to be detected;
inputting the multi-scale characteristic diagram into the two-dimensional standardized flow module to obtain a flaw distribution probability diagram corresponding to each scale characteristic diagram;
inputting the flaw distribution probability maps respectively corresponding to the multi-scale feature maps into a multi-scale feature aggregation module to obtain a detection image corresponding to each tile image to be detected;
and obtaining the detection data set based on the detection images corresponding to the multiple to-be-detected tile images.
In one embodiment, the two-dimensional standardized flow network module comprises at least one two-dimensional standardized flow network and an activation function corresponding to each two-dimensional standardized flow network, the two-dimensional standardized flow network comprises a sub-network component and a non-linear segmentation aggregation component, and the sub-network component is composed of a plurality of two-dimensional convolution layers;
inputting the multi-scale feature map into the two-dimensional standardized flow module to obtain a flaw distribution probability map corresponding to each scale feature map, wherein the method comprises the following steps:
inputting the multi-scale feature maps into the sub-network components to obtain first spatial information feature maps corresponding to the feature maps of each scale;
inputting the first spatial information characteristic diagram into the nonlinear segmentation and aggregation component to obtain a second spatial information characteristic diagram corresponding to each scale characteristic diagram;
and inputting the second spatial information characteristic diagram into the activation function to obtain the flaw distribution probability diagram corresponding to each scale characteristic diagram.
In one embodiment, the obtaining a supervision data set based on the detection data set and a fault supervision network includes:
acquiring an image of the flawless ceramic tile in the detection data set;
and performing preset processing on the flawless ceramic tile image, and inputting the flawless ceramic tile image after the preset processing into the flawed supervision network to obtain the supervision data set, wherein the preset processing comprises at least one of linear interpolation and secondary sampling.
In one embodiment, the obtaining a target set of unblemished samples and a target set of flawed samples from the inspection dataset and the supervision dataset includes:
adding the flawless tile images respectively included in the detection data set and the supervision data set to the initial flawless sample set to obtain a target flawless sample set;
and adding the defective tile images respectively included in the detection data set and the supervision data set to the initial defective sample set to obtain a target defective sample set.
In one embodiment, said adding said defective tile image comprised by said detection data set and said supervision data set to said initial defective sample set to obtain a target defective sample set comprises:
respectively calculating the similarity of each defective tile image and samples corresponding to different defect types in the initial defective sample set;
and determining the defect type of the defective tile image according to the similarity, and adding the defect type to the initial defective sample set.
In one embodiment, the determining defective samples in the image set of tiles to be detected and manually marking the defective samples to obtain an initial defective sample set includes:
determining a defect type in each sample with defects based on the sample with defects in the image set of the ceramic tile to be detected, wherein the defect type comprises at least one of edge abnormality, corner abnormality, white point defect, light color block defect and dark color block defect;
manually marking to obtain the initial set of defective samples based on each of the defective samples and the corresponding defective category.
In one embodiment, the updating the anomaly detection network and the fault supervision network according to the target flawless sample set and the target flawed sample set respectively comprises:
when the number of the target flawless sample sets is larger than a first preset threshold value, updating the abnormal detection network by using the target flawless sample sets;
and when the number of the target defective sample sets is larger than a second preset threshold value, updating the defect supervision network by using the target defective sample sets.
In a second aspect, an embodiment of the present disclosure provides a tile defect detecting device, including:
an initial flawed sample set obtaining module, configured to input a tile image set to be detected to an anomaly detection network, so that the anomaly detection network determines flawed samples in the tile image set to be detected, and performs manual marking to obtain an initial flawed sample set, where the anomaly detection network is obtained by training according to an initial flawless sample set;
a detection data set obtaining module, configured to obtain a detection data set based on the tile image set to be detected and the anomaly detection network, where the detection data set includes at least one of an unblemished tile image and a flawed tile image;
a supervision data set obtaining module, configured to obtain a supervision data set based on the detection data set and a defect supervision network, where the defect supervision network is trained according to the initial defective sample set, and the supervision data set includes at least one of an unblemished tile image and a defective tile image;
a sample set obtaining module, configured to obtain a target flawless sample set and a target flawed sample set according to the detection data set and the supervision data set;
and the updating module is used for respectively updating the abnormal detection network and the defect supervision network according to the target flawless sample set and the target flawed sample set.
In a third aspect, an embodiment of the present disclosure provides an electronic device, which includes a memory and a processor, where the memory stores a computer program, and the processor implements the steps of the tile defect detection method according to the first aspect when executing the computer program.
According to the tile defect detection method, the tile defect detection device and the electronic equipment, the abnormal detection network is adopted to predict a tile image to be detected to obtain a detection result corresponding to the tile image to be detected, the detection result is further confirmed and marked manually, excessive manual participation can be reduced, only a small number of initial flaw sample sets need to be marked, after the initial flaw sample sets are used for training flaw monitoring models, the abnormal detection network and the flaw monitoring network are used for automatically expanding corresponding training sample sets respectively, and the abnormal detection network and the flaw monitoring network are updated by the expanded sample sets, so that the accuracy of tile image surface defect detection is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present disclosure, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a schematic flow chart of a tile defect detection method according to an embodiment of the present disclosure;
fig. 2 is a schematic flow chart of another tile defect detection method provided in the embodiment of the present disclosure;
fig. 3 is a schematic flow chart illustrating another tile defect detection method according to an embodiment of the present disclosure;
fig. 4 is a schematic flow chart of another tile defect detection method provided in the embodiment of the present disclosure;
fig. 5 is a schematic flow chart of another tile defect detection method provided in the embodiments of the present disclosure;
fig. 6 is a schematic flow chart of another tile defect detection method provided in the embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of a tile defect detecting device according to an embodiment of the present disclosure.
Detailed Description
In order that the above objects, features and advantages of the present disclosure may be more clearly understood, aspects of the present disclosure will be further described below. It should be noted that the embodiments and features of the embodiments of the present disclosure may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure, but the present disclosure may be practiced in other ways than those described herein; it is to be understood that the embodiments disclosed in the specification are only a few embodiments of the present disclosure, and not all embodiments.
In the ceramic tile production process, because various reasons, can lead to the ceramic tile surface to produce various flaws, and the surface defect of ceramic tile detects the very important content among the ceramic tile quality testing process, at present, the surface defect of ceramic tile detects and relies on artifical range estimation and the machine of foreign import to detect, however, artifical range estimation's working strength is great, easy fatigue, and the testing result receives subjective factor's influence more easily, the surface defect testing result accuracy that leads to the ceramic tile is low, the machine of using foreign import detects, the cost of machine equipment is higher, and can't adapt to the detection demand of domestic ceramic tile, therefore, realize the high-efficient automated inspection of ceramic tile surface defect, be one urgent demand that improves domestic ceramic tile production automation level.
In the prior art, a supervised model is trained by using a large number of artificially marked pictures with flaws, and the flaws on the surface of the ceramic tile are realized by using the trained supervised model, or an unsupervised model is trained according to a normal ceramic tile picture and the flaws on the surface of the ceramic tile are realized by using the trained unsupervised model. However, the adoption of a supervised model requires a large number of manually marked defective pictures, which has the problems of high cost and long period; the problem of low detection precision exists by adopting an unsupervised model.
Therefore, the method for detecting the ceramic tile flaws includes the steps that firstly, an abnormal detection network is adopted to predict a ceramic tile image to be detected so as to obtain a detection result corresponding to the ceramic tile image to be detected, then the detection result is confirmed and marked manually, excessive manual participation can be reduced, only a small number of initial flaw sample sets need to be marked, after a flaw supervision model is trained by the initial flaw sample sets, the abnormal detection network and the flaw supervision network are used for automatically expanding corresponding training sample sets respectively, and the abnormal detection network and the flaw supervision network are updated by the expanded sample sets, so that the precision of detecting the surface flaws of the ceramic tile image is improved.
In an embodiment, as shown in fig. 1, fig. 1 is a schematic flow chart of a tile defect detection method provided in an embodiment of the present disclosure, which specifically includes the following steps:
s10: inputting the tile image set to be detected into an anomaly detection network so as to enable the anomaly detection network to determine defective samples in the tile image set to be detected, and manually marking the samples to obtain an initial defective sample set.
Wherein, the abnormal detection network is obtained by training according to an initial flawless sample set; the tile image set to be detected is an image set constructed by the tile images acquired by the industrial camera, the tile image set to be detected may include an unblemished tile image and a flawed tile image, the unblemished sample set is a sample set constructed by the unblemished tile images selected from the plurality of tile images, and the unblemished sample may be obtained by the detection model, but is not limited thereto, and the disclosure is not particularly limited.
The manual marking refers to manually judging a defective tile image, determining a defective area in the tile image, and labeling to obtain a marked defective sample, for example, the defective area may be selected by frame, or the defective area may be divided into pixel levels, but the disclosure is not limited thereto, and a person skilled in the art may set the method according to actual situations.
Specifically, the terminal device, such as a computer, inputs the acquired tile image set to be detected into an anomaly detection network, the anomaly detection network outputs a prediction result corresponding to each tile image to be detected in the tile image set to be detected, if the prediction result indicates that the tile image to be detected is flawless, the tile image to be detected is discarded, and if the prediction result indicates that the tile image to be detected has a flaw, a flaw area in the tile image to be detected is manually determined and marked to obtain an initial sample set with the flaw.
On the basis of the above embodiments, in some embodiments of the present disclosure, one possible implementation manner of S10 is:
and determining the defect type in each defective sample based on the defective samples in the image set of the ceramic tiles to be detected.
The defect type includes at least one of edge abnormality, corner abnormality, white point defect, light color block defect, and dark color point block defect, and may further include aperture defect and scratch, but is not limited thereto. It should be noted that there may be different classification criteria for the defect categories according to different manufacturer detection criteria, and the disclosure is not particularly limited.
Based on each defective sample and the corresponding defect category, manual marking is performed to obtain an initial set of defective samples.
Specifically, a detection result corresponding to each tile image to be detected is output according to an abnormality detection network, a defect area in the tile image containing the defects is determined according to the detected tile image containing the defects in the detection result, whether the defects exist in the defect area is further manually judged, and if the defects do not exist, the sample is discarded; if the defect exists, the defect area is marked, and the defect type in the defect area is the defect mark type label, so as to obtain an initial defective sample set.
For example, if the defect type is judged to be a scratch manually, a label is marked as a "scratch" for the defect in the defect area, and meanwhile, a defect outline and an area in the defect area are labeled, for example, the defect area may be selected by a box, or the outline of the defect may be outlined and marked, but the disclosure is not limited thereto, and a person skilled in the art may specifically set the method according to actual situations.
Therefore, the detection result output by the anomaly detection network and corresponding to the tile image to be detected is used for manually confirming whether the tile image has flaws or not according to the detection result and carrying out annotation, so that the annotation cost can be saved.
S12: and obtaining a detection data set based on the tile image set to be detected and the anomaly detection network.
Wherein the inspection data set includes at least one of an image of an unblemished tile and an image of a defective tile;
specifically, the tile image set to be detected is input to a trained anomaly detection network, and the anomaly detection network outputs a detection data set corresponding to the tile image set to be detected.
Based on the foregoing embodiments, in some embodiments of the present disclosure, the anomaly detection network includes a multi-scale feature extraction module, a two-dimensional normalized flow module, and a multi-scale feature aggregation module, and further, as shown in fig. 2, a possible implementation manner of S12 is as follows:
s121: and inputting the tile image set to be detected into a multi-scale feature extraction module to obtain a multi-scale feature map corresponding to each tile image to be detected.
The multi-scale feature extraction module is used for extracting features of different scales of a to-be-detected tile image, the feature information contained in feature maps of different scales is different, the bottom-layer features generally contain a large amount of texture and edge information, the upper-layer features contain a large amount of semantic information, the defects of the tile image generally have simple shape features because most of the defect types are points, lines, scratches, collapse defects and the like, the positions of the defects can be accurately positioned by using the bottom-layer features, and meanwhile, the positions of the defects are globally positioned by combining the semantic information contained in the upper-layer features, so that the accuracy of detecting the defects can be improved.
The multi-scale feature extraction module may use a deep learning feature extraction network with pre-training parameters, such as VGG, ResNet, etc., which are disclosed in the prior art, and use convolution layers of these networks to realize feature extraction, but the disclosure is not limited thereto, and those skilled in the art may set the feature extraction according to actual situations.
S122: and inputting the multi-scale characteristic diagram into a two-dimensional standardized flow module to obtain a flaw distribution probability diagram corresponding to each scale characteristic diagram.
The two-dimensional standardized flow module comprises a plurality of two-dimensional standardized flow networks, each two-dimensional standardized flow network is a network model with bidirectional mapping, the bidirectional mapping is utilized to enable the network to fully learn the distribution of normal samples, and when a flaw sample in a tile image is predicted, the characteristic distribution of the flaw sample is different from the characteristic distribution of the normal sample learned by the network, so that the flaw can be better detected through comparison.
It should be noted that, for each scale feature map in the multi-scale feature map, the two-dimensional standardized flow module corresponds to one two-dimensional standardized flow network, but the disclosure is not limited thereto, and those skilled in the art may set the two-dimensional standardized flow network according to actual situations.
Based on the foregoing embodiments, in some embodiments of the present disclosure, the two-dimensional standardized flow module includes at least one two-dimensional standardized flow network and an activation function corresponding to each two-dimensional standardized flow network, the two-dimensional standardized flow network includes a sub-network component and a non-linear segmentation aggregation component, the sub-network component is composed of a plurality of two-dimensional convolution layers, and further, as shown in fig. 3, one possible implementation manner of S122 is:
s1221: and inputting the multi-scale feature maps into the sub-network component to obtain a first spatial information feature map corresponding to each scale feature map.
The sub-network component is composed of a plurality of two-dimensional convolution layers, and feature extraction is performed by using the two-dimensional convolution layers, so that spatial information of features can be reserved, and accurate positioning and judgment of defects are improved.
S1222: and inputting the first spatial information characteristic diagram into a nonlinear segmentation and aggregation component to obtain a second spatial information characteristic diagram corresponding to each scale characteristic diagram.
The nonlinear segmentation and aggregation component is used for carrying out nonlinear change operation on the first spatial information characteristic diagram.
S1223: and inputting the second spatial information characteristic diagram into the activation function to obtain a flaw distribution probability diagram corresponding to each scale characteristic diagram.
The activation function is used to score defects included in the spatial information feature map, and the activation function is used to obtain the probability that each pixel in the spatial information feature map belongs to a defect, so as to obtain a defect distribution probability map corresponding to each scale feature map.
Specifically, the terminal device, such as a computer, inputs the multi-scale feature map into the sub-network component, extracts the spatial information feature corresponding to each scale feature map by using the two-dimensional convolution layer in the sub-network component to obtain a first spatial information feature map corresponding to each scale feature map, inputs the obtained first spatial information feature map into the nonlinear segmentation and aggregation component to obtain a second spatial information feature map, inputs the obtained second spatial information feature map into the activation function, and scores the second spatial information feature map by using the activation function to obtain the defect distribution probability map corresponding to each scale feature map.
In this way, in the embodiment, the sub-component network composed of the two-dimensional convolutional layer is used to extract the spatial information feature map, and after the segmentation and aggregation operation is performed on the spatial information feature map, the defect distribution probability map is further obtained according to the spatial information feature map, so that the precision positioning and the judgment on the defects are improved.
S123: and inputting the flaw distribution probability maps respectively corresponding to the multi-scale feature maps into a multi-scale feature aggregation module to obtain a detection image corresponding to each tile image to be detected.
S124: and obtaining a detection data set based on the detection images corresponding to the multiple to-be-detected tile images.
Specifically, flaw distribution probability maps respectively corresponding to different scale feature maps are input into a multi-scale feature aggregation module, and the multi-scale feature aggregation module performs fusion processing on features corresponding to different scales, so as to obtain a detection image corresponding to each tile image to be detected. And obtaining a detection data set according to the detection images respectively corresponding to the multiple to-be-detected tile images.
In this way, in this embodiment, the multi-scale feature maps are extracted, the spatial information feature map of each scale feature map is obtained according to the two-dimensional standardized flow network, and the feature maps of different scales are further fused, so that the feature information of different scales is fully utilized, and the accuracy of detecting the flaws in the tile image is improved.
S14: and obtaining a supervision data set based on the detection data set and the flaw supervision network.
The defect monitoring network is obtained by training according to an initial defective sample set, and the monitoring data set comprises at least one of an unblemished tile image and a defective tile image;
the fault supervision network may be, but is not limited to, an object detection network, a semantic segmentation network, and may be set by those skilled in the art according to actual situations.
On the basis of the above embodiments, in some embodiments of the present disclosure, as shown in fig. 4, one possible implementation manner of S14 is:
s141: and acquiring an image of the flawless ceramic tile in the detection data set.
S142: and (4) performing preset processing on the flawless ceramic tile image, and inputting the flawless ceramic tile image subjected to the preset processing into a flaw monitoring network to obtain a monitoring data set.
The preset processing includes at least one of linear interpolation and subsampling, and the resolution of the flawless tile image is improved by a data processing mode such as linear interpolation or by re-acquiring an image by using a higher-resolution camera, so that the flawless tile image can be more accurately detected by using a flaw supervision network.
Specifically, a flawless tile image is determined in the detection data set, the obtained flawless tile image is input into a flaw monitoring network after being subjected to preset processing, and a prediction result corresponding to the flawless tile image is further obtained by utilizing the flaw monitoring network so as to obtain a monitoring data set.
In this way, the present embodiment further performs secondary detection on the flawless tile image detected by the flaw detection model by using the flaw supervision network having higher detection accuracy, so as to improve the accuracy of detecting flaws included in the tile image.
S16: and obtaining a target flawless sample set and a target flawed sample set according to the detection data set and the supervision data set.
Specifically, a target non-defective sample set and a target defective sample set are obtained according to a detection data set obtained by a defect detection model and a supervision data set obtained by a defect supervision network.
On the basis of the above embodiments, in some embodiments of the present disclosure, as shown in fig. 5, one possible implementation manner of S16 is:
s161: and adding the flawless tile images respectively included in the detection data set and the supervision data set to the initial flawless sample set to obtain a target flawless sample set.
Specifically, the terminal device, such as a computer, acquires the flawless tile images respectively included in the detection data set and the supervision data set, and adds the flawless tile images to the initial flawless sample set to obtain the target flawless sample set.
S162: and adding the defective tile images respectively included in the detection data set and the supervision data set to the initial defective sample set to obtain a target defective sample set.
Specifically, the terminal device, such as a computer, acquires the defective tile images included in the detection data set and the supervision data set, and adds the defective tile images to the initial defective sample set to obtain the target defective sample set.
On the basis of the above embodiments, in some embodiments of the present disclosure, one possible implementation manner of S162 is:
and respectively calculating the similarity of each defective tile image and samples corresponding to different defect types in the initial defective sample set.
And determining the defect type of the defective tile image according to the similarity, and adding the defect type to the initial defective sample set.
Specifically, the method includes the steps of obtaining defective tile images respectively included in a detection data set and a supervision data set, calculating similarity between each defective tile image and defective samples respectively corresponding to a plurality of defect categories of an initial defective sample set, determining a defect category of a defect in the defective tile image according to the similarity, and adding the defective tile image to a sample of the defect category corresponding to the initial defective sample set according to the defect category.
For example, for the similarity calculation between each defective tile image and the plurality of defect categories in the initial set of defective samples, a small number of defective samples may be extracted from the defective samples corresponding to the plurality of defect categories in the initial set of defective samples, for example, 3 defective samples may be extracted from each defect category, the similarity between the defective tile image and the 3 defective samples may be calculated, for example, the euclidean distance between the defective tile image and the 3 defective samples may be calculated, the defective tile images may be clustered by using the K-means clustering method, the minimum value of the clustering error may be compared with a set threshold, if the minimum value is smaller than the set threshold, the defective tile image may be most similar to the defect category and may satisfy the requirement of the label sample, and the defective tile image may be determined as the defect category.
S18: and respectively updating the abnormal detection network and the defect supervision network according to the target flawless sample set and the target flawed sample set.
Specifically, after a target flawless sample set and a target flawed sample set are obtained, the target flawless sample set is used for training an abnormal detection network so as to update the abnormal detection network, and the target flawed sample set is used for training a flawed supervision network model so as to update the flawed supervision network.
On the basis of the above embodiments, in some embodiments of the present disclosure, as shown in fig. 6, one possible implementation manner of S18 is:
s181: and when the number of the target flawless sample sets is larger than a first preset threshold value, updating the anomaly detection network by using the target flawless sample sets.
S182: and when the number of the target defective sample sets is larger than a second preset threshold value, updating the defect supervision network by using the target defective sample sets.
For example, the first preset threshold may be set to 1000 sheets, the second preset threshold may be set to 500 sheets, when the number of the target set of non-defective samples is greater than 1000 sheets, the abnormal detection network is trained by using the target set of non-defective samples, so as to update the abnormal detection network, and when it is determined that the number of the target set of defective samples is greater than 500 sheets, the defect supervision network model is trained by using the target set of defective samples, so as to update the defect supervision network.
In this way, the tile image set to be detected is input to the anomaly detection network, so that the anomaly detection network determines defective samples in the tile image set to be detected, and performs manual marking to obtain an initial defective sample set, wherein the anomaly detection network is obtained by training according to the initial non-defective sample set; obtaining a detection data set based on the tile image set to be detected and the anomaly detection network, wherein the detection data set comprises at least one of an image of an unblemished tile and an image of a flawed tile; obtaining a supervision data set based on the detection data set and a defect supervision network, wherein the defect supervision network is obtained by training according to an initial defective sample set, and the supervision data set comprises at least one of an unblemished tile image and a defective tile image; obtaining a target flawless sample set and a target flawed sample set according to the detection data set and the supervision data set; according to the method, an abnormal detection network and a flaw supervision network are respectively updated according to a target flawless sample set and a target flawed sample set, so that a tile image to be detected is predicted by adopting the abnormal detection network firstly to obtain a detection result corresponding to the tile image to be detected, the detection result is further confirmed and marked manually, excessive manual participation can be reduced, only a small number of initial flawed sample sets need to be marked, after a flaw supervision model is trained by utilizing the initial flawed sample sets, the corresponding training sample sets are automatically expanded by utilizing the abnormal detection network and the flaw supervision network, and the abnormal detection network and the flaw supervision network are updated by utilizing the expanded sample sets, so that the precision of detecting flaws on the surface of the tile image is improved.
It should be understood that although the various steps in the flowcharts of fig. 1-6 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 1-6 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 7, there is provided a tile defect detecting apparatus including: an initial flaw sample set obtaining module 10, a detection data set obtaining module 12, a supervision data set obtaining module 14, a sample set obtaining module 16 and an updating module 18.
The system comprises an initial flawed sample set obtaining module 10, a flawed sample set obtaining module and a flawed sample set obtaining module, wherein the initial flawed sample set obtaining module is used for inputting a tile image set to be detected into an abnormal detection network so as to enable the abnormal detection network to determine flawed samples in the tile image set to be detected and carry out manual marking to obtain an initial flawed sample set, and the abnormal detection network is obtained through training according to an initial flawless sample set;
a detection data set obtaining module 12, configured to obtain a detection data set based on the tile image set to be detected and the anomaly detection network, where the detection data set includes at least one of an image of an unblemished tile and an image of a flawed tile;
a supervision data set obtaining module 14, configured to obtain a supervision data set based on the detection data set and a defect supervision network, wherein the defect supervision network is trained according to an initial defective sample set, and the supervision data set includes at least one of an unblemished tile image and a defective tile image;
a sample set obtaining module 16, configured to obtain a target flawless sample set and a target flawed sample set according to the detection data set and the supervision data set;
and the updating module 18 is configured to update the anomaly detection network and the defect supervision network respectively according to the target flawless sample set and the target flawed sample set.
In an embodiment of the present invention, the detection data set obtaining module 12 is specifically configured to input the tile image set to be detected to the multi-scale feature extraction module to obtain a multi-scale feature map corresponding to each tile image to be detected; inputting the multi-scale characteristic graphs into a two-dimensional standardized flow module to obtain a flaw distribution probability graph corresponding to each scale characteristic graph; inputting flaw distribution probability graphs corresponding to the multi-scale feature graphs into a multi-scale feature aggregation module to obtain a detection image corresponding to each tile image to be detected; and obtaining a detection data set based on the detection images corresponding to the multiple to-be-detected tile images.
In an embodiment of the present invention, the detection data set obtaining module 12 is specifically further configured to input the multi-scale feature map into the sub-network component, so as to obtain a first spatial information feature map corresponding to each scale feature map; inputting the first spatial information characteristic diagram into a nonlinear segmentation and aggregation component to obtain a second spatial information characteristic diagram corresponding to each scale characteristic diagram; and inputting the second spatial information characteristic diagram into the activation function to obtain a flaw distribution probability diagram corresponding to each scale characteristic diagram.
In an embodiment of the present invention, the monitoring data set obtaining module 14 is specifically configured to obtain an image of a flawless tile in the detection data set; the method comprises the steps of conducting preset processing on an unblemished tile image, inputting the unblemished tile image after the preset processing into a flaw monitoring network to obtain a monitoring data set, wherein the preset processing comprises at least one of linear interpolation and secondary sampling.
In an embodiment of the present invention, the sample set obtaining module 16 is specifically configured to add an inpainted tile image included in the detection data set and an inpainted tile image included in the supervision data set to an initial inpainted sample set, so as to obtain a target inpainted sample set; and adding the defective tile images respectively included in the detection data set and the supervision data set to the initial defective sample set to obtain a target defective sample set.
In an embodiment of the present invention, the sample set obtaining module 16 is further configured to calculate similarity between each defective tile image and samples corresponding to different defect categories in the initial defective sample set; and determining the defect type of the defective tile image according to the similarity, and adding the defect type to an initial defective sample set.
In an embodiment of the present invention, the initial defective sample set obtaining module 10 is specifically configured to determine a defect type in each defective sample based on defective samples in a tile image set to be detected, where the defect type includes at least one of edge abnormality, corner abnormality, white point defect, light color block defect, and dark color block defect; based on each defective sample and the corresponding defect category, manual marking is performed to obtain an initial set of defective samples.
In an embodiment of the present invention, the updating module 18 is specifically configured to update the anomaly detection network by using the target flawless sample set when it is determined that the number of the target flawless sample sets is greater than a first preset threshold; and when the number of the target defective sample sets is larger than a second preset threshold value, updating the defect supervision network by using the target defective sample sets.
In the embodiment, the abnormal detection network is firstly adopted to predict the tile image to be detected so as to obtain the detection result corresponding to the tile image to be detected, the detection result is further confirmed and marked manually, excessive manual participation can be reduced, only a small number of initial flaw sample sets are required to be marked, after the initial flaw sample sets are used for training the flaw monitoring model, the abnormal detection network and the flaw monitoring network are used for automatically expanding the corresponding training sample sets respectively, and the abnormal detection network and the flaw monitoring network are updated by using the expanded sample sets, so that the precision of the detection of the surface flaws of the tile image is improved.
For the specific definition of the tile defect detecting device, reference is made to the above definition of the tile defect detecting method, which is not described herein again. The various modules in the server described above may be implemented in whole or in part by software, hardware, and combinations thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
An embodiment of the present disclosure provides an electronic device, including: the method for detecting the tile flaws provided by the embodiments of the present disclosure can be implemented when the processor executes the computer program, for example, the technical solution of any one of the method embodiments shown in fig. 1 to 6 can be implemented when the processor executes the computer program, and the implementation principle and the technical effect are similar, and are not described herein again.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, databases, or other media used in the embodiments provided by the present disclosure may include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM is available in many forms, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), and the like.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present disclosure, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for those skilled in the art, various changes and modifications can be made without departing from the concept of the present disclosure, and these changes and modifications are all within the scope of the present disclosure. Therefore, the protection scope of the present disclosure should be subject to the appended claims.

Claims (10)

1. A tile defect detection method, comprising:
inputting a tile image set to be detected into an anomaly detection network so that the anomaly detection network determines defective samples in the tile image set to be detected and carries out manual marking to obtain an initial defective sample set, wherein the anomaly detection network is obtained by training according to an initial flawless sample set;
obtaining a detection data set based on the tile image set to be detected and the anomaly detection network, wherein the detection data set comprises at least one of an unblemished tile image and a flawed tile image;
obtaining a supervision data set based on the detection data set and a defect supervision network, wherein the defect supervision network is trained according to the initial flawed sample set, and the supervision data set comprises at least one of flawless tile images and flawed tile images;
obtaining a target flawless sample set and a target flawed sample set according to the detection data set and the supervision data set;
and respectively updating the abnormal detection network and the defect supervision network according to the target flawless sample set and the target flawed sample set.
2. The method of claim 1, wherein the anomaly detection network comprises a multi-scale feature extraction module, a two-dimensional normalized flow module, and a multi-scale feature aggregation module;
obtaining a detection data set based on the tile image set to be detected and the anomaly detection network, wherein the detection data set comprises:
inputting the tile image set to be detected into the multi-scale feature extraction module to obtain a multi-scale feature map corresponding to each tile image to be detected;
inputting the multi-scale characteristic diagram into the two-dimensional standardized flow module to obtain a flaw distribution probability diagram corresponding to each scale characteristic diagram;
inputting the flaw distribution probability maps respectively corresponding to the multi-scale feature maps into a multi-scale feature aggregation module to obtain a detection image corresponding to each tile image to be detected;
and obtaining the detection data set based on the detection images corresponding to the multiple to-be-detected tile images.
3. The method of claim 2, wherein the two-dimensional standardized flow module comprises at least one two-dimensional standardized flow network and an activation function corresponding to each two-dimensional standardized flow network, the two-dimensional standardized flow network comprising a sub-network component and a non-linear partitioned aggregation component, the sub-network component being composed of a plurality of two-dimensional convolutional layers;
inputting the multi-scale feature map into the two-dimensional standardized flow module to obtain a flaw distribution probability map corresponding to each scale feature map, wherein the method comprises the following steps:
inputting the multi-scale feature maps into the sub-network components to obtain first spatial information feature maps corresponding to the feature maps of each scale;
inputting the first spatial information characteristic diagram into the nonlinear segmentation and aggregation component to obtain a second spatial information characteristic diagram corresponding to each scale characteristic diagram;
and inputting the second spatial information characteristic diagram into the activation function to obtain the flaw distribution probability diagram corresponding to each scale characteristic diagram.
4. The method of claim 1, wherein deriving a supervised data set based on the inspection data set and a fault supervision network comprises:
acquiring an image of the flawless ceramic tile in the detection data set;
and performing preset processing on the flawless ceramic tile image, and inputting the flawless ceramic tile image after the preset processing into the flawed supervision network to obtain the supervision data set, wherein the preset processing comprises at least one of linear interpolation and secondary sampling.
5. The method of claim 1, wherein obtaining a target set of unblemished samples and a target set of flawed samples from the inspection dataset and the supervisory dataset comprises:
adding the flawless tile images respectively included in the detection data set and the supervision data set to the initial flawless sample set to obtain a target flawless sample set;
and adding the defective tile images respectively included in the detection data set and the supervision data set to the initial defective sample set to obtain a target defective sample set.
6. The method of claim 5, wherein said adding said defective tile image comprised in said inspection data set and said supervisory data set to said initial defective sample set to obtain a target defective sample set comprises:
respectively calculating the similarity of each defective tile image and samples corresponding to different defect types in the initial defective sample set;
and determining the defect type of the defective tile image according to the similarity, and adding the defect type to the initial defective sample set.
7. The method according to claim 1, wherein said determining a set of defective samples in said set of images of tiles to be inspected and manually marking them to obtain an initial set of defective samples comprises:
determining a defect type in each sample with defects based on the sample with defects in the image set of the ceramic tile to be detected, wherein the defect type comprises at least one of edge abnormality, corner abnormality, white point defect, light color block defect and dark color block defect;
manually marking to obtain the initial set of defective samples based on each of the defective samples and the corresponding defective category.
8. The method of claim 1, wherein said updating said anomaly detection network and said fault supervision network based on said target set of unblemished samples and said target set of flawed samples, respectively, comprises:
when the number of the target flawless sample sets is larger than a first preset threshold value, updating the abnormal detection network by using the target flawless sample sets;
and when the number of the target defective sample sets is larger than a second preset threshold value, updating the defect supervision network by using the target defective sample sets.
9. A tile defect detection device, comprising:
an initial flawed sample set obtaining module, configured to input a tile image set to be detected to an anomaly detection network, so that the anomaly detection network determines flawed samples in the tile image set to be detected, and performs manual marking to obtain an initial flawed sample set, where the anomaly detection network is obtained by training according to an initial flawless sample set;
a detection data set obtaining module, configured to obtain a detection data set based on the tile image set to be detected and the anomaly detection network, where the detection data set includes at least one of an unblemished tile image and a flawed tile image;
a supervision data set obtaining module, configured to obtain a supervision data set based on the detection data set and a defect supervision network, where the defect supervision network is trained according to the initial defective sample set, and the supervision data set includes at least one of an unblemished tile image and a defective tile image;
a sample set obtaining module, configured to obtain a target flawless sample set and a target flawed sample set according to the detection data set and the supervision data set;
and the updating module is used for respectively updating the abnormal detection network and the defect supervision network according to the target flawless sample set and the target flawed sample set.
10. An electronic device comprising a memory and a processor, said memory storing a computer program, wherein said processor when executing said computer program implements the steps of the tile defect detection method of any one of claims 1 to 8.
CN202111658072.1A 2021-12-30 2021-12-30 Ceramic tile flaw detection method and device and electronic equipment Pending CN114299040A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111658072.1A CN114299040A (en) 2021-12-30 2021-12-30 Ceramic tile flaw detection method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111658072.1A CN114299040A (en) 2021-12-30 2021-12-30 Ceramic tile flaw detection method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN114299040A true CN114299040A (en) 2022-04-08

Family

ID=80972694

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111658072.1A Pending CN114299040A (en) 2021-12-30 2021-12-30 Ceramic tile flaw detection method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN114299040A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115205650A (en) * 2022-09-15 2022-10-18 成都考拉悠然科技有限公司 Unsupervised abnormal positioning and detecting method and unsupervised abnormal positioning and detecting device based on multi-scale standardized flow
CN117274249A (en) * 2023-11-20 2023-12-22 江西省中鼐科技服务有限公司 Ceramic tile appearance detection method and system based on artificial intelligent image technology

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115205650A (en) * 2022-09-15 2022-10-18 成都考拉悠然科技有限公司 Unsupervised abnormal positioning and detecting method and unsupervised abnormal positioning and detecting device based on multi-scale standardized flow
CN117274249A (en) * 2023-11-20 2023-12-22 江西省中鼐科技服务有限公司 Ceramic tile appearance detection method and system based on artificial intelligent image technology
CN117274249B (en) * 2023-11-20 2024-03-01 江西省中鼐科技服务有限公司 Ceramic tile appearance detection method and system based on artificial intelligent image technology

Similar Documents

Publication Publication Date Title
WO2021143343A1 (en) Method and device for testing product quality
CN113516650B (en) Circuit board hole plugging defect detection method and device based on deep learning
CN113239930B (en) Glass paper defect identification method, system, device and storage medium
CN113592828B (en) Nondestructive testing method and system based on industrial endoscope
CN114299040A (en) Ceramic tile flaw detection method and device and electronic equipment
CN112766110A (en) Training method of object defect recognition model, object defect recognition method and device
WO2024002187A1 (en) Defect detection method, defect detection device, and storage medium
CN111861966B (en) Model training method and device and defect detection method and device
US12094098B2 (en) Defect management apparatus, method and non-transitory computer readable medium
CN111242899B (en) Image-based flaw detection method and computer-readable storage medium
CN116128839A (en) Wafer defect identification method, device, electronic equipment and storage medium
CN111754502A (en) Method for detecting surface defects of magnetic core based on fast-RCNN algorithm of multi-scale feature fusion
CN115661160B (en) Panel defect detection method, system, device and medium
CN113962980A (en) Glass container flaw detection method and system based on improved YOLOV5X
CN117853826B (en) Object surface precision identification method based on machine vision and related equipment
CN116542984A (en) Hardware defect detection method, device, computer equipment and storage medium
CN115546211A (en) Welding spot defect classification method, terminal and computer storage medium
CN114881996A (en) Defect detection method and device
CN110852318A (en) Drainage pipeline defect accurate positioning method and system
CN113744252A (en) Method, apparatus, storage medium and program product for marking and detecting defects
CN113762330A (en) Method and device for optimizing service configuration in dynamic network
CN111738991A (en) Method for creating digital ray detection model of weld defects
CN115082650A (en) Implementation method of automatic pipeline defect labeling tool based on convolutional neural network
CN118155004B (en) Training method and device for defect classification model aiming at surface defects of diaphragm
CN113344858B (en) Feature detection method, device and computer storage medium

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