首页|期刊导航|测试技术学报|基于DINOv2到EfficientViT的多损失蒸馏Patch特征少样本异常检测

基于DINOv2到EfficientViT的多损失蒸馏Patch特征少样本异常检测OA

Multi-Loss Distillation of Patch Features from DINOv2 to EfficientViT for Few-Shot Anomaly Detection

中文摘要英文摘要

针对少样本工业异常检测任务中大规模模型部署困难与轻量级模型性能不足的问题,提出一种基于知识蒸馏的轻量化异常检测方法.以DINOv2作为教师模型,EfficientViT作为学生模型,通过知识迁移实现在资源受限环境下的高性能检测.设计特征对齐适配器以弥合师生模型特征差异,并构建结合Huber损失、余弦相似度损失与Gram矩阵损失的多目标蒸馏函数,从数值、方向和空间统计关系多维度约束学生模型学习.在MVTec AD数据集上的实验表明,仅使用正常样本训练即可显著提升学生模型性能:蒸馏后的学生模型与未蒸馏基准模型相比,图像级异常检测AUROC提升0.170;与教师模型相比,在保持相当性能的同时,参数量减少约23%,推理速度提升4倍.消融实验与可视化分析验证了模型各组件的有效性.

To address the problem in few-shot industrial anomaly detection where large-scale models are difficult to deploy and lightweight models show limited performance,a lightweight anomaly detection method based on knowledge distillation is proposed.DINOv2 as the teacher model and EfficientViT as the student model,transferring knowledge are used to achieve high detection performance under resource constraints.A feature alignment adapter is designed to reduce the representation gap between the two models,and a multi-objective distillation loss combining Huber loss,cosine similarity loss,and Gram matrix loss guides the student from multiple dimensions of magnitude,direction,and spatial correlation.Experiments on the MVTec AD dataset show that the student model,trained only with normal samples,achieves a 0.170 improvement in image-level AUROC over the baseline model without distillation,while maintaining comparable performance to the teacher model with about 23%fewer parameters and 4 times faster inference.The effectiveness of the proposed framework is confirmed by ablation and visualization studies.

韩信;邵星灵;李秀源;闫佳乐;邓瑞祥

中北大学 电气与控制工程学院,山西 太原 030051中北大学 电气与控制工程学院,山西 太原 030051中北大学 仪器与电子学院,山西 太原 030051中北大学 仪器与电子学院,山西 太原 030051中北大学 电气与控制工程学院,山西 太原 030051

信息技术与安全科学

异常检测知识蒸馏轻量化模型视觉Transformer少样本学习

anomaly detectionknowledge distillationlightweight modelvision Transformerfew-shot learning

《测试技术学报》 2026 (4)

423-434,12

国家自然科学基金资助项目(62203404)

10.62756/csjs.1671-7449.2026060

评论