CN114240892A - Unsupervised industrial image anomaly detection method and system based on knowledge distillation - Google Patents
Unsupervised industrial image anomaly detection method and system based on knowledge distillation Download PDFInfo
- Publication number
- CN114240892A CN114240892A CN202111555291.7A CN202111555291A CN114240892A CN 114240892 A CN114240892 A CN 114240892A CN 202111555291 A CN202111555291 A CN 202111555291A CN 114240892 A CN114240892 A CN 114240892A
- Authority
- CN
- China
- Prior art keywords
- image
- network
- feature
- knowledge distillation
- industrial
- 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
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 54
- 238000013140 knowledge distillation Methods 0.000 title claims abstract description 32
- 238000012549 training Methods 0.000 claims abstract description 40
- 238000000034 method Methods 0.000 claims abstract description 33
- 238000012360 testing method Methods 0.000 claims abstract description 11
- 230000002159 abnormal effect Effects 0.000 claims description 28
- 238000005065 mining Methods 0.000 claims description 17
- 230000005856 abnormality Effects 0.000 claims description 10
- 239000013598 vector Substances 0.000 claims description 8
- 239000000126 substance Substances 0.000 claims description 7
- 238000003860 storage Methods 0.000 claims description 6
- 230000003044 adaptive effect Effects 0.000 claims description 5
- 238000004364 calculation method Methods 0.000 claims description 4
- 238000010586 diagram Methods 0.000 claims description 4
- 238000010606 normalization Methods 0.000 claims description 3
- 238000005070 sampling Methods 0.000 claims 1
- 238000011524 similarity measure Methods 0.000 claims 1
- 238000004519 manufacturing process Methods 0.000 abstract description 6
- 238000005457 optimization Methods 0.000 abstract description 6
- 238000012545 processing Methods 0.000 abstract description 4
- 230000004927 fusion Effects 0.000 abstract description 3
- 238000007689 inspection Methods 0.000 abstract description 2
- 230000011218 segmentation Effects 0.000 abstract 1
- 230000008569 process Effects 0.000 description 15
- 230000006870 function Effects 0.000 description 12
- 238000013528 artificial neural network Methods 0.000 description 6
- 238000000605 extraction Methods 0.000 description 5
- 238000013135 deep learning Methods 0.000 description 4
- 238000009826 distribution Methods 0.000 description 4
- 239000004576 sand Substances 0.000 description 4
- 230000002547 anomalous effect Effects 0.000 description 2
- 238000009412 basement excavation Methods 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000006872 improvement Effects 0.000 description 2
- 239000011159 matrix material Substances 0.000 description 2
- 229910000831 Steel Inorganic materials 0.000 description 1
- 238000012937 correction Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000003745 diagnosis Methods 0.000 description 1
- 238000010191 image analysis Methods 0.000 description 1
- 238000009776 industrial production Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000010959 steel Substances 0.000 description 1
- 239000004753 textile Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0004—Industrial image inspection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F17/00—Digital computing or data processing equipment or methods, specially adapted for specific functions
- G06F17/10—Complex mathematical operations
- G06F17/16—Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformation in the plane of the image
- G06T3/40—Scaling the whole image or part thereof
- G06T3/4023—Decimation- or insertion-based scaling, e.g. pixel or line decimation
-
- G06T5/70—
Abstract
The invention discloses an unsupervised industrial image anomaly detection method and system based on knowledge distillation, and belongs to the technical field of industrial image processing. The method comprises two stages of training and testing, and consists of multi-scale knowledge distillation and multi-scale abnormity fusion, wherein the multi-scale knowledge distillation comprises a teacher network and a student network, difficult samples are dynamically mined by using self-adaptive difficult samples, and the student network is optimized by using the pixel and context similarity among the difficult samples. Only using the normal industrial image in the training stage to carry out knowledge distillation from a teacher network to a student network, and carrying out iterative optimization on student network parameters to enable the depth characteristics of the student network and the normal industrial product image extracted by the teacher network to be similar; in the testing stage, the depth features of the tested image are respectively extracted, and the regression error between the features can be used for image abnormity segmentation and detection. The method effectively improves the performance of unsupervised industrial image anomaly detection, reduces the labor cost, and improves the automation and intelligentization level of production line quality inspection.
Description
Technical Field
The invention belongs to the technical field of industrial image processing, and further relates to an unsupervised industrial image anomaly detection method and system based on knowledge distillation.
Background
The automatic detection of the quality of industrial products is vital, and the product quality detection performance and the production efficiency of a production line can be improved by the industrial image anomaly detection technology. Currently most industries, for example: in the industries of steel, textile, semiconductors and the like, the detection of the product quality still mainly depends on manual experience, and detection personnel are easy to fatigue after working for a long time, so that false detection and missed detection are caused. The image processing-based industrial image anomaly detection technology is developed, and can replace manual work to effectively detect the quality of industrial products. The traditional industrial image anomaly detection based on image processing comprises the following main processes: the method comprises the steps of collecting images, extracting features and carrying out abnormal scoring, wherein the feature extraction part is highly dependent on expert knowledge and is difficult to generalize to different scenes. The industrial image anomaly detection method based on deep learning does not need manual prior, can accelerate the deployment of product quality inspection, improves the detection performance and the detection speed, and is gradually becoming a mainstream method.
However, because the frequency of occurrence of the abnormality in the industrial production line is low, the collected normal data is far greater than the abnormal data, and therefore the unsupervised deep learning abnormality detection method is significant.
Disclosure of Invention
Aiming at the defects or improvement requirements of the prior art, the invention provides an unsupervised industrial image anomaly detection method based on knowledge distillation, which aims to detect the image anomaly of an industrial product by utilizing the strong feature expression capability of deep learning, does not need to label anomaly data in the parameter optimization stage, effectively improves the detection efficiency, reduces the manufacturing cost and has adaptability to the image anomaly detection of different types of industrial products.
In order to achieve the purpose, the invention provides an unsupervised industrial image anomaly detection method based on knowledge distillation, which comprises the following steps:
a training stage:
taking a normal industrial product image as a training sample image, and training by using the sample image to generate an abnormality detection model, wherein the abnormality detection model comprises a teacher network and a student network, the teacher network is used for extracting a first feature of an input image, and the student network is used for extracting a second feature of the input image;
extracting hard samples from the first feature and the second feature through adaptive hard mining;
improving an objective function of a student network in a knowledge distillation mode by using the difficult sample, and training to generate an abnormal detection model;
and (3) a testing stage:
and inputting the image to be detected into the trained anomaly detection model to obtain anomaly scores of different scales, and fusing the anomaly scores of all scales by using multiplication to obtain a final anomaly score map so as to finish the image anomaly detection.
The anomaly detection model can be divided into a multi-scale knowledge distillation module and a multi-scale anomaly fusion module, and the multi-scale knowledge distillation module comprises a teacher network and a student network.
The depth features extracted by the deep neural network trained on the large-scale natural image data set have high discriminability and can be used as an effective industrial image feature extractor. The normal industrial image features extracted through the pre-training deep neural network are often distributed in a compact manifold of a high-dimensional feature space. The abnormal industrial image features are distributed more dispersedly and far away from the normal feature manifold. The distribution of the normal feature manifold is modeled using model G (θ):
where M represents the normal feature manifold. Theoretically, when G (theta) can accurately describe a normal characteristic manifold, G (x; theta) can accurately judge whether test data belongs to the manifold. However, the general model is difficult to accurately give the classification result, but gives the probability, and needs to manually give a threshold value for further truncation:
G(x;θ)=y (2)
in general, a larger y indicates a higher probability that the data is anomalous. Because training data is limited and distribution is unknown during actual training, it is difficult to directly learn G (theta) to describe the normal feature manifold. Knowledge distillation can be used for implicit learning of normal characteristic manifold, and the corresponding model G can be represented as G (T, S), wherein T represents a teacher network and is a pre-training network with high discriminability, and S represents a student network with the same network structure as the teacher network. The corresponding abnormality discrimination model is:
wherein, FTAnd FSAnd (3) respectively representing the characteristic extractors of the teacher network and the student network, wherein the essence of the formula (3) is to calculate the characteristic difference obtained by extraction of the teacher network and the student network. In order for formula (3) to satisfy the condition of formula (2), that is: when the test data are normal data, the abnormal score is small; when the test data are abnormal data, the abnormal score is large, the normal data features extracted by the T and the S are required to be similar as much as possible, and the abnormal data features are different as much as possible. Through knowledge distillation on normal data, the characteristics of the normal data extracted by T and S are similar as much as possible; meanwhile, S does not learn the abnormal data characteristics extracted by T, and the abnormal data characteristics extracted by T are different greatly. The knowledge distillation procedure is specifically described below.
Given an image I, extracting corresponding image features f through S and TT,fS:
fT=FT(I) (4)
fS=FS(I) (5)
Suppose fT,fSHas a resolution of H × W and a dimension of D. To fT,fSAnd (3) carrying out normalization:
considering different scale characteristics extracted from deep neural networkThe characteristic diagram of the l-th layer is shown.
In order to make the normal data characteristics extracted by T and S as similar as possible, the normal data characteristics can be directly optimized Defining a pixel level penalty as:
wherein the content of the first and second substances,indicates the total scale degree, H(l)×W(l)Representing the dimensions of the respective dimensions. By optimizing the pixel level loss of the normal sample features, the T and the S extracted normal data features can be similar. However, in the actual training process, the parameters of the selected T and S are usually large, and the similarity between normal industrial images is extremely high, so that sufficient knowledge is difficult to extract, and the overfitting problem occurs in the training process. That is, the normal data features of the training set extracted by the T and S are very similar, but a large regression error still exists in the actual use process, resulting in the reduction of the abnormal detection performance. To alleviate overfittingThe method further optimizes the training process by using context similarity loss and self-adaptive hard-case mining.
In the knowledge distillation training process, the loss function used determines how the student network learns the knowledge of the teacher network. To alleviate the overfitting problem, the contextual similarity of the student network and the teacher network extracted features may be constrained. Intuitively, if the context similarity between the student network and the teacher network is high, they should have the same similarity relationship between the extracted depth features of the same input image. Since the depth features have been normalized to a unit hypersphere, its similarity relationship can be defined by cosine similarity:
wherein Q (f) e RN×DPresentation pairA stretching operation is performed, where D represents the feature dimension and N represents the number of features. G (f) represents similarity calculation, G (f)T)(l)And G (f)S)(l)The value of the middle coordinate (i, j) encodes Q (f)T)(l)The ith vector and Q (f)S)(l)The similarity of the jth vector. The contextual similarity loss may be calculated by constraining a similarity matrix between the teacher network and the student network:
wherein N is(l)=H(l)×W(l)Represents QT (l),QS (l)The number of vectors contained in (a). Considering contextual similarityThe final loss function may then be defined as:
L(fT,fS)=Lps(fT,fS)+λLcs(fT,fS) (13)
wherein λ is a hyper-parametric weight that controls pixel similarity and context similarity loss.
During training, difficult samples should play a greater role, while simple samples do not require continuous optimization. The existing method adopts a fixed threshold value to judge whether any sample is a sample which is difficult to sample, but the fixed threshold value is difficult to select, and the threshold values required by different tasks are different. The invention uses a self-adaptive difficult case mining strategy to dynamically mine difficult cases in real time. More specifically, a difficult case mining strategy for measuring the difficulty degree of a sample in real time is provided. The difficult-to-mine strategy may be defined as follows:
m(l,t)=αm(l,t-1)+(1-α)(μ(l,t)+βσ(l,t)) (14)
wherein the content of the first and second substances,and (5) extracting the depth feature difference with the feature map position (i, j) by the teacher network and the student network in the t-th iteration. Mu.s(l,t),σ(l,t)Is composed ofAnd thus may be based on μ(l,t),σ(l,t)And dynamically judging the difficulty level of the sample. The formula (14) uses an exponential moving average method to avoid extreme value noise generated in each iteration process, so that the dynamic threshold value m(l,t)The change is smoother. α is control m(l,t)And beta is a hyper-parameter for controlling the difficulty degree of the mining obtained sample. Generally speaking, the larger β, the fewer the number of samples mined, and the greater the difficulty in the training batch. Difficult excavation can be extracted by the following formula:
wherein (i)h,jh) Representing the coordinates of the difficult sample obtained by final extraction, and representing the corresponding teacher network characteristic and student network characteristic asAfter the hard samples are mined, the loss function is calculated by using the hard samples obtained by mining, so that the hard samples can play a greater role in the training process, and the meaningless optimization of simple samples is avoided. The hard mined penalty function may be defined as:
after training, the student network can extract features similar to the features of the normal data extracted by the teacher network, namely the student network implicitly describes the normal data manifold extracted by the teacher network. At this time, the anomaly score can be calculated according to equation (3). Specifically, the anomaly score is calculated as follows:
to obtain better performance, the anomaly scores of each scale are fused using multiplication:
the Upsample () is an upsampling function, and upsamples abnormal score maps of different scales to the resolution of the input image through quadratic linear interpolation. AS(f)And providing a reference for subsequent decision-making for the final abnormal score map.
In another aspect, the present invention provides an unsupervised industrial image anomaly detection system based on knowledge distillation, comprising: a computer-readable storage medium and a processor;
the computer-readable storage medium is used for storing executable instructions;
the processor is used for reading executable instructions stored in the computer readable storage medium and executing the unsupervised industrial image anomaly detection method based on knowledge distillation.
According to the unsupervised industrial image anomaly detection method based on knowledge distillation, an end-to-end deep learning anomaly detection model is established, the problem of cold start of a production line due to insufficient abnormal samples in the early stage can be solved, the unsupervised industrial image anomaly detection performance is improved, the automation level of production line quality detection based on image analysis is effectively improved, and services can be provided for subsequent supervised anomaly detection and anomaly diagnosis.
Drawings
FIG. 1 is a schematic diagram of an unsupervised industrial image anomaly detection method based on knowledge distillation.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. In addition, the technical features involved in the embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
The invention provides an unsupervised industrial image anomaly detection method based on knowledge distillation, which comprises the following steps of:
a training stage:
taking a normal industrial product image as a training sample image, and training by using the sample image to generate an abnormality detection model, wherein the abnormality detection model comprises a teacher network and a student network, the teacher network is used for extracting a first feature of an input image, and the student network is used for extracting a second feature of the input image;
extracting hard samples from the first feature and the second feature through adaptive hard mining;
improving an objective function of a student network in a knowledge distillation mode by using the difficult sample, and training to generate an abnormal detection model;
and (3) a testing stage:
and inputting the image to be detected into the trained anomaly detection model to obtain anomaly scores of different scales, and fusing the anomaly scores of all scales by using multiplication to obtain a final anomaly score map so as to finish the image anomaly detection.
The anomaly detection model can be divided into a multi-scale knowledge distillation module and a multi-scale anomaly fusion module, and the multi-scale knowledge distillation module comprises a teacher network and a student network. The depth features extracted by the deep neural network trained on the large-scale natural image data set have high discriminability and can be used as an effective industrial image feature extractor. The normal industrial image features extracted through the pre-training deep neural network are often distributed in a compact manifold of a high-dimensional feature space. The abnormal industrial image features are distributed more dispersedly and far away from the normal feature manifold. The distribution of the normal feature manifold is modeled using model G (θ):
where M represents the normal feature manifold. Theoretically, when G (theta) can accurately describe a normal characteristic manifold, G (x; theta) can accurately judge whether test data belongs to the manifold. However, the general model is difficult to accurately give the classification result, but gives the probability, and needs to manually give a threshold value for further truncation:
G(x;θ)=y (2)
in general, a larger y indicates a higher probability that the data is anomalous. Because training data is limited and distribution is unknown during actual training, it is difficult to directly learn G (theta) to describe the normal feature manifold. Knowledge distillation can be used for implicit learning of normal characteristic manifold, and the corresponding model G can be represented as G (T, S), wherein T represents a teacher network and is a pre-training network with high discriminability, and S represents a student network with the same network structure as the teacher network. The corresponding abnormality discrimination model is:
wherein, FTAnd FSAnd (3) respectively representing the characteristic extractors of the teacher network and the student network, wherein the essence of the formula (3) is to calculate the characteristic difference obtained by extraction of the teacher network and the student network. In order for formula (3) to satisfy the condition of formula (2), that is: when the test data are normal data, the abnormal score is small; when the test data are abnormal data, the abnormal score is large, the normal data features extracted by the T and the S are required to be similar as much as possible, and the abnormal data features are different as much as possible. Through knowledge distillation on normal data, the characteristics of the normal data extracted by T and S are similar as much as possible; meanwhile, S does not learn the abnormal data characteristics extracted by T, and the abnormal data characteristics extracted by T are different greatly. The knowledge distillation procedure is specifically described below.
Given an image I, extracting corresponding image features f through S and TT,fS:
fT=FT(I) (4)
fS=FS(I) (5)
Suppose fT,fSHas a resolution of H × W and a dimension of D. To fT,fSAnd (3) carrying out normalization:
considering different scale characteristics extracted from deep neural networkThe characteristic diagram of the l-th layer is shown.
In order to make the normal data characteristics extracted by T and S as similar as possible, the normal data characteristics can be directly optimized Defining a pixel level penalty as:
wherein the content of the first and second substances,indicates the total scale degree, H(l)×W(l)Representing the dimensions of the respective dimensions. By optimizing the pixel level loss of the normal sample features, the T and the S extracted normal data features can be similar. However, in the actual training process, the parameters of the selected T and S are usually large, and the similarity between normal industrial images is extremely high, so that sufficient knowledge is difficult to extract, and the overfitting problem occurs in the training process. I.e. training set correction obtained by T and S extractionThe characteristics of constant data are very similar, but a larger regression error still exists in the actual use process, so that the abnormal detection performance is reduced. To alleviate the overfitting problem, the method further optimizes the training process by using context similarity loss and adaptive hard case mining.
In the knowledge distillation training process, the loss function used determines how the student network learns the knowledge of the teacher network. To alleviate the overfitting problem, the contextual similarity of the student network and the teacher network extracted features may be constrained. Intuitively, if the context similarity between the student network and the teacher network is high, they should have the same similarity relationship between the extracted depth features of the same input image. Since the depth features have been normalized to a unit hypersphere, its similarity relationship can be defined by cosine similarity:
wherein Q (f) e RN×DPresentation pairA stretching operation is performed, where D represents the feature dimension and N represents the number of features. G (f) represents similarity calculation, G (f)T)(l)And G (f)S)(l)The value of the middle coordinate (i, j) encodes Q (f)T)(l)The ith vector and Q (f)S)(l)The similarity of the jth vector. The contextual similarity loss may be calculated by constraining a similarity matrix between the teacher network and the student network:
wherein N is(l)=H(l)×W(l)Represents QT (l),QS (l)The number of vectors contained in (a). Considering the context similarity, the final penalty function can be defined as:
L(fT,fS)=Lps(fT,fS)+λLcs(fT,fS) (13)
wherein λ is a hyper-parametric weight that controls pixel similarity and context similarity loss.
During training, difficult samples should play a greater role, while simple samples do not require continuous optimization. The existing method adopts a fixed threshold value to judge whether any sample is a sample which is difficult to sample, but the fixed threshold value is difficult to select, and the threshold values required by different tasks are different. In the invention, a self-adaptive difficult case mining strategy is used for dynamically mining difficult cases in real time, and only the difficult case samples obtained by mining are used for loss calculation, as shown in AHSM (adaptive Hard Sample mining) in FIG. 1. More specifically, a difficult case mining strategy for measuring the difficulty degree of a sample in real time is provided. The difficult-to-mine strategy may be defined as follows:
m(l,t)=αm(l,t-1)+(1-α)(μ(l,t)+βσ(l,t)) (14)
wherein the content of the first and second substances,extracting feature maps from the teacher network and the student network for the tth iterationThe depth feature difference with position (i, j). Mu.s(l,t),σ(l,t)Is composed ofAnd thus may be based on μ(l,t),σ(l,t)And dynamically judging the difficulty level of the sample. The formula (14) uses an exponential moving average method to avoid extreme value noise generated in each iteration process, so that the dynamic threshold value m(l,t)The change is smoother. α is control m(l,t)And beta is a hyper-parameter for controlling the difficulty degree of the mining obtained sample. Generally speaking, the larger β, the fewer the number of samples mined, and the greater the difficulty in the training batch. Difficult excavation can be extracted by the following formula:
wherein (i)h,jh) Representing the coordinates of the difficult sample obtained by final extraction, and representing the corresponding teacher network characteristic and student network characteristic asAfter the hard samples are mined, the loss function is calculated by using the hard samples obtained by mining, so that the hard samples can play a greater role in the training process, and the meaningless optimization of simple samples is avoided. The hard mined penalty function may be defined as:
after training, the student network can extract features similar to the features of the normal data extracted by the teacher network, namely the student network implicitly describes the normal data manifold extracted by the teacher network. At this time, the anomaly score can be calculated according to equation (3). Specifically, the anomaly score is calculated as follows:
to obtain better performance, the anomaly scores of each scale are fused using multiplication:
the Upsample () is an upsampling function, and upsamples abnormal score maps of different scales to the resolution of the input image through quadratic linear interpolation. AS(f)And providing a reference for subsequent decision-making for the final abnormal score map.
It will be understood by those skilled in the art that the foregoing is only a preferred embodiment of the present invention, and is not intended to limit the invention, and that any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall be included in the scope of the present invention.
Claims (8)
1. An unsupervised industrial image anomaly detection method based on knowledge distillation is characterized by comprising the following steps:
a training stage:
taking a normal industrial product image as a training sample image, and training by using the sample image to generate an abnormality detection model, wherein the abnormality detection model comprises a teacher network and a student network, the teacher network is used for extracting a first feature of an input image, and the student network is used for extracting a second feature of the input image;
extracting hard samples from the first feature and the second feature through adaptive hard mining;
improving an objective function of a student network in a knowledge distillation mode by using the difficult sample, and training to generate an abnormal detection model;
and (3) a testing stage:
and inputting the image to be detected into the trained anomaly detection model to obtain anomaly scores of different scales, and fusing the anomaly scores of all scales by using multiplication to obtain a final anomaly score map so as to finish the image anomaly detection.
3. The method of claim 2, wherein the difficult case sample is represented as:
m(l,t)=αm(l,t-1)+(1-α)(μ(l,t)+βσ(l,t))
wherein the content of the first and second substances,a feature diagram representing the teacher network and the student network at layer l,in the t-th iteration, the depth feature difference with the feature map position (i, j) is extracted by the teacher network and the student network, and m is(l,t)To dynamic threshold, μ(l,t)、σ(l,t)Is composed ofA is control m(l,t)And beta is a hyper-parameter for controlling the difficulty degree of the mining obtained sample.
4. The method of claim 3, wherein the objective function is:
wherein L ispsFor loss of pixel similarity, LcsIn order for the context to be lost in similarity,the first feature and the second feature corresponding to the sample difficult to sample are shown, and lambda is a super-parameter weight for controlling pixel similarity loss and context similarity loss.
6. The method of claim 4, wherein the contextual similarity measure is lost as:
wherein the content of the first and second substances,indicates the total scale degree, H(l)×W(l)Denotes the size of the respective scale, Q (f) e RN×DPresentation pairPerforming a stretching operation, wherein D represents feature dimension, N represents feature number, G (f) represents similarity calculation, and G (f)T)(l)And G (f)S)(l)The value of the middle coordinate (i, j) encodes Q (f)T)(l)The ith vector and Q (f)S)(l)The similarity of the jth vector.
7. The method of claim 3, wherein the anomaly score is calculated as follows:
the anomaly scores for each scale are fused using multiplication:
8. An unsupervised industrial image anomaly detection system based on knowledge distillation, comprising: a computer-readable storage medium and a processor;
the computer-readable storage medium is used for storing executable instructions;
the processor is used for reading executable instructions stored in the computer readable storage medium and executing the unsupervised industrial image anomaly detection method based on knowledge distillation, as claimed in any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111555291.7A CN114240892A (en) | 2021-12-17 | 2021-12-17 | Unsupervised industrial image anomaly detection method and system based on knowledge distillation |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111555291.7A CN114240892A (en) | 2021-12-17 | 2021-12-17 | Unsupervised industrial image anomaly detection method and system based on knowledge distillation |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114240892A true CN114240892A (en) | 2022-03-25 |
Family
ID=80758577
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111555291.7A Pending CN114240892A (en) | 2021-12-17 | 2021-12-17 | Unsupervised industrial image anomaly detection method and system based on knowledge distillation |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114240892A (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114742799A (en) * | 2022-04-18 | 2022-07-12 | 华中科技大学 | Industrial scene unknown type defect segmentation method based on self-supervision heterogeneous network |
CN114782694A (en) * | 2022-06-21 | 2022-07-22 | 中国科学技术大学 | Unsupervised anomaly detection method, system, device and storage medium |
CN115239638A (en) * | 2022-06-28 | 2022-10-25 | 厦门微图软件科技有限公司 | Industrial defect detection method, device and equipment and readable storage medium |
CN116028891A (en) * | 2023-02-16 | 2023-04-28 | 之江实验室 | Industrial anomaly detection model training method and device based on multi-model fusion |
CN116630286A (en) * | 2023-05-31 | 2023-08-22 | 博衍科技(珠海)有限公司 | Method, device, equipment and storage medium for detecting and positioning image abnormality |
CN116993694A (en) * | 2023-08-02 | 2023-11-03 | 江苏济远医疗科技有限公司 | Non-supervision hysteroscope image anomaly detection method based on depth feature filling |
WO2024000372A1 (en) * | 2022-06-30 | 2024-01-04 | 宁德时代新能源科技股份有限公司 | Defect detection method and apparatus |
CN114742799B (en) * | 2022-04-18 | 2024-04-26 | 华中科技大学 | Industrial scene unknown type defect segmentation method based on self-supervision heterogeneous network |
-
2021
- 2021-12-17 CN CN202111555291.7A patent/CN114240892A/en active Pending
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114742799A (en) * | 2022-04-18 | 2022-07-12 | 华中科技大学 | Industrial scene unknown type defect segmentation method based on self-supervision heterogeneous network |
CN114742799B (en) * | 2022-04-18 | 2024-04-26 | 华中科技大学 | Industrial scene unknown type defect segmentation method based on self-supervision heterogeneous network |
CN114782694A (en) * | 2022-06-21 | 2022-07-22 | 中国科学技术大学 | Unsupervised anomaly detection method, system, device and storage medium |
CN114782694B (en) * | 2022-06-21 | 2022-09-30 | 中国科学技术大学 | Unsupervised anomaly detection method, system, device and storage medium |
CN115239638A (en) * | 2022-06-28 | 2022-10-25 | 厦门微图软件科技有限公司 | Industrial defect detection method, device and equipment and readable storage medium |
WO2024000372A1 (en) * | 2022-06-30 | 2024-01-04 | 宁德时代新能源科技股份有限公司 | Defect detection method and apparatus |
CN116028891A (en) * | 2023-02-16 | 2023-04-28 | 之江实验室 | Industrial anomaly detection model training method and device based on multi-model fusion |
CN116028891B (en) * | 2023-02-16 | 2023-07-14 | 之江实验室 | Industrial anomaly detection model training method and device based on multi-model fusion |
CN116630286A (en) * | 2023-05-31 | 2023-08-22 | 博衍科技(珠海)有限公司 | Method, device, equipment and storage medium for detecting and positioning image abnormality |
CN116630286B (en) * | 2023-05-31 | 2024-02-13 | 博衍科技(珠海)有限公司 | Method, device, equipment and storage medium for detecting and positioning image abnormality |
CN116993694A (en) * | 2023-08-02 | 2023-11-03 | 江苏济远医疗科技有限公司 | Non-supervision hysteroscope image anomaly detection method based on depth feature filling |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114240892A (en) | Unsupervised industrial image anomaly detection method and system based on knowledge distillation | |
CN111598881B (en) | Image anomaly detection method based on variational self-encoder | |
CN112964469B (en) | Online fault diagnosis method for rolling bearing under variable load of transfer learning | |
CN112819802B (en) | Method for supervising and predicting blast furnace condition abnormality based on tuyere information deep learning | |
Freytag et al. | Labeling examples that matter: Relevance-based active learning with gaussian processes | |
CN112017204A (en) | Tool state image classification method based on edge marker graph neural network | |
CN115147418A (en) | Compression training method and device for defect detection model | |
CN115994900A (en) | Unsupervised defect detection method and system based on transfer learning and storage medium | |
CN113128564B (en) | Typical target detection method and system based on deep learning under complex background | |
CN112256881B (en) | User information classification method and device | |
CN116883393B (en) | Metal surface defect detection method based on anchor frame-free target detection algorithm | |
CN117576079A (en) | Industrial product surface abnormality detection method, device and system | |
CN116714437B (en) | Hydrogen fuel cell automobile safety monitoring system and monitoring method based on big data | |
CN113469977B (en) | Flaw detection device, method and storage medium based on distillation learning mechanism | |
CN111897310B (en) | Industrial process fault classification method and system based on one-dimensional multi-head convolutional network | |
CN115620083A (en) | Model training method, face image quality evaluation method, device and medium | |
Liang et al. | Figure-ground image segmentation using genetic programming and feature selection | |
CN115222691A (en) | Image defect detection method, system and related device | |
CN113850762A (en) | Eye disease identification method, device, equipment and storage medium based on anterior segment image | |
WO2022181303A1 (en) | Ensemble learning system and ensemble learning program | |
CN116503674B (en) | Small sample image classification method, device and medium based on semantic guidance | |
Gotlur et al. | Handwritten math equation solver using machine learning | |
CN113076438B (en) | Classification method based on conversion from majority class to minority class under unbalanced data set | |
Viradia | APPLICATION OF IMAGE PROCESSING ALGORITHMS FOR THE AUTOMATIC ASSESSMENT OF WORK PIECE QUALITY | |
CHATURVEDI et al. | A NOVEL MODEL OF TEXTURE PATTERN BASED OBJECT IDENTIFICATION USING CONVOLUTED MULTI-ANGULAR (CMA) PATTERN EXTRACTION METHOD |
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 |