Abstract
To improve logical anomaly detection, some previous works have integrated segmentation techniques with conventional anomaly detection methods. Although these methods are effective, they frequently lead to unsatisfactory segmentation results and require manual annotations. To address these drawbacks, we develop an unsupervised component segmentation technique that leverages foundation models to autonomously generate training labels for a lightweight segmentation network without human labeling. Integrating this new segmentation technique with our proposed Patch Histogram module and the Local-Global Student-Teacher (LGST) module, we achieve a detection AUROC of 95.3% in the MVTec LOCO AD dataset, which surpasses previous SOTA methods. Furthermore, our proposed method provides lower latency and higher throughput than most existing approaches.
Introduction
Industrial Anomaly Detection (AD) has traditionally excelled at identifying "structural" defects such as scratches, dents, or holes. However, "logical" anomalies—violations of underlying rules, such as a missing component or a misaligned wire—remain a significant challenge. Previous solutions often relied on image segmentation to count or locate components, but these approaches typically required labor-intensive manual labeling or produced low-quality results. Moreover, high-performing models are often too computationally heavy for real-time industrial applications. CSAD (Unsupervised Component Segmentation for Logical Anomaly Detection) addresses these issues by providing an unsupervised, accurate, and high-speed framework.
Methodology
The CSAD framework is built upon three primary pillars designed to automate and optimize the detection process:
- Semantic Pseudo-label Generation: To eliminate the need for human annotators, the system utilizes a pipeline of foundation models. RAM++ generates text tags for images, which are then processed by Grounded-SAM to create initial masks. These masks are refined and clustered using MeanShift to ensure consistent class labeling for similar components across the dataset.
- Lightweight Segmentation with Logical Synthetic Anomalies (LSA): A DeepLabV3+ model is trained on these pseudo-labels. To prevent the model from merely memorizing spatial coordinates, the authors introduce LSA, an augmentation technique that randomly inserts extra components into training images, forcing the network to learn robust semantic features.
- Patch Histogram & LGST Modules: The Patch Histogram module divides the segmentation map into a grid to calculate local class distributions, effectively catching positional errors. Simultaneously, the Local-Global Student-Teacher (LGST) module identifies feature-level discrepancies at multiple scales. To minimize latency, the segmentation network and LGST module share the same backbone features.
Experimental Evaluation
The model was evaluated on the MVTec LOCO AD benchmark, which focuses on logical constraints across five categories: Breakfast Box, Juice Bottle, Pushpins, Screw Bag, and Splicing Connectors.
Key Results
CSAD establishes a new state-of-the-art for the MVTec LOCO AD benchmark:
- Accuracy: Achieved a total average AUROC of 95.3%, surpassing previous leaders like PSAD (94.8%) and ComAD (90.1%).
- Efficiency: The model is optimized for real-time use, with an inference latency of just 8.9ms and a throughput of 321.8 images per second. This represents a significant improvement over PSAD, which requires nearly 98ms per image.
Conclusion
CSAD demonstrates that foundation models can be effectively used as "silver" labelers to bootstrap lightweight, specialized models for industrial tasks. By combining automated pseudo-labeling with spatial awareness via grid-based histograms, the system achieves high accuracy without the overhead of manual labeling or complex graph networks. Future work will focus on improving segmentation for obscured or rare components to further enhance reliability in complex industrial environments.
Summary updated