Target before Shooting: Accurate Anomaly Detection and Localization under One Millisecond via Cascade Patch Retrieval

08/13/2023
by   Hanxi Li, et al.
0

In this work, by re-examining the "matching" nature of Anomaly Detection (AD), we propose a new AD framework that simultaneously enjoys new records of AD accuracy and dramatically high running speed. In this framework, the anomaly detection problem is solved via a cascade patch retrieval procedure that retrieves the nearest neighbors for each test image patch in a coarse-to-fine fashion. Given a test sample, the top-K most similar training images are first selected based on a robust histogram matching process. Secondly, the nearest neighbor of each test patch is retrieved over the similar geometrical locations on those "global nearest neighbors", by using a carefully trained local metric. Finally, the anomaly score of each test image patch is calculated based on the distance to its "local nearest neighbor" and the "non-background" probability. The proposed method is termed "Cascade Patch Retrieval" (CPR) in this work. Different from the conventional patch-matching-based AD algorithms, CPR selects proper "targets" (reference images and locations) before "shooting" (patch-matching). On the well-acknowledged MVTec AD, BTAD and MVTec-3D AD datasets, the proposed algorithm consistently outperforms all the comparing SOTA methods by remarkable margins, measured by various AD metrics. Furthermore, CPR is extremely efficient. It runs at the speed of 113 FPS with the standard setting while its simplified version only requires less than 1 ms to process an image at the cost of a trivial accuracy drop. The code of CPR is available at https://github.com/flyinghu123/CPR.

READ FULL TEXT

page 1

page 2

page 4

page 6

page 11

page 12

research
05/28/2023

k-NNN: Nearest Neighbors of Neighbors for Anomaly Detection

Anomaly detection aims at identifying images that deviate significantly ...
research
02/24/2020

Deep Nearest Neighbor Anomaly Detection

Nearest neighbors is a successful and long-standing technique for anomal...
research
11/16/2020

Combining GANs and AutoEncoders for Efficient Anomaly Detection

In this work, we propose CBiGAN – a novel method for anomaly detection i...
research
03/31/2023

You Only Train Once: Learning a General Anomaly Enhancement Network with Random Masks for Hyperspectral Anomaly Detection

In this paper, we introduce a new approach to address the challenge of g...
research
03/09/2020

Texture Superpixel Clustering from Patch-based Nearest Neighbor Matching

Superpixels are widely used in computer vision applications. Nevertheles...
research
05/11/2020

A Survey on Patch-based Synthesis: GPU Implementation and Optimization

This thesis surveys the research in patch-based synthesis and algorithms...
research
04/25/2023

Patch-based 3D Natural Scene Generation from a Single Example

We target a 3D generative model for general natural scenes that are typi...

Please sign up or login with your details

Forgot password? Click here to reset