FastRef: Fast Prototype Refinement for Few-shot Industrial Anomaly Detection

Yu-Fei Li, Long Tian, Yu-Yang Dai, Wen-Chao Chen, Liang Bao +1 more
1/1/2026

No confident code implementation found for this paper.

Abstract

Few-shot industrial anomaly detection (FS-IAD) presents a critical challenge for practical automated inspection systems operating in data-scarce environments. While existing approaches predominantly focus on obtaining prototypes from limited normal images, they neglect to systematically incorporate statistics of query image to enhance prototype representativeness.

Show full abstract

To address this issue, we propose FastRef, a novel and efficient prototype refinement framework for FS-IAD. Our method operates through an iterative two-stage process during inference: (1) characteristic transfer from query features to the enhanced prototypes, and (2) anomaly suppression by aligning the enhanced prototypes with their normal counterparts. The characteristic transfer is achieved through linear reconstruction of query features from prototypes with an optimizable transport matrix, while the anomaly suppression addresses a key observation in FS-IAD that unlike conventional IAD with abundant normal prototypes, the limited-sample setting makes anomaly reconstruction more probable in characteristic transfer. Therefore, we employ optimal transport to measure while minimize the gap between prototypes and their enhanced counterparts for anomaly suppression. For comprehensive evaluation, we integrate FastRef with three competitive prototype-based FS-IAD methods: PatchCore, WinCLIP, and AnomalyDINO. Extensive experiments across four benchmark datasets of MVTec, ViSA, MPDD and RealIAD demonstrate both the effectiveness and efficiency of our approach under 1/2/4-shots.

Semantic Scholar

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{li2026fastref,
  title  = {FastRef: Fast Prototype Refinement for Few-shot Industrial Anomaly Detection},
  author = {Yu-Fei Li and Long Tian and Yu-Yang Dai and Wen-Chao Chen and Liang Bao and Xi-Yang Liu},
  year   = {2026},
  url    = {https://api.semanticscholar.org/CorpusID:42770bf9dd24c2cf36cd562f6bf6503df40372d3},
  journal = {Computer Vision and Pattern Recognition}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/42770bf9dd24c2cf36cd562f6bf6503df40372d3.svg)](https://codeofpaper.com/paper/42770bf9dd24c2cf36cd562f6bf6503df40372d3)

Discussion