当前位置:网站首页>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 .
边栏推荐
- How to use sprintf function
- LeetCode刷题系列之-多数之和类型
- elment-plus图标input上面带的图标为什么不显示
- Use REM to make the font size adaptive to the screen
- Summary of common error types in JS
- 使用PCL批量显示PCD点云数据流
- PHP库neo4j怎么安装及使用
- c语言实现字符串逆序排列
- Using PCL to batch display PCD point cloud data flow
- How to install and use PHP library neo4j
猜你喜欢

STM32 - Communication

What to do after mathematical modeling gets the competition problem and some ("crooked ways") tips - must see before the competition

98. Verify binary search tree (medium binary search tree DFS)

PaddleNLP基于ERNIR3.0文本分类以CAIL2018-SMALL数据集罪名预测任务为例【多标签】

STM32 - external interrupt application (exti) (use cubemx to configure interrupts)

Using PCL to batch display PCD point cloud data flow
Integrating database Ecology: using eventbridge to build CDC applications

842. Arrange numbers

【转载】token令牌在登录场景使用

(翻译)图技术简明历史
随机推荐
Concise history of graphic technology
Analysis notes on let (const) temporary dead zone in JS
Winserver operation and maintenance technology stack
6K6w5LiA5qyh5pS75Ye75YiG5p6Q
fatal error: io. h: No such file or directory
ATT&CK 威胁情报
MySQL installation and configuration (super detailed, simple and practical)
32. Longest valid bracket (difficult stack string)
How to install WiFi correctly
Leetcode integer exercises integer inversion
Sword finger offer II 066. sum of words (medium prefix tree design string)
ES6 concept
Stm32+ four pin OLED screen + Chinese character mold taking
Use REM to make the font size adaptive to the screen
6K6w5LiA5qyh5pS75Ye75YiG5p6Q
Image is referred in multiple repositories
imx6q gpio复用
JSON file to PNG image (batch conversion / image naming / migration / pixel value change) [tips]
Ngx+sql environment offline installation log (RPM installation)
How to use sprintf function