当前位置:网站首页>Padim [anomaly detection: embedded based]
Padim [anomaly detection: embedded based]
2022-07-28 22:43:00 【It's too simple】
Preface
The blog is from 2020.11CVPR A paper on , At present, the detection and positioning effect is MVTec Dataset ranking 11(papers with code Website ), This is the deadline for posting .
Source code :https://github.com/xiahaifeng1995/PaDiM-Anomaly-Detection-Localization-master( unofficial )
background
The paper proves that multi-scale features are helpful for information differentiation .
Make the normal image into a reference for testing , These references can be nsphere Center of , Parameters of Gaussian distribution , The whole set of normal embedded vectors .SPADE Use the third one ,PaDiM In the second .
Model principle ( Control code )
thought : Through feature extraction, we can get the feature block of each graph , Then, all feature blocks of all graphs are used to form a multi dimension for each pixel Gaussian distribution , Mahalanobis distance as evaluation score . The model does not need training , Only use trained networks to extract features .

A.Embedding extraction
Use resnet After the network extracts features , Form tensor [500,448,56,56], Choose one randomly 100 Dimensions , Form tensor [500,100,56,56].
Patch embedding vector (patch embedding vectors): The so-called patch , Refers to pixels ; The so-called embedding , It refers to the combination of different features extracted by the network . It's all about encapsulation .
B.Learning of the normality
These pixels of the image are assumed to be multidimensional Gaussian distribution , So the network should work out this distribution , By means of mean and covariance . After processing, there is a multi-dimensional Gaussian distribution at each pixel position .
Tensor reshaping forms [500,100,3136] after , Please all batch The mean value at each pixel position is formed [100,3136]--> Find the formation of the covariance matrix [100,100,3136]
covariance : The covariance formula here is not only the authentic covariance , Also added a small operation on the diagonal , Make the covariance matrix full rank and reversible . Covariance also correlates the characteristics of different dimensions , Experiments show that this kind of correlated information is helpful to the detection effect .
C.Inference : computation of the anomaly map
The Mahalanobis distance is calculated at each pixel position of the distribution of the test map and the normal map , The highest score in all positions is regarded as the detection score .
Markov distance : The inverse of the covariance matrix formed by the normal graph is required , Mean and abnormal characteristic diagram .
Detection and location
Convert fractional graph into proportional fractional graph --> The highest score of all proportional scores is passed into rocauc function .
experiment
Comparative experiments : Use different evaluation indicators , Different data sets MVTec、STC、 Data enhanced MVTec, Different models .
Ablation Experiment : Choice of different embedding layers , Random dimensionality reduction or principal component analysis dimensionality reduction , Different pre training extraction Networks ResNet18、Wide ResNet-50-2 (WR50)、EfficientNet-B5.
other : Time contrast , Memory comparison .
边栏推荐
- 775. 倒排单词
- ATT&CK初步了解
- 105. Construct binary tree from preorder and inorder traversal sequence (medium binary tree DFS hash table binary tree)
- 【转载】token令牌在登录场景使用
- Ngx+sql environment offline installation log (RPM installation)
- imx6q gpio复用
- 770. Word replacement
- [connect set-top box] - use ADB command line to connect ec6108v9 Huawei Yuehe box wirelessly
- Sword finger offer II 065. The shortest word code (medium dictionary tree string array)
- Imx6q GPIO multiplexing
猜你喜欢

Target segmentation learning

Qt+ffmpeg environment construction

Paddlenlp text classification based on ernir3.0: take wos dataset as an example (hierarchical classification)

The function of wechat applet to cut pictures

es个人整理的相关面试题

79. Word search (medium string array matrix backtracking)

JVM -- custom class loader

How to install WiFi correctly
![[reprint] the token token is used in the login scenario](/img/84/77dc2316e2adc380a580e2456c0e59.png)
[reprint] the token token is used in the login scenario

使用PCL批量将点云.bin文件转.pcd
随机推荐
LeetCode刷题系列之-多数之和类型
CMD common commands
2022年一级建造师考试什么时候才能报名?
96. Different binary search trees (medium binary search tree dynamic planning)
For loops and functions
STM32 single chip microcomputer drive L298N
STM32 board level support package for keys
770. 单词替换
ES6, deep copy, shallow copy
Solve the problem that TS node xxx.ts executes TS code and reports errors
How do we do full link grayscale on the database?
Att & CK Threat Intelligence
The blueprint of flask complements openpyxl
PaddleNLP基于ERNIR3.0文本分类以CAIL2018-SMALL数据集罪名预测任务为例【多标签】
98. Verify binary search tree (medium binary search tree DFS)
Binary source code, inverse code, complement code
winServer运维技术栈
STM32 - systick timer (cubemx configures systick)
ngx+sql环境离线安装日志(rpm安装)
Gd32f303 firmware library development (10) -- dual ADC polling mode scanning multiple channels