Skip to yearly menu bar Skip to main content


Poster

CostFilter-AD: Enhancing Anomaly Detection through Matching Cost Filtering

Zhe Zhang · Mingxiu Cai · Hanxiao Wang · Gaochang Wu · Tianyou Chai · Xiatian Zhu

West Exhibition Hall B2-B3 #W-123
[ ] [ ] [ Project Page ]
Tue 15 Jul 11 a.m. PDT — 1:30 p.m. PDT

Abstract:

Unsupervised anomaly detection (UAD) seeks to localize the anomaly mask of an input image with respect to normal samples.Either by reconstructing normal counterparts (reconstruction-based) or by learning an image feature embedding space (embedding-based), existing approaches fundamentally rely on image-level or feature-level matching to derive anomaly scores. Often, such a matching process is inaccurate yet overlooked, leading to sub-optimal detection. To address this issue, we introduce the concept of cost filtering, borrowed from classical matching tasks, such as depth and flow estimation, into the UAD problem. We call this approach CostFilter-AD. Specifically, we first construct a matching cost volume between the input and normal samples, comprising two spatial dimensions and one matching dimension that encodes potential matches. To refine this, we propose a cost volume filtering network, guided by the input observation as an attention query across multiple feature layers, which effectively suppresses matching noise while preserving edge structures and capturing subtle anomalies. Designed as a generic post-processing plug-in, CostFilter-AD can be integrated with either reconstruction-based or embedding-based methods. Extensive experiments on MVTec-AD and VisA benchmarks validate the generic benefits of CostFilter-AD for both single- and multi-class UAD tasks. Code and models will be released at https://github.com/ZHE-SAPI/CostFilter-AD.

Lay Summary:

Have you ever wondered how factories manage to detect tiny defects, such as faint scratches or missing components, across thousands of products that belong to different categories? This task is more difficult than it appears. Many AI systems try to identify defects by comparing new images, which may contain hidden anomalies, with normal ones. However, this matching process is often noisy and inaccurate, especially when defects are small or subtle, leading to missed problems or false alarms.We developed a method called CostFilter-AD to enhance this process. It builds an anomaly cost volume, a detailed map showing how well each part of an image aligns with defect-free patterns. A filtering system then removes noise and highlights important details, making it easier to detect even faint or unusual issues.Our method does not require actual defective examples during training. Since most factory products are normal, the system learns from these alone and can still accurately recognize a wide range of previously unseen anomalies. CostFilter-AD can enhance many existing AI systems, helping manufacturers catch defects early, improve quality control, reduce waste, and deliver more reliable products worldwide.

Live content is unavailable. Log in and register to view live content