Nothing Special   »   [go: up one dir, main page]

CN114972871A - Image registration-based few-sample image anomaly detection method and system - Google Patents

Image registration-based few-sample image anomaly detection method and system Download PDF

Info

Publication number
CN114972871A
CN114972871A CN202210617656.2A CN202210617656A CN114972871A CN 114972871 A CN114972871 A CN 114972871A CN 202210617656 A CN202210617656 A CN 202210617656A CN 114972871 A CN114972871 A CN 114972871A
Authority
CN
China
Prior art keywords
image
feature
features
transformed
registration
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
CN202210617656.2A
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.)
Shanghai Jiaotong University
Original Assignee
Shanghai Jiaotong University
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 Shanghai Jiaotong University filed Critical Shanghai Jiaotong University
Priority to CN202210617656.2A priority Critical patent/CN114972871A/en
Publication of CN114972871A publication Critical patent/CN114972871A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • G06V10/765Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects using rules for classification or partitioning the feature space
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/30Determination of transform parameters for the alignment of images, i.e. image registration
    • G06T7/33Determination of transform parameters for the alignment of images, i.e. image registration using feature-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/7715Feature extraction, e.g. by transforming the feature space, e.g. multi-dimensional scaling [MDS]; Mappings, e.g. subspace methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks

Landscapes

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

Abstract

The invention provides a few-sample image anomaly detection method and system based on image registration, which comprises the following steps: extracting high-dimensional characteristics of the images from the support image and the image to be detected; carrying out feature spatial transformation on the high-dimensional features of the image to obtain transformed image features; feature coding is carried out on the transformed image features; implementing feature registration on the coding features; fitting the feature distribution of the support image to the transformed image features to obtain a feature distribution model; and (4) evaluating image abnormity of the transformed image characteristics and the characteristic distribution model. The invention provides a few-sample anomaly detection method based on image registration, aiming at the problems of the current anomaly detection method.

Description

Image registration-based few-sample image anomaly detection method and system
Technical Field
The invention relates to the field of computer vision and image processing, in particular to a few-sample image anomaly detection method and system based on image registration.
Background
Currently, deep learning based techniques have achieved significant success in object classification tasks, however, for anomaly detection tasks, it is too costly to collect sufficient anomaly data for model training. In a standard anomaly detection process, only normal data is usually provided for model training, and an anomaly detection method is required to have data anomaly detection capability without abnormal data training. The few-sample abnormality detection task is mainly applied to an abnormality detection scene of multi-class data, and only a limited number of normal images are provided for the abnormality detection task of each class during training. The popularization of few-sample anomaly detection can help to reduce the burden of large-scale collection of training data and reduce the data collection work of data intensive application tasks.
The existing few-sample anomaly detection methods all follow a standard single-model single-class learning paradigm, namely different models are respectively trained according to data of different object classes, and each model can only be used for executing an anomaly detection task of a single object class. The existing method needs to retrain the model before executing the abnormal detection task of the unknown object, and consumes a great deal of time and computing resources. In fact, by designing a general few-sample anomaly detection algorithm, the anomaly detection capability of the model can be generalized to objects of strange categories, so that the algorithm greatly reduces the calculation overhead, can quickly detect anomalies of objects of new categories, and promotes the application and deployment of anomaly detection in the fields of industrial production and the like.
Patent document CN106951899A (application number: CN201710192706.6) discloses an abnormality detection method based on image recognition, including: normalizing the picture containing the detected target to obtain a gray image; utilizing the trained target recognition model to perform image matting, and matting the detected target image from the gray-scale image; carrying out binary classification on the detected target image by using the trained binary classification model, and determining the credibility score of the detected target image; and if the credibility score of the detected target image is not higher than a preset abnormal threshold, judging that the detected target image is an abnormal target. By converting the picture containing the detected target into a gray image, the characteristic dimension contained in the picture can be effectively reduced on the basis of not reducing the characteristic information of the picture; the interference brought by non-detection target image information can be effectively reduced by scratching the detected target image from the gray level image. But this invention cannot be applied to the anomaly detection task of a new class of objects with a small sample of new class data.
Disclosure of Invention
Aiming at the defects in the prior art, the invention aims to provide a few-sample image anomaly detection method and system based on image registration.
The invention provides a few-sample image anomaly detection method based on image registration, which comprises the following steps:
step S1: extracting high-dimensional characteristics of the images from the support image and the image to be detected;
step S2: carrying out feature spatial transformation on the high-dimensional features of the image to obtain transformed image features;
step S3: feature coding is carried out on the transformed image features;
step S4: implementing feature registration on the coding features;
step S5: fitting the feature distribution of the support image to the transformed image features to obtain a feature distribution model;
step S6: and (4) realizing image anomaly assessment on the transformed image characteristics and the characteristic distribution model.
Preferably, in the step S1:
taking a support image and an image to be detected as input, extracting high-dimensional characteristic information of the image by using a deep convolution neural network, and extracting a network by using an image characteristicIs composed of three cascaded convolutional neural network modules based on residual error, which are respectively marked as C 1 ,C 2 And C 3 Respectively obtaining three multi-scale high-dimensional features which are respectively marked as
Figure BDA0003675098240000021
And
Figure BDA0003675098240000022
in the step S2:
extracting high-dimensional features of image obtained by image feature extraction
Figure BDA0003675098240000023
And
Figure BDA0003675098240000024
performing spatial transformation of the features using a spatial transformation neural network; wherein the feature of high dimension
Figure BDA0003675098240000025
For input, i is 1,2,3, the spatial transform neural network performs spatial coordinate transformation using the following formula:
Figure BDA0003675098240000026
wherein,
Figure BDA0003675098240000027
is a characteristic of the input before transformation
Figure BDA0003675098240000028
The original coordinates of the first and second coordinates,
Figure BDA0003675098240000029
is a transformed output characteristic
Figure BDA00036750982400000210
Target coordinates of (1), S i Is the ithSpatial transform neural network, A i Is a coordinate transformation matrix, theta ij The parameters of the affine transformation matrix of the coordinates are continuously corrected by a space transformation neural network through a convolution neural network according to an error back propagation algorithm to obtain the transformed image characteristics
Figure BDA00036750982400000211
And
Figure BDA00036750982400000212
wherein,
Figure BDA00036750982400000213
in order to be a feature of the image to be tested,
Figure BDA0003675098240000031
to support features of the image.
Preferably, in the step S3:
transforming the feature space to obtain transformed image features
Figure BDA0003675098240000032
And
Figure BDA0003675098240000033
feature coding is achieved by using a deep convolutional neural network; wherein for the characteristics of the image to be tested
Figure BDA0003675098240000034
Obtaining coding features using the coder and predictor:
Figure BDA0003675098240000035
p a =P(z a )
where E is the encoder consisting of three layers of convolution operations, P is the predictor consisting of two layers of convolution operations, z a Is a high-dimensional feature, p, of the image to be tested after being encoded by an encoder a The image to be detected is coded high-dimensional characteristics obtained by a predictor; for features supporting an image
Figure BDA0003675098240000036
Obtaining coding features using the coder and predictor:
Figure BDA0003675098240000037
p b =P(z b )
wherein the encoder E and the predictor P share weights with the encoder and predictor acting on the image features to be tested, z b Is a high-dimensional feature, p, of the support image encoded by the encoder b The image to be detected is coded high-dimensional characteristics obtained by a predictor;
in the step S4:
for the obtained coding characteristics p a And z b Feature registration is achieved using an image feature registration loss function:
Figure BDA0003675098240000038
wherein | · | purple sweet 2 Is an L-2 regularization operation;
the symmetric image feature registration loss function L is defined as:
Figure BDA0003675098240000039
preferably, in the step S5:
according to the transformed image features obtained in the feature space transformation step, fitting the feature distribution of the support image by using a distribution estimation model to obtain a feature distribution model;
transforming the feature space to obtain transformed features
Figure BDA00036750982400000310
And
Figure BDA00036750982400000311
estimating a normal distribution of features using a statistical-based estimator, obtaining a probabilistic representation of corresponding features of a normal image using a multivariate Gaussian distribution, assuming that the image is divided into grids (i, j) e [1, W [ ]]×[1,H]Where, WXH is the resolution of the feature used to estimate the normal distribution; at the position (i, j) of each grid, note
Figure BDA00036750982400000312
For transformed features from N support images
Figure BDA00036750982400000313
Set of (2), F ij Distributed by multiple gaussians of N (mu) ij ,∑ ij ) Generation with sample mean μ ij Sample covariance ∑ ij Comprises the following steps:
Figure BDA0003675098240000041
wherein, (.) T For matrix transposition operation, a regularization term is in the shape of E I, so that a sample covariance matrix is full-rank and reversible; the multivariate gaussian distribution of each possible location together constitutes a feature distribution model.
Preferably, in the step S6:
according to the transformed image features obtained by feature space transformation and a feature distribution model obtained by feature distribution estimation, using an anomaly evaluation function to realize image anomaly evaluation;
for the image to be tested, comparing the features of the image to be tested obtained by feature space transformation with the feature distribution model obtained by feature distribution estimation, and calculating the following abnormal evaluation function:
Figure BDA0003675098240000042
wherein,
Figure BDA0003675098240000043
As a sample covariance ∑ ij The mahalanobis distance matrix M ═ M (f) ij )) 1≤i≤W,1≤j≤H Forming an abnormal score matrix;
and the positions of the matrix with the numerical values larger than the preset value represent abnormal areas, and the abnormal score of the whole image is the maximum value of the abnormal matrix.
The invention provides a few-sample image anomaly detection system based on image registration, which comprises:
module M1: extracting high-dimensional characteristics of the images from the support image and the image to be detected;
module M2: carrying out feature spatial transformation on the high-dimensional features of the image to obtain transformed image features;
module M3: feature coding is carried out on the transformed image features;
module M4: implementing feature registration on the coding features;
module M5: fitting the feature distribution of the support image to the transformed image features to obtain a feature distribution model;
module M6: and (4) realizing image anomaly assessment on the transformed image characteristics and the characteristic distribution model.
Preferably, in said module M1:
taking a support image and an image to be detected as input, extracting high-dimensional characteristic information of the image by using a deep convolutional neural network, wherein the image characteristic extraction network consists of three concatenated convolutional neural network modules based on residual errors and is respectively marked as C 1 ,C 2 And C 3 Respectively obtaining three multi-scale high-dimensional features which are respectively marked as
Figure BDA0003675098240000044
And
Figure BDA0003675098240000045
in the module M2:
extracting image featuresHigh dimensional features of the resulting image
Figure BDA0003675098240000046
And
Figure BDA0003675098240000047
performing spatial transformation of the features using a spatial transformation neural network; wherein the feature of high dimension
Figure BDA0003675098240000048
For input, i is 1,2,3, the spatial transform neural network performs spatial coordinate transformation using the following formula:
Figure BDA0003675098240000051
wherein,
Figure BDA0003675098240000052
is a characteristic of the input before transformation
Figure BDA0003675098240000053
The original coordinates of the first and second coordinates,
Figure BDA0003675098240000054
is a transformed output characteristic
Figure BDA0003675098240000055
Target coordinates of (1), S i Is the ith space transform neural network, A i Is a coordinate transformation matrix, theta ij The parameters of the affine transformation matrix of the coordinates are continuously corrected by a space transformation neural network through a convolution neural network according to an error back propagation algorithm to obtain the transformed image characteristics
Figure BDA0003675098240000056
And
Figure BDA0003675098240000057
wherein,
Figure BDA0003675098240000058
in order to be a feature of the image to be tested,
Figure BDA0003675098240000059
to support features of the image.
Preferably, in said module M3:
transforming the feature space to obtain transformed image features
Figure BDA00036750982400000510
And
Figure BDA00036750982400000511
feature coding is achieved by using a deep convolutional neural network; wherein for the characteristics of the image to be tested
Figure BDA00036750982400000512
Obtaining coding features using the coder and predictor:
Figure BDA00036750982400000513
p a =P(z a )
where E is the encoder consisting of three layers of convolution operations, P is the predictor consisting of two layers of convolution operations, z a Is a high-dimensional feature, p, of the image to be tested after being encoded by an encoder a The high-dimensional characteristics of the image to be detected after being coded by a predictor; for features supporting an image
Figure BDA00036750982400000514
Obtaining coding features using the coder and predictor:
Figure BDA00036750982400000515
p b =P(z b )
wherein the encoder E and the predictor P share weights with the encoder and predictor acting on the image features to be tested, z b Is a high-dimensional feature, p, of the support image encoded by the encoder b The high-dimensional characteristics of the image to be detected after being coded by a predictor;
in the module M4:
for the obtained coding characteristics p a And z b Feature registration is achieved using an image feature registration loss function:
Figure BDA00036750982400000516
wherein | · | purple sweet 2 Is an L-2 regularization operation;
the symmetric image feature registration loss function L is defined as:
Figure BDA00036750982400000517
preferably, in said module M5:
according to the transformed image features obtained in the feature space transformation step, fitting the feature distribution of the support image by using a distribution estimation model to obtain a feature distribution model;
transforming the feature space to obtain transformed features
Figure BDA0003675098240000061
And
Figure BDA0003675098240000062
estimating a normal distribution of features using a statistics-based estimator, obtaining a probabilistic representation of corresponding features of a normal image using a multivariate Gaussian distribution, assuming that the image is divided into grids (i, j) e [1, W]×[1,H]Where, WXH is the resolution of the feature used to estimate the normal distribution; at the position (i, j) of each grid, note
Figure BDA0003675098240000063
For transformed features from N support images
Figure BDA0003675098240000064
Set of (2), F ij Distributed by multiple gaussians of N (mu) ij ,∑ ij ) Generation with sample mean μ ij Sample covariance ∑ ij Comprises the following steps:
Figure BDA0003675098240000065
wherein, (.) T For matrix transposition operation, a regularization item belongs to I, so that a sample covariance matrix is full-rank and reversible; the multivariate gaussian distribution of each possible location together constitutes a feature distribution model.
Preferably, in said module M6:
according to the transformed image features obtained by feature space transformation and a feature distribution model obtained by feature distribution estimation, using an anomaly evaluation function to realize image anomaly evaluation;
for the image to be tested, comparing the features of the image to be tested obtained by feature space transformation with the feature distribution model obtained by feature distribution estimation, and calculating the following abnormal evaluation function:
Figure BDA0003675098240000066
wherein,
Figure BDA0003675098240000067
as a sample covariance ∑ ij The mahalanobis distance matrix M ═ M (f) ij )) 1≤i≤W,1≤j≤H Forming an abnormal score matrix;
the positions of the matrix with the numerical values larger than the preset value represent abnormal areas, and the abnormal score of the whole image is the maximum value of the abnormal matrix.
Compared with the prior art, the invention has the following beneficial effects:
1. the invention provides a few-sample abnormity detection method based on image registration, which aims at the problems of the existing abnormity detection method, and can be applied to an abnormity detection task of a new class object by training a generalizable model by using the known class object data without retraining the model for the new class object data and only using the new class data of few samples;
2. according to the invention, by using the actual behavior of human detection abnormity and introducing training based on image registration, the abnormity generalization and detection capability of an abnormity detection algorithm are improved, and the data collection and high-performance calculation overhead required by abnormity detection task model training are greatly reduced, so that better performance is obtained on an abnormity detection task.
Drawings
Other features, objects and advantages of the invention will become more apparent upon reading of the detailed description of non-limiting embodiments with reference to the following drawings:
FIG. 1 is a flow chart of a method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a system according to an embodiment of the present invention.
Detailed Description
The present invention will be described in detail with reference to specific examples. The following examples will assist those skilled in the art in further understanding the invention, but are not intended to limit the invention in any way. It should be noted that it would be obvious to those skilled in the art that various changes and modifications can be made without departing from the spirit of the invention. All falling within the scope of the present invention.
Example 1:
the invention provides a few-sample image anomaly detection method based on image registration, which comprises the following steps: an image feature extraction step: extracting high-dimensional features of the images by using a depth convolution neural network for the support image and the image to be detected; and (3) feature space transformation: performing spatial transformation on the high-dimensional features of the image obtained in the image feature extraction step by using a spatial transformation neural network to obtain transformed image features; and (3) feature coding: feature coding is realized on the transformed image features obtained in the feature space transformation step by using a deep convolutional neural network; a characteristic registration step: for the coding features obtained in the feature coding step, using an image feature registration loss function to realize feature registration; a characteristic distribution estimation step: according to the transformed image features obtained in the feature space transformation step, fitting the feature distribution of the support image by using a distribution estimation model to obtain a feature distribution model; an abnormality evaluation step: and according to the transformed image characteristics obtained in the characteristic space transformation step and the characteristic distribution model obtained in the characteristic distribution estimation step, using an abnormality evaluation function to realize image abnormality evaluation. According to the invention, by using the actual behavior of human detection abnormity and introducing training based on image registration, the abnormity generalization and detection capability of an abnormity detection algorithm are improved, and the data collection and high-performance calculation overhead required by abnormity detection task model training are greatly reduced, so that better performance is obtained on an abnormity detection task.
The method for detecting the image abnormality of the few samples based on the image registration, as shown in fig. 1-2, includes:
step S1: extracting high-dimensional characteristics of the images from the support image and the image to be detected;
specifically, in the step S1:
taking a support image and an image to be detected as input, extracting high-dimensional characteristic information of the image by using a deep convolutional neural network, wherein the image characteristic extraction network consists of three concatenated convolutional neural network modules based on residual errors and is respectively marked as C 1 ,C 2 And C 3 Respectively obtaining three multi-scale high-dimensional features which are respectively marked as
Figure BDA0003675098240000081
And
Figure BDA0003675098240000082
step S2: carrying out feature spatial transformation on the high-dimensional features of the image to obtain transformed image features;
in the step S2:
extracting high-dimensional features of image obtained by image feature extraction
Figure BDA0003675098240000083
And
Figure BDA0003675098240000084
performing spatial transformation of the features using a spatial transformation neural network; wherein the feature of high dimension
Figure BDA0003675098240000085
For input, i is 1,2,3, the spatial transform neural network performs spatial coordinate transformation using the following formula:
Figure BDA0003675098240000086
wherein,
Figure BDA0003675098240000087
is characteristic of the input before transformation
Figure BDA0003675098240000088
The original coordinates of the first and second coordinates,
Figure BDA0003675098240000089
is a transformed output characteristic
Figure BDA00036750982400000810
Target coordinates of (1), S i Is the ith space transform neural network, A i Is a coordinate transformation matrix, theta ij The parameters of the affine transformation matrix of the coordinates are continuously corrected by a space transformation neural network through a convolution neural network according to an error back propagation algorithm to obtain the transformed image characteristics
Figure BDA00036750982400000811
And
Figure BDA00036750982400000812
wherein,
Figure BDA00036750982400000813
in order to be a feature of the image to be tested,
Figure BDA00036750982400000814
to support features of the image.
Step S3: feature coding is carried out on the transformed image features;
specifically, in the step S3:
transforming the feature space to obtain transformed image features
Figure BDA00036750982400000815
And
Figure BDA00036750982400000816
feature coding is achieved by using a deep convolutional neural network; wherein for the characteristics of the image to be tested
Figure BDA00036750982400000817
Obtaining coding features using the coder and predictor:
Figure BDA00036750982400000818
p a =P(z a )
where E is the encoder consisting of three layers of convolution operations, P is the predictor consisting of two layers of convolution operations, z a Is a high-dimensional feature, p, of the image to be tested after being encoded by an encoder a The high-dimensional characteristics of the image to be detected after being coded by a predictor; for features supporting an image
Figure BDA00036750982400000819
Obtaining coding features using the coder and predictor:
Figure BDA00036750982400000820
p b =P(z b )
wherein the encoder E and the predictor P share weights with the encoder and predictor acting on the image features to be tested, z b Is a high-dimensional feature, p, of the support image encoded by the encoder b The high-dimensional characteristics of the image to be detected after being coded by a predictor;
step S4: implementing feature registration on the coding features;
in the step S4:
for the obtained coding feature p a And z b Feature registration is achieved using an image feature registration loss function:
Figure BDA0003675098240000091
wherein | · | purple sweet 2 Is an L-2 regularization operation;
the symmetric image feature registration loss function L is defined as:
Figure BDA0003675098240000092
step S5: fitting the feature distribution of the support image to the transformed image features to obtain a feature distribution model;
specifically, in the step S5:
according to the transformed image features obtained in the feature space transformation step, fitting the feature distribution of the support image by using a distribution estimation model to obtain a feature distribution model;
transforming the feature space to obtain transformed features
Figure BDA0003675098240000093
And
Figure BDA0003675098240000094
estimating a normal distribution of features using a statistics-based estimator, obtaining a probabilistic representation of corresponding features of a normal image using a multivariate Gaussian distribution, assuming that the image is divided into grids (i, j) e [1, W]×[1,H]Where, WXH is the resolution of the feature used to estimate the normal distribution; at the position (i, j) of each grid, note
Figure BDA0003675098240000095
For transformed features from N support images
Figure BDA0003675098240000096
Set of (2), F ij Distributed by multiple gaussians of N (mu) ij ,∑ ij ) Generation with sample mean μ ij Sample covariance ∑ ij Comprises the following steps:
Figure BDA0003675098240000097
wherein, (.) T For matrix transposition operation, a regularization term is in the shape of E I, so that a sample covariance matrix is full-rank and reversible; the multivariate gaussian distribution of each possible location together constitutes a feature distribution model.
Step S6: and (4) realizing image anomaly assessment on the transformed image characteristics and the characteristic distribution model.
Specifically, in the step S6:
according to the transformed image features obtained by feature space transformation and a feature distribution model obtained by feature distribution estimation, using an anomaly evaluation function to realize image anomaly evaluation;
for the image to be tested, comparing the features of the image to be tested obtained by feature space transformation with the feature distribution model obtained by feature distribution estimation, and calculating the following abnormal evaluation function:
Figure BDA0003675098240000101
wherein,
Figure BDA0003675098240000102
as a sample covariance ∑ ij The mahalanobis distance matrix M ═ M (f) ij )) 1≤i≤W,1≤j≤H Forming an abnormal score matrix;
and the positions of the matrix with the numerical values larger than the preset value represent abnormal areas, and the abnormal score of the whole image is the maximum value of the abnormal matrix.
Example 2:
example 2 is a preferred example of example 1, and the present invention will be described in more detail.
The person skilled in the art can understand that the method for detecting an abnormality of a sample-less image based on image registration provided by the present invention as a specific embodiment of a system for detecting an abnormality of a sample-less image based on image registration, that is, the system for detecting an abnormality of a sample-less image based on image registration can be implemented by executing a flow of steps of the method for detecting an abnormality of a sample-less image based on image registration.
The invention provides a few-sample image anomaly detection system based on image registration, which comprises:
module M1: extracting high-dimensional characteristics of the images from the support image and the image to be detected;
specifically, in the module M1:
taking a support image and an image to be detected as input, extracting high-dimensional characteristic information of the image by using a deep convolutional neural network, wherein the image characteristic extraction network consists of three concatenated convolutional neural network modules based on residual errors, and the three convolutional neural network modules are respectively marked as C 1 ,C 2 And C 3 Respectively obtaining three multi-scale high-dimensional features which are respectively marked as
Figure BDA0003675098240000103
And
Figure BDA00036750982400001016
module M2: carrying out feature spatial transformation on the high-dimensional features of the image to obtain transformed image features;
in the module M2:
extracting high-dimensional features of image obtained by image feature extraction
Figure BDA0003675098240000105
And
Figure BDA0003675098240000106
performing spatial transformation of the features using a spatial transformation neural network; wherein the feature of high dimension
Figure BDA0003675098240000107
For input, i is 1,2,3, the spatial transform neural network performs spatial coordinate transformation using the following formula:
Figure BDA0003675098240000108
wherein,
Figure BDA0003675098240000109
is a characteristic of the input before transformation
Figure BDA00036750982400001010
The original coordinates of the first and second coordinates,
Figure BDA00036750982400001011
is a transformed output characteristic
Figure BDA00036750982400001012
Target coordinates of (1), S i Is the ith space transform neural network, A i Is a coordinate transformation matrix, theta ij The parameters of the affine transformation matrix of the coordinates are continuously corrected by a space transformation neural network through a convolution neural network according to an error back propagation algorithm to obtain the transformed image characteristics
Figure BDA00036750982400001013
And
Figure BDA00036750982400001014
wherein,
Figure BDA00036750982400001015
in order to be a feature of the image to be tested,
Figure BDA0003675098240000111
to support features of the image.
Module M3: feature coding is carried out on the transformed image features;
specifically, in the module M3:
transforming the feature space to obtain transformed image features
Figure BDA0003675098240000112
And
Figure BDA0003675098240000113
feature coding is achieved by using a deep convolutional neural network; wherein for the characteristics of the image to be tested
Figure BDA0003675098240000114
Obtaining coding features using the coder and predictor:
Figure BDA0003675098240000115
p a =P(z a )
where E is the encoder consisting of three layers of convolution operations, P is the predictor consisting of two layers of convolution operations, z a Is a high-dimensional feature, p, of the image to be tested after being encoded by an encoder a The image to be detected is coded high-dimensional characteristics obtained by a predictor; for features supporting an image
Figure BDA0003675098240000116
Obtaining coding features using the coder and predictor:
Figure BDA0003675098240000117
p b =P(z b )
wherein the encoder E and the predictor P share weights with the encoder and predictor acting on the image features to be tested, z b Is a high-dimensional feature, p, of the support image encoded by the encoder b The high-dimensional characteristics of the image to be detected after being coded by a predictor;
module M4: implementing feature registration on the coding features;
in the module M4:
for the obtained coding characteristics p a And z b Feature registration is achieved using an image feature registration loss function:
Figure BDA0003675098240000118
wherein | · | purple sweet 2 Is an L-2 regularization operation;
the symmetric image feature registration loss function L is defined as:
Figure BDA0003675098240000119
module M5: fitting the feature distribution of the support image to the transformed image features to obtain a feature distribution model;
specifically, in the module M5:
according to the transformed image features obtained in the feature space transformation step, fitting the feature distribution of the support image by using a distribution estimation model to obtain a feature distribution model;
transforming the feature space to obtain transformed features
Figure BDA00036750982400001110
And
Figure BDA00036750982400001111
estimating a normal distribution of features using a statistics-based estimator, obtaining a probabilistic representation of corresponding features of a normal image using a multivariate Gaussian distribution, assuming that the image is divided into grids (i, j) e [1, W]×[1,H]Where, WXH is the resolution of the feature used to estimate the normal distribution; at the position (i, j) of each grid, note
Figure BDA0003675098240000121
For transformed features from N support images
Figure BDA0003675098240000122
Set of (2), F ij From a multivariate Gaussian distribution of N (mu) ij ,∑ ij ) Generation with sample mean μ ij Sample covariance ∑ ij Comprises the following steps:
Figure BDA0003675098240000123
wherein, (.) T For matrix transposition operation, a regularization term is in the shape of E I, so that a sample covariance matrix is full-rank and reversible; the multivariate gaussian distribution of each possible location together constitutes a feature distribution model.
Module M6: and (4) realizing image anomaly assessment on the transformed image characteristics and the characteristic distribution model.
Specifically, in the module M6:
according to the transformed image features obtained by feature space transformation and a feature distribution model obtained by feature distribution estimation, using an anomaly evaluation function to realize image anomaly evaluation;
for the image to be tested, comparing the characteristics of the image to be tested obtained by characteristic space transformation with the characteristic distribution model obtained by characteristic distribution estimation, and calculating the following abnormal evaluation function:
Figure BDA0003675098240000124
wherein,
Figure BDA0003675098240000125
as a sample covariance ∑ ij The mahalanobis distance matrix M ═ M (f) ij )) 1≤i≤W,1≤j≤H Forming an abnormal score matrix;
and the positions of the matrix with the numerical values larger than the preset value represent abnormal areas, and the abnormal score of the whole image is the maximum value of the abnormal matrix.
Example 3:
example 3 is a preferred example of example 1, and the present invention will be described in more detail.
FIG. 1 is a flowchart of an embodiment of a method for detecting an anomaly in a sample-less image based on image registration according to the present invention, in which a deep convolutional neural network is used to extract high-dimensional features of an image for a support image and an image to be detected; performing spatial transformation on the high-dimensional features of the image obtained in the image feature extraction step by using a spatial transformation neural network to obtain transformed image features; feature coding is realized on the transformed image features obtained in the feature space transformation step by using a deep convolutional neural network; for the coding features obtained in the feature coding step, using an image feature registration loss function to realize feature registration; according to the transformed image features obtained in the feature space transformation step, fitting the feature distribution of the support image by using a distribution estimation model to obtain a feature distribution model; and according to the transformed image characteristics obtained in the characteristic space transformation step and the characteristic distribution model obtained in the characteristic distribution estimation step, using an abnormality evaluation function to realize image abnormality evaluation.
The invention provides a few-sample abnormity detection method based on image registration, aiming at the problems of the existing abnormity detection method. The method utilizes the known class object data to train the generalizable general model, does not need to retrain the model for the new class object data, but only utilizes the new class data of few samples, and can be applied to the abnormal detection task of the new class object. According to the invention, by taking the actual behavior of human detection abnormity as a reference and introducing training based on image registration, the abnormity generalization and detection capability of an abnormity detection algorithm are improved, and the data collection and high-performance calculation overhead required by abnormity detection task model training are greatly reduced, so that better performance is obtained on an abnormity detection task.
Specifically, with reference to fig. 1, the method comprises the steps of:
an image feature extraction step: extracting high-dimensional characteristics of the images from the supporting image and the image to be detected by using a depth convolution neural network;
and (3) feature space transformation: performing spatial transformation on the high-dimensional features of the image obtained in the image feature extraction step by using a spatial transformation neural network to obtain transformed image features;
and (3) feature coding: feature coding is realized on the transformed image features obtained in the feature space transformation step by using a deep convolutional neural network;
a characteristic registration step: for the coding features obtained in the feature coding step, using an image feature registration loss function to realize feature registration;
a characteristic distribution estimation step: according to the transformed image features obtained in the feature space transformation step, fitting the feature distribution of the support image by using a distribution estimation model to obtain a feature distribution model;
an abnormality evaluation step: and according to the transformed image characteristics obtained in the characteristic space transformation step and the characteristic distribution model obtained in the characteristic distribution estimation step, using an abnormality evaluation function to realize image abnormality evaluation.
Corresponding to the above method, the present invention further provides an embodiment of a system for detecting an abnormality of a few-sample image based on image registration, including:
an image feature extraction module: extracting high-dimensional features of the images by using a depth convolution neural network for the support image and the image to be detected;
a feature space transformation module: performing spatial transformation on the high-dimensional features of the image obtained by the image feature extraction module by using a spatial transformation neural network to obtain transformed image features;
a feature encoding module: feature coding is realized on the transformed image features obtained by the feature space transformation module by using a deep convolutional neural network;
a feature registration module: the coding features obtained by the feature coding module are subjected to feature registration by using an image feature registration loss function;
a feature distribution estimation module: according to the transformed image features obtained by the feature space transformation module, fitting the feature distribution of the support image by using a distribution estimation model to obtain a feature distribution model;
an anomaly assessment module: and according to the transformed image characteristics obtained by the characteristic space transformation module and the characteristic distribution model obtained by the characteristic distribution estimation module, using an anomaly evaluation function to realize image anomaly evaluation.
Technical features realized by each module of the image registration-based small-sample image anomaly detection system can be the same as technical features realized by corresponding steps in the image registration-based small-sample image anomaly detection method.
Specific implementations of the above steps and modules are described in detail below to facilitate understanding of the technical solutions of the present invention.
In some embodiments of the present invention, the image feature extracting step includes: extracting high-dimensional characteristics of the images from the supporting image and the image to be detected by using a depth convolution neural network;
in some embodiments of the present invention, the feature space transforming step, wherein: performing spatial transformation on the high-dimensional features of the image obtained in the image feature extraction step by using a spatial transformation neural network to obtain transformed image features;
in some embodiments of the present invention, the feature encoding step, wherein: feature coding is realized on the transformed image features obtained in the feature space transformation step by using a deep convolutional neural network;
in some embodiments of the invention, the feature registration step, wherein: for the coding features obtained in the feature coding step, using an image feature registration loss function to realize feature registration;
in some embodiments of the present invention, the feature distribution estimating step includes: according to the transformed image features obtained in the feature space transformation step, fitting the feature distribution of the support image by using a distribution estimation model to obtain a feature distribution model;
in some embodiments of the invention, the anomaly assessment step, wherein: and according to the transformed image characteristics obtained in the characteristic space transformation step and the characteristic distribution model obtained in the characteristic distribution estimation step, using an abnormality evaluation function to realize image abnormality evaluation.
Specifically, a network framework of a training system composed of an image feature extraction module, a feature space transformation module, a feature coding module, a feature registration module, a feature distribution estimation module and an anomaly evaluation module is shown in fig. 2, and the whole system framework can be trained end to end.
In the system framework of the embodiment shown in fig. 2, a supporting image (i.e. a certain small number of normal images) and an image to be detected are used as input, a deep convolutional neural network is used to extract high-dimensional feature information of the image, and the image feature extraction network is composed of three cascaded convolutional neural network modules based on residual errors, which are respectively marked as C 1 ,C 2 And C 3 Respectively obtaining three multi-scale high-dimensional features which are respectively marked as
Figure BDA0003675098240000151
And
Figure BDA0003675098240000152
in the system framework of the embodiment shown in FIG. 2, the high-dimensional features of the image obtained in the image feature extraction step are extracted
Figure BDA0003675098240000153
And
Figure BDA0003675098240000154
space of useThe transforming neural network performs a spatial transformation of the features. Wherein the feature of high dimension
Figure BDA0003675098240000155
For input, the spatial transformation neural network performs spatial coordinate transformation using the following formula:
Figure BDA0003675098240000156
wherein,
Figure BDA0003675098240000157
is a characteristic of the input before transformation
Figure BDA0003675098240000158
The original coordinates of the first and second coordinates,
Figure BDA0003675098240000159
is a transformed output characteristic
Figure BDA00036750982400001510
Target coordinates of (1), S i Is the ith space transform neural network, A i Is a coordinate transformation matrix, theta ij Are specific parameters of the coordinate affine transformation matrix. The space transformation neural network continuously corrects the parameters of the affine transformation matrix according to an error back propagation algorithm through the convolution neural network to finally obtain the transformed image characteristics
Figure BDA00036750982400001511
(features of the image to be tested) and
Figure BDA00036750982400001512
(features supporting the image).
In the system framework of the embodiment as shown in fig. 2, the transformed image features resulting from the feature space transformation step are transformed
Figure BDA00036750982400001513
(to be measured)Characteristics of the test image) and
Figure BDA00036750982400001514
(features of the support image), feature coding is implemented using a deep convolutional neural network. Wherein for the characteristics of the image to be tested
Figure BDA00036750982400001515
The coding characteristics are obtained using the encoder and the predictor,
Figure BDA00036750982400001516
where E is the encoder consisting of three layers of convolution operations, P is the predictor consisting of two layers of convolution operations, P a Is the encoded high-dimensional feature finally obtained from the image to be detected. For features supporting an image
Figure BDA00036750982400001517
The encoding characteristics are obtained using only the encoder,
Figure BDA00036750982400001518
wherein encoder E shares a weight, z, with the encoder acting on the image feature to be tested b Are the encoded high-dimensional features that the support image ultimately gets.
In the system framework of the embodiment shown in fig. 2, the coding feature p obtained in the feature coding step is coded a And z b And using an image feature registration loss function to realize feature registration,
Figure BDA00036750982400001519
wherein, I 2 Is an L-2 regularization operation. Finally, a symmetric image feature registration loss function is defined as,
Figure BDA00036750982400001520
in the system framework of the embodiment shown in fig. 2, the transformed features resulting from the feature space transformation step are transformed
Figure BDA00036750982400001521
And
Figure BDA00036750982400001522
a normal distribution of features is estimated using a statistical-based estimator, and a probability representation of corresponding features of normal images is obtained using a multivariate Gaussian distribution. Suppose an image is divided into grids (i, j) e [1, W]×[1,H]Where W × H is the resolution of the feature used to estimate the normal distribution. At the position (i, j) of each grid, note
Figure BDA0003675098240000161
Figure BDA0003675098240000162
For transformed features from N support images
Figure BDA0003675098240000163
Set of (2), let F ij Distributed by multiple gaussians of N (mu) ij ,∑ ij ) Generation with sample mean μ ij Sample covariance ∑ ij Comprises the following steps:
Figure BDA0003675098240000164
wherein the regularization term ∈ I makes the sample covariance matrix full rank and invertible. The multivariate gaussian distribution of each possible location together constitutes the final feature distribution model.
In the system framework of the embodiment shown in fig. 2, for the image to be tested, the features of the image to be tested obtained in the feature space transformation step are compared with the feature distribution model obtained in the feature distribution estimation step, so as to calculate the following abnormal rating function:
Figure BDA0003675098240000165
the mahalanobis distance matrix M above is (M (f) ij )) 1≤i≤W,1≤j≤H The final anomaly score matrix is composed. Wherein the position with a larger value in the matrix represents an abnormal region. The final anomaly score for the entire image is the maximum of the above anomaly matrix.
In summary, the present invention provides a few-sample anomaly detection method based on image registration, which is directed to the problems of the current anomaly detection method. The method utilizes the known class object data to train the generalizable general model, does not need to retrain the model for the new class object data, but only utilizes the new class data of few samples, and can be applied to the abnormal detection task of the new class object. According to the invention, by using the actual behavior of human detection abnormity and introducing training based on image registration, the abnormity generalization and detection capability of an abnormity detection algorithm are improved, and the data collection and high-performance calculation overhead required by abnormity detection task model training are greatly reduced, so that better performance is obtained on an abnormity detection task.
Those skilled in the art will appreciate that, in addition to implementing the systems, apparatus, and various modules thereof provided by the present invention in purely computer readable program code, the same procedures can be implemented entirely by logically programming method steps such that the systems, apparatus, and various modules thereof are provided in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Therefore, the system, the device and the modules thereof provided by the present invention can be considered as a hardware component, and the modules included in the system, the device and the modules thereof for implementing various programs can also be considered as structures in the hardware component; modules for performing various functions may also be considered to be both software programs for performing the methods and structures within hardware components.
The foregoing description of specific embodiments of the present invention has been presented. It is to be understood that the present invention is not limited to the specific embodiments described above, and that various changes or modifications may be made by one skilled in the art within the scope of the appended claims without departing from the spirit of the invention. The embodiments and features of the embodiments of the present application may be combined with each other arbitrarily without conflict.

Claims (10)

1. A few-sample image anomaly detection method based on image registration is characterized by comprising the following steps:
step S1: extracting high-dimensional characteristics of the images from the support image and the image to be detected;
step S2: carrying out feature spatial transformation on the high-dimensional features of the image to obtain transformed image features;
step S3: feature coding is carried out on the transformed image features;
step S4: realizing feature registration on the coding features;
step S5: fitting the feature distribution of the support image to the transformed image features to obtain a feature distribution model;
step S6: and (4) realizing image anomaly assessment on the transformed image characteristics and the characteristic distribution model.
2. The image registration-based few-sample image anomaly detection method according to claim 1, characterized in that:
in the step S1:
taking a support image and an image to be detected as input, extracting high-dimensional characteristic information of the image by using a deep convolutional neural network, wherein the image characteristic extraction network consists of three concatenated convolutional neural network modules based on residual errors and is respectively marked as C 1 ,C 2 And C 3 Respectively obtaining three multi-scale high-dimensional features which are respectively marked as
Figure FDA0003675098230000011
And
Figure FDA0003675098230000012
in the step S2:
extracting high-dimensional features of image obtained by image feature extraction
Figure FDA0003675098230000013
And
Figure FDA0003675098230000014
performing spatial transformation of the features using a spatial transformation neural network; wherein the feature of high dimension
Figure FDA0003675098230000015
For input, i is 1,2,3, the spatial transform neural network performs spatial coordinate transformation using the following formula:
Figure FDA0003675098230000016
wherein,
Figure FDA0003675098230000017
is a characteristic of the input before transformation
Figure FDA0003675098230000018
The original coordinates of the first and second coordinates,
Figure FDA0003675098230000019
is a transformed output characteristic
Figure FDA00036750982300000110
Target coordinates of (1), S i Is the ith space transform neural network, A i Is a coordinate transformation matrix, theta ij The parameters of the affine transformation matrix of the coordinates are continuously corrected by a space transformation neural network through a convolution neural network according to an error back propagation algorithm to obtain the transformed image characteristics
Figure FDA00036750982300000111
And
Figure FDA00036750982300000112
wherein,
Figure FDA00036750982300000113
in order to be a feature of the image to be tested,
Figure FDA00036750982300000114
to support features of the image.
3. The image registration-based few-sample image anomaly detection method according to claim 1, characterized in that:
in the step S3:
transforming the feature space to obtain transformed image features
Figure FDA00036750982300000115
And
Figure FDA00036750982300000116
feature coding is achieved by using a deep convolutional neural network; wherein for the characteristics of the image to be tested
Figure FDA0003675098230000021
Obtaining coding features using the coder and predictor:
Figure FDA0003675098230000022
p a =P(z a )
where E is the encoder consisting of three layers of convolution operations, P is the predictor consisting of two layers of convolution operations, z a Is a high-dimensional feature, p, of the image to be tested after being encoded by an encoder a Is the code obtained by predictor of the image to be detectedThe latter high dimensional features; for features supporting an image
Figure FDA0003675098230000023
Obtaining coding features using the coder and predictor:
Figure FDA0003675098230000024
p b =P(z b )
wherein the encoder E and the predictor P share weights with the encoder and predictor acting on the image features to be tested, z b Is a high-dimensional feature, p, of the support image encoded by the encoder b The high-dimensional characteristics of the image to be detected after being coded by a predictor;
in the step S4:
for the obtained coding characteristics p a And z b Feature registration is achieved using an image feature registration loss function:
Figure FDA0003675098230000025
wherein | · | purple sweet 2 Is an L-2 regularization operation;
the symmetric image feature registration loss function L is defined as:
Figure FDA0003675098230000026
4. the image registration-based few-sample image abnormality detection method according to claim 1, wherein in the step S5:
according to the transformed image features obtained in the feature space transformation step, fitting the feature distribution of the support image by using a distribution estimation model to obtain a feature distribution model;
to feature space transformationCharacteristics of the obtained transform
Figure FDA0003675098230000027
And
Figure FDA0003675098230000028
estimating a normal distribution of features using a statistics-based estimator, obtaining a probabilistic representation of corresponding features of a normal image using a multivariate Gaussian distribution, assuming that the image is divided into grids (i, j) e [1, W]×[1,H]Where, WXH is the resolution of the feature used to estimate the normal distribution; at the position (i, j) of each grid, note
Figure FDA0003675098230000029
For transformed features from N support images
Figure FDA00036750982300000210
Set of (2), F ij Distributed by multiple gaussians of N (mu) ijij ) Generation with sample mean μ ij Sample covariance ∑ ij Comprises the following steps:
Figure FDA0003675098230000031
wherein, (. cndot.) T For matrix transposition operation, a regularization term is in the shape of E I, so that a sample covariance matrix is full-rank and reversible; the multivariate gaussian distribution of each possible location together constitutes a feature distribution model.
5. The image registration-based few-sample image abnormality detection method according to claim 1, wherein in the step S6:
according to the transformed image features obtained by feature space transformation and a feature distribution model obtained by feature distribution estimation, using an anomaly evaluation function to realize image anomaly evaluation;
for the image to be tested, comparing the features of the image to be tested obtained by feature space transformation with the feature distribution model obtained by feature distribution estimation, and calculating the following abnormal evaluation function:
Figure FDA0003675098230000032
wherein,
Figure FDA0003675098230000033
as a sample covariance ∑ ij The mahalanobis distance matrix M ═ M (f) ij )) 1≤i≤W,1≤j≤H Forming an abnormal score matrix;
and the positions of the matrix with the numerical values larger than the preset value represent abnormal areas, and the abnormal score of the whole image is the maximum value of the abnormal matrix.
6. A system for detecting abnormalities in a sample-less image based on image registration, comprising:
module M1: extracting high-dimensional characteristics of the images from the support image and the image to be detected;
module M2: carrying out feature spatial transformation on the high-dimensional features of the image to obtain transformed image features;
module M3: feature coding is carried out on the transformed image features;
module M4: implementing feature registration on the coding features;
module M5: fitting the feature distribution of the support image to the transformed image features to obtain a feature distribution model;
module M6: and (4) realizing image anomaly assessment on the transformed image characteristics and the characteristic distribution model.
7. The system for few-sample image anomaly detection based on image registration according to claim 6, characterized by:
in the module M1:
taking a support image and an image to be detected as input, extracting high-dimensional characteristic information of the image by using a deep convolution neural network, wherein the image characteristic extraction network consists ofThree concatenated convolutional neural network modules based on residual error, denoted as C 1 ,C 2 And C 3 Respectively obtaining three multi-scale high-dimensional features which are respectively marked as
Figure FDA0003675098230000034
And
Figure FDA0003675098230000035
in the module M2:
extracting high-dimensional features of image obtained by image feature extraction
Figure FDA0003675098230000041
And
Figure FDA0003675098230000042
performing spatial transformation of the features using a spatial transformation neural network; wherein the feature of high dimension
Figure FDA0003675098230000043
For input, i is 1,2,3, the spatial transform neural network performs spatial coordinate transformation using the following formula:
Figure FDA0003675098230000044
wherein,
Figure FDA0003675098230000045
is a characteristic of the input before transformation
Figure FDA0003675098230000046
The original coordinates of the first and second coordinates,
Figure FDA0003675098230000047
is a transformed output characteristic
Figure FDA0003675098230000048
Target coordinates of (1), S i Is the ith space transform neural network, A i Is a coordinate transformation matrix, theta ij The parameters of the affine transformation matrix of the coordinates are continuously corrected by a space transformation neural network through a convolution neural network according to an error back propagation algorithm to obtain the transformed image characteristics
Figure FDA0003675098230000049
And
Figure FDA00036750982300000410
wherein,
Figure FDA00036750982300000411
in order to be a feature of the image to be tested,
Figure FDA00036750982300000412
to support features of the image.
8. The system for few-sample image anomaly detection based on image registration according to claim 6, characterized by:
in the module M3:
transforming the feature space to obtain transformed image features
Figure FDA00036750982300000413
And
Figure FDA00036750982300000414
feature coding is achieved by using a deep convolutional neural network; wherein for the characteristics of the image to be tested
Figure FDA00036750982300000415
Obtaining coding features using the coder and predictor:
Figure FDA00036750982300000416
p a =P(z a )
where E is the encoder consisting of three layers of convolution operations, P is the predictor consisting of two layers of convolution operations, z a Is a high-dimensional feature, p, of the image to be tested after being encoded by an encoder a The high-dimensional characteristics of the image to be detected after being coded by a predictor; for features supporting an image
Figure FDA00036750982300000417
Obtaining coding features using the coder and predictor:
Figure FDA00036750982300000418
p b =P(z b )
wherein the encoder E and the predictor P share weights with the encoder and predictor acting on the image features to be tested, z b Is a high-dimensional feature, p, of the support image encoded by the encoder b The high-dimensional characteristics of the image to be detected after being coded by a predictor;
in the module M4:
for the obtained coding characteristics p a And z b Feature registration is achieved using an image feature registration loss function:
Figure FDA00036750982300000419
wherein | · | purple sweet 2 Is an L-2 regularization operation;
the symmetric image feature registration loss function L is defined as:
Figure FDA0003675098230000051
9. the system for few-sample image anomaly detection based on image registration according to claim 6, characterized in that in said module M5:
according to the transformed image features obtained in the feature space transformation step, fitting the feature distribution of the support image by using a distribution estimation model to obtain a feature distribution model;
transforming the feature space to obtain transformed features
Figure FDA0003675098230000052
And
Figure FDA0003675098230000053
estimating a normal distribution of features using a statistics-based estimator, obtaining a probabilistic representation of corresponding features of a normal image using a multivariate Gaussian distribution, assuming that the image is divided into grids (i, j) e [1, W]×[1,H]Where, WXH is the resolution of the feature used to estimate the normal distribution; at the position (i, j) of each grid, note
Figure FDA0003675098230000054
For transformed features from N support images
Figure FDA0003675098230000055
Set of (2), F ij Distributed by multiple gaussians of N (mu) ijij ) Generation with sample mean μ ij Sample covariance ∑ ij Comprises the following steps:
Figure FDA0003675098230000056
wherein, (.) T For matrix transposition operation, a regularization item belongs to I, so that a sample covariance matrix is full-rank and reversible; the multivariate gaussian distribution of each possible location together constitutes a feature distribution model.
10. The system for few-sample image anomaly detection based on image registration according to claim 6, characterized in that in said module M6:
according to the transformed image features obtained by feature space transformation and a feature distribution model obtained by feature distribution estimation, using an anomaly evaluation function to realize image anomaly evaluation;
for the image to be tested, comparing the features of the image to be tested obtained by feature space transformation with the feature distribution model obtained by feature distribution estimation, and calculating the following abnormal evaluation function:
Figure FDA0003675098230000057
wherein,
Figure FDA0003675098230000058
as a sample covariance Σ ij The mahalanobis distance matrix M ═ M (f) ij )) 1≤i≤W,1≤j≤H Forming an abnormal score matrix;
and the positions of the matrix with the numerical values larger than the preset value represent abnormal areas, and the abnormal score of the whole image is the maximum value of the abnormal matrix.
CN202210617656.2A 2022-06-01 2022-06-01 Image registration-based few-sample image anomaly detection method and system Pending CN114972871A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210617656.2A CN114972871A (en) 2022-06-01 2022-06-01 Image registration-based few-sample image anomaly detection method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210617656.2A CN114972871A (en) 2022-06-01 2022-06-01 Image registration-based few-sample image anomaly detection method and system

Publications (1)

Publication Number Publication Date
CN114972871A true CN114972871A (en) 2022-08-30

Family

ID=82959159

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210617656.2A Pending CN114972871A (en) 2022-06-01 2022-06-01 Image registration-based few-sample image anomaly detection method and system

Country Status (1)

Country Link
CN (1) CN114972871A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117574136A (en) * 2024-01-16 2024-02-20 浙江大学海南研究院 Convolutional neural network calculation method based on multi-element Gaussian function space transformation
CN118470442A (en) * 2024-07-10 2024-08-09 华东交通大学 Small sample anomaly detection method based on multi-scale hypergraph and feature registration

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117574136A (en) * 2024-01-16 2024-02-20 浙江大学海南研究院 Convolutional neural network calculation method based on multi-element Gaussian function space transformation
CN117574136B (en) * 2024-01-16 2024-05-10 浙江大学海南研究院 Convolutional neural network calculation method based on multi-element Gaussian function space transformation
CN118470442A (en) * 2024-07-10 2024-08-09 华东交通大学 Small sample anomaly detection method based on multi-scale hypergraph and feature registration

Similar Documents

Publication Publication Date Title
CN111860670B (en) Domain adaptive model training method, image detection method, device, equipment and medium
CN109118473B (en) Angular point detection method based on neural network, storage medium and image processing system
CN109766992B (en) Industrial control abnormity detection and attack classification method based on deep learning
CN114972871A (en) Image registration-based few-sample image anomaly detection method and system
CN111738054B (en) Behavior anomaly detection method based on space-time self-encoder network and space-time CNN
CN105488456A (en) Adaptive rejection threshold adjustment subspace learning based human face detection method
CN112070058A (en) Face and face composite emotional expression recognition method and system
CN111079847A (en) Remote sensing image automatic labeling method based on deep learning
CN111241924B (en) Face detection and alignment method, device and storage medium based on scale estimation
CN105528620B (en) method and system for combined robust principal component feature learning and visual classification
CN114170184A (en) Product image anomaly detection method and device based on embedded feature vector
CN117155706B (en) Network abnormal behavior detection method and system
CN116910752B (en) Malicious code detection method based on big data
CN114494242A (en) Time series data detection method, device, equipment and computer storage medium
CN116704431A (en) On-line monitoring system and method for water pollution
CN111462184B (en) Online sparse prototype tracking method based on twin neural network linear representation model
CN114565605A (en) Pathological image segmentation method and device
CN113313179B (en) Noise image classification method based on l2p norm robust least square method
Mai et al. Vietnam license plate recognition system based on edge detection and neural networks
CN116188445A (en) Product surface defect detection and positioning method and device and terminal equipment
CN111291712A (en) Forest fire recognition method and device based on interpolation CN and capsule network
CN114842506A (en) Human body posture estimation method and system
CN111815658B (en) Image recognition method and device
CN111696070A (en) Multispectral image fusion power internet of things fault point detection method based on deep learning
CN113506272B (en) False video detection method and system

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