Mahalanobis PatchCore: Covariance-Aware and Streaming-Compatible Industrial Anomaly Detection

arXiv:2605.27748 · 2026-05-28 공개 · arXiv · PDF

industrial-anomaly-detection one-class-learning streaming-compatible memory-efficient retrieval-detector feature-whitening online-covariance mahalanobis-patchcore

Abstract

Industrial visual anomaly detection is usually one-class: normal images are abundant, while defects are rare, heterogeneous, and often unavailable during system design. PatchCore-style retrieval suits this setting because it scores test images from a memory bank of normal patch features, but the standard Euclidean geometry ignores feature correlations and its offline construction materialises the full patch pool before subsampling. We introduce Mahalanobis PatchCore, a covariance-aware, streaming-compatible extension of PatchCore. Its artificial intelligence contribution is a retrieval detector that estimates a regularised covariance model in reduced feature space and whitens embeddings, so Euclidean nearest-neighbour search after transformation implements Mahalanobis retrieval. A bounded-memory, re-iterable training pipeline builds the memory bank without storing all normal patches at once, using incremental dimensionality reduction, online covariance estimation, and streaming aggregation. The engineering application is automated industrial inspection, where visual anomaly detection must remain accurate under practical memory limits. We evaluate the method on a public 15-category industrial anomaly-detection benchmark and three industrial datasets covering blow-fill-seal strip-ampoule meniscus inspection, amber-glass-ampoule bottom inspection, and lyophilised-cake vial inspection. Mahalanobis PatchCore preserves most offline PatchCore image-level performance on the public benchmark while reducing peak memory from 5.41 to 2.78 GB, and improves the selected industrial mean image area under the receiver operating characteristic curve from 0.981 to 0.986.

한국어 요약

📋 한 줄 요약

**[Industrial Anomaly Detection]** Mahalanobis PatchCore가 covariance-aware whitening과 streaming 메모리뱅크로 PatchCore 확장 — 공개 벤치마크 성능 유지하며 peak memory 5.41→2.78 GB 감소, 산업 mean AUROC 0.981→0.986.

🎯 핵심 기여도

💡 핵심 아이디어

PatchCore의 정확도-메모리 트레이드오프는 표준 Euclidean retrieval과 offline patch pool에서 비롯되며, covariance-aware whitening + streaming memory bank 구성으로 Mahalanobis retrieval을 효율적으로 구현해 메모리 절반·성능 개선을 동시 달성할 수 있다.

🔬 기술적 접근법

📊 주요 결과

💭 의의 및 한계

**의의**: PatchCore의 메모리 한계 해소로 실 산업 배포 가능, covariance-aware retrieval의 효과 정량 입증, streaming pipeline의 재사용성. **한계**: 매우 다양한 결함 분포에 대한 covariance 추정의 robustness, 데이터셋 규모 일반화는 후속 검증, regularisation hyperparameter의 도메인 의존성.

🚀 실용적 활용