TasksSotADatasetsPapersMethodsSubmitAbout
Papers With Code 2

A community resource for machine learning research: papers, code, benchmarks, and state-of-the-art results.

Explore

Notable BenchmarksAll SotADatasetsPapersMethods

Community

Submit ResultsAbout

Data sourced from the PWC Archive (CC-BY-SA 4.0). Built by the community, for the community.

Papers/Target before Shooting: Accurate Anomaly Detection and Loc...

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

Hanxi Li, Jianfei Hu, Bo Li, Hao Chen, Yongbin Zheng, Chunhua Shen

2023-08-13Anomaly DetectionSupervised Anomaly Detection
PaperPDFCode(official)

Abstract

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.

Results

TaskDatasetMetricValueModel
Anomaly DetectionMVTec 3D-AD (RGB)Detection AUROC88.5CPR
Anomaly DetectionMVTec 3D-AD (RGB)Segmentation AP57.8CPR
Anomaly DetectionMVTec 3D-AD (RGB)Segmentation AUPRO96.9CPR
Anomaly DetectionMVTec 3D-AD (RGB)Segmentation AUROC99.1CPR
Anomaly DetectionBTADDetection AUROC94.8CPR
Anomaly DetectionBTADSegmentation AP70.3CPR
Anomaly DetectionBTADSegmentation AUPRO85.1CPR
Anomaly DetectionBTADSegmentation AUROC98.4CPR
Anomaly DetectionMVTec ADDetection AUROC99.7CPR
Anomaly DetectionMVTec ADFPS113CPR
Anomaly DetectionMVTec ADSegmentation AP82.7CPR
Anomaly DetectionMVTec ADSegmentation AUPRO97.8CPR
Anomaly DetectionMVTec ADSegmentation AUROC99.2CPR
Anomaly DetectionMVTec ADDetection AUROC99.7CPR-fast
Anomaly DetectionMVTec ADFPS245CPR-fast
Anomaly DetectionMVTec ADSegmentation AP82.3CPR-fast
Anomaly DetectionMVTec ADSegmentation AUPRO97.7CPR-fast
Anomaly DetectionMVTec ADSegmentation AUROC99.2CPR-fast
Anomaly DetectionMVTec ADDetection AUROC99.4CPR-faster
Anomaly DetectionMVTec ADFPS478CPR-faster
Anomaly DetectionMVTec ADSegmentation AP80.6CPR-faster
Anomaly DetectionMVTec ADSegmentation AUPRO97.3CPR-faster
Anomaly DetectionMVTec ADSegmentation AUROC99CPR-faster
Anomaly DetectionMVTec ADFPS1016CPR-faster(TensorRT)
Anomaly DetectionMVTec ADFPS362CPR-fast(TensorRT)
Anomaly DetectionMVTec ADFPS130CPR(TensorRT)
Anomaly DetectionBTADDetection AUROC98.3CPR
Anomaly DetectionBTADSegmentation AP84CPR
Anomaly DetectionBTADSegmentation AUPRO91.4CPR
Anomaly DetectionBTADSegmentation AUROC99.1CPR
Anomaly DetectionMVTec ADDetection AUROC99.7CPR
Anomaly DetectionMVTec ADSegmentation AP86CPR
Anomaly DetectionMVTec ADSegmentation AUPRO98.3CPR
Anomaly DetectionMVTec ADSegmentation AUROC99.6CPR

Related Papers

Multi-Stage Prompt Inference Attacks on Enterprise LLM Systems2025-07-213DKeyAD: High-Resolution 3D Point Cloud Anomaly Detection via Keypoint-Guided Point Clustering2025-07-17A Semi-Supervised Learning Method for the Identification of Bad Exposures in Large Imaging Surveys2025-07-17A Privacy-Preserving Framework for Advertising Personalization Incorporating Federated Learning and Differential Privacy2025-07-16Bridge Feature Matching and Cross-Modal Alignment with Mutual-filtering for Zero-shot Anomaly Detection2025-07-15Adversarial Activation Patching: A Framework for Detecting and Mitigating Emergent Deception in Safety-Aligned Transformers2025-07-12Towards High-Resolution 3D Anomaly Detection: A Scalable Dataset and Real-Time Framework for Subtle Industrial Defects2025-07-10seMCD: Sequentially implemented Monte Carlo depth computation with statistical guarantees2025-07-08