【论文笔记】【CVPR2022】【异常检测】 Anomaly Detection via Reverse Distillation from One-Class Embedding

[CVPR2022] Anomaly Detection via Reverse Distillation from One-Class Embedding

CVPR 2022
Link: [2201.10703] Anomaly Detection via Reverse Distillation from One-Class Embedding (arxiv.org)
Code: https://github.com/Merenguelkl/Reverse_Disstilation

1. Intro

https://pic.imgdb.cn/item/622dc3515baa1a80ab4503fd.jpg

提出一个新颖的知识蒸馏框架:Teacher Encoder + Student Decoder,并使用逆向蒸馏(Reverse Distillation),引入一个可训练的 one-class bottleneck embedding (OCBE) 模块作为bottleneck,该模块可以保留用于还原正常样本特征的信息。OCBE包含了multi-scale feature fusion block (MFF)
和 one-class embedding block (OCE)。

两个优点

1、非相似结构。若teacher和student模型使用相同或相似的网络结构,那在异常样本上输出的差异性不够;

2、紧凑的Embedding。喂给student网络的特征是去除了冗余信息的。

Contribution

1、提出了简单有效的逆向蒸馏方式,解决了传统知识蒸馏框架中non-distinguishing filter问题。

2、提出的OCBE模块将特征从高维投影到低维,去除了冗余信息。

3、MVTec-AD SOTA结果


2. Method

https://pic.imgdb.cn/item/622dc9425baa1a80ab47dbd4.jpg

Overview

teacher E提取多尺度特征,训练student D从bottleneck embedding中还原这些特征,训练过程只在正常图像上进行。OCBE将多尺度特征聚合并降维到低维空间中供student D还原特征。

2.1 Reverse Distillation

将知识蒸馏和Encoder-Decoder框架融合,蒸馏过程为student Decoder通过bottleneck embedding先还原深层特征(high level),再浅层特征(low level)。

训练时Teacher Encoder不进行权重更新,只训练OCBE和Student Decoder。

Student Decoder使用和Teacher Encoder对称的网络架构,目的是让相对应位置的特征维度一致。

e.g. 当Teacher Encoder使用参数为kernel size = 1,stride = 2的卷积操作时时,Student Decoder 使用kernel size = 2,stride = 2的反卷积操作。

Loss

在每一组feature map上计算一张anomaly map,计算方法为在通道维上计算余弦相似度。得到的anomaly map尺寸与相应位置feature map尺寸一致。

https://pic.imgdb.cn/item/622dcde05baa1a80ab4a7832.jpg

loss函数为每张anomaly map的数值平均求累加:

https://pic.imgdb.cn/item/622dce2c5baa1a80ab4aa3b7.jpg

2.2 One-Class Bottleneck Embedding (OCBE)

若直接使用Encoder最后一层特征(原始bottleneck),有两个缺点:

1、维度太高,包含大量冗余信息;

2、最后一层特征包含高级特征(语义等),难以直接送入Decoder进行还原低级特征

为了客服以上缺点,提出了可训练的One-Class Bottleneck Embedding(OCBE)来降维并融合多level的特征,包含MFF和OCE

MFF

用于融合多级别特征,为了使得特征维度相同,对高级特征应用一个或多个大小为33,步长为2的卷积操作,并接有BN和ReLU。特征维度相同后进行拼接(concat),然后经过一个11的卷积核来降低通道数。

OCE

使用一个ResBlock得到更加适合用于Decoder还原Encoder特征的Bottleneck Embedding

https://pic.imgdb.cn/item/622dd0ba5baa1a80ab4c4c8f.jpg

2.3 Anomaly Scoring

像素级别

在Inference阶段,输入一张测试图像会得到L张Anomaly Map,对它们进行双线性上采样到原始图像大小,并进行相加,最终得到像素级别Anomaly Map,使用高斯模糊进行平滑处理。

图像级别

取Anomaly Map的最大值作为图像级别异常分数。

https://pic.imgdb.cn/item/622dd4015baa1a80ab4dbaed.jpg


3. Experiment

3.1 Defect Detection

数据集:MVTec-AD

图像级别

https://pic.imgdb.cn/item/622dd4b85baa1a80ab4dff06.jpg

像素级别

https://pic.imgdb.cn/item/622dd56a5baa1a80ab4e4ac0.jpg

异常分数分布

https://pic.imgdb.cn/item/622dd6b55baa1a80ab4effaa.jpg

3.2 Semantic Anomaly Detection

数据集:CIFAR-10、MNIST、F-MNIST

https://pic.imgdb.cn/item/622dd6cb5baa1a80ab4f0baf.jpg

4. Ablation

4.1 with/without OCBE

https://pic.imgdb.cn/item/622dd6e05baa1a80ab4f142c.jpg

4.3 Multi-Scale Feature

https://pic.imgdb.cn/item/622dd72a5baa1a80ab4f3da8.jpg

4.2 Different Backbones

https://pic.imgdb.cn/item/622dd6f65baa1a80ab4f2113.jpg
  • 12
    点赞
  • 51
    收藏
    觉得还不错? 一键收藏
  • 4
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值