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 PDF

Info

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
Application number
CN202111555291.7A
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.)
Huazhong University of Science and Technology
Original Assignee
Huazhong University of Science and Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huazhong University of Science and Technology filed Critical Huazhong University of Science and Technology
Priority to CN202111555291.7A priority Critical patent/CN114240892A/en
Publication of CN114240892A publication Critical patent/CN114240892A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/16Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformation in the plane of the image
    • G06T3/40Scaling the whole image or part thereof
    • G06T3/4023Decimation- 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

Unsupervised industrial image anomaly detection method and system based on knowledge distillation
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 (θ):
Figure BDA0003418914010000031
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:
Figure BDA0003418914010000032
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:
Figure BDA0003418914010000041
Figure BDA0003418914010000042
considering different scale characteristics extracted from deep neural network
Figure BDA0003418914010000043
The 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
Figure BDA0003418914010000044
Figure BDA0003418914010000045
Defining a pixel level penalty as:
Figure BDA0003418914010000046
wherein the content of the first and second substances,
Figure BDA0003418914010000047
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:
Figure BDA0003418914010000051
wherein Q (f) e RN×DPresentation pair
Figure BDA0003418914010000052
A 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:
Figure BDA0003418914010000053
Figure BDA0003418914010000054
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)
Figure BDA0003418914010000061
Figure BDA0003418914010000062
Figure BDA0003418914010000063
wherein the content of the first and second substances,
Figure BDA0003418914010000064
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 of
Figure BDA0003418914010000065
And 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:
Figure BDA0003418914010000066
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 as
Figure BDA0003418914010000067
After 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:
Figure BDA0003418914010000068
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:
Figure BDA0003418914010000071
to obtain better performance, the anomaly scores of each scale are fused using multiplication:
Figure BDA0003418914010000072
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 (θ):
Figure BDA0003418914010000091
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:
Figure BDA0003418914010000092
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:
Figure BDA0003418914010000101
Figure BDA0003418914010000102
considering different scale characteristics extracted from deep neural network
Figure BDA0003418914010000103
The 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
Figure BDA0003418914010000104
Figure BDA0003418914010000105
Defining a pixel level penalty as:
Figure BDA0003418914010000106
Figure BDA0003418914010000107
wherein the content of the first and second substances,
Figure BDA0003418914010000108
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:
Figure BDA0003418914010000111
wherein Q (f) e RN×DPresentation pair
Figure BDA0003418914010000112
A 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:
Figure BDA0003418914010000113
Figure BDA0003418914010000114
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)
Figure BDA0003418914010000121
Figure BDA0003418914010000122
Figure BDA0003418914010000123
wherein the content of the first and second substances,
Figure BDA0003418914010000124
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 of
Figure BDA0003418914010000125
And 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:
Figure BDA0003418914010000126
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 as
Figure BDA0003418914010000127
After 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:
Figure BDA0003418914010000128
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:
Figure BDA0003418914010000131
to obtain better performance, the anomaly scores of each scale are fused using multiplication:
Figure BDA0003418914010000132
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.
2. The method of claim 1, wherein the first and second features fT,fSExpressed as:
fT=FT(I)
fS=FS(I)
normalization:
Figure FDA0003418913000000011
Figure FDA0003418913000000012
wherein, FTAnd FSRespectively representing the feature extractors of the teacher network and the student network, and I is an input image.
3. The method of claim 2, wherein the difficult case sample is represented as:
Figure FDA0003418913000000021
Figure FDA0003418913000000022
m(l,t)=αm(l,t-1)+(1-α)(μ(l,t)+βσ(l,t))
Figure FDA0003418913000000023
Figure FDA0003418913000000024
wherein the content of the first and second substances,
Figure FDA0003418913000000025
a feature diagram representing the teacher network and the student network at layer l,
Figure FDA0003418913000000026
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 of
Figure FDA0003418913000000027
A 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:
Figure FDA0003418913000000028
wherein L ispsFor loss of pixel similarity, LcsIn order for the context to be lost in similarity,
Figure FDA0003418913000000029
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.
5. The method of claim 4, wherein the pixel similarity penalty is:
Figure FDA00034189130000000210
wherein the content of the first and second substances,
Figure FDA00034189130000000211
indicates the total scale degree, H(l)×W(l)Representing the dimensions of the respective dimensions.
6. The method of claim 4, wherein the contextual similarity measure is lost as:
Figure FDA00034189130000000212
Figure FDA0003418913000000031
wherein the content of the first and second substances,
Figure FDA0003418913000000032
indicates the total scale degree, H(l)×W(l)Denotes the size of the respective scale, Q (f) e RN×DPresentation pair
Figure FDA0003418913000000033
Performing 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:
Figure FDA0003418913000000034
the anomaly scores for each scale are fused using multiplication:
Figure FDA0003418913000000035
wherein, AS(f)For the final abnormal value-dividing map, upscale () is an up-sampling function, the abnormal value-dividing maps with different scales are up-sampled to the resolution of the input image through quadratic linear interpolation,
Figure FDA0003418913000000036
indicating the total gauge number.
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.
CN202111555291.7A 2021-12-17 2021-12-17 Unsupervised industrial image anomaly detection method and system based on knowledge distillation Pending CN114240892A (en)

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)

* Cited by examiner, † Cited by third party
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

Cited By (11)

* Cited by examiner, † Cited by third party
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