Transformer-based multicategory unsupervised anomaly detection for fabric surfaces
Fabric anomaly detection often relies on defect-free training because annotated defects are difficult to collect. Using one detector for multiple fabric categories would reduce training and maintenance costs. However, normal appearance varies considerably across weave structures, printed patterns, dyeing conditions, and local texture continuity, while many defects affect only a small region. Therefore, a unified model must adapt to the normal appearance of each fabric category while remaining sensitive to subtle local disruptions. To address these challenges, we present CALG-AD, a context-adaptive local–global reconstruction framework based on Dinomaly. Unlike Dinomaly’s directly grouped encoder targets, adaptive context decoupling constructs each reconstruction target relative to the fused class-token context and current-image spatial feature mean. Adaptive local–global attention retains Dinomaly’s global linear-attention branch and augments its value path with a routed local residual for small defects and local texture irregularities. Experiments on MVTec-AD textures, WFDD, and ZJU-Leaper evaluate the method across different fabric structures and defect shapes. On WFDD, CALG-AD improves I-AUROC from 93.41% to 97.36% and P-AUPRO from 92.58% to 93.66%. The defect-type analysis shows particularly clear P-AP gains for flecked, line, and string defects. CALG-AD also improves all three image-level metrics and P-AUPRO over Dinomaly on MVTec-AD textures and ZJU-Leaper, while requiring fewer parameters and FLOPs. These results demonstrate its effectiveness for unified anomaly detection across multiple fabric categories within each dataset. Our code is available at https://github.com/CaptaZ/CALG-AD .
Authors
- Feng Pan (ORCID: https://orcid.org/0000-0002-1362-4336)
- Shubo Zhou
- Haojun Zeng (ORCID: https://orcid.org/0009-0008-3893-8367)
- Weiyu Hu (ORCID: https://orcid.org/0009-0002-6611-6041)
- Xueqin Jiang
Institutions
- Donghua University (CN)
Publication Details
- Journal
- Textile Research Journal
- Published
- 2026-11-08
- DOI
- https://doi.org/10.1177/00405175261502595
- Primary Topic
- Industrial Vision Systems and Defect Detection
- Type
- article
- Field-Weighted Citation Impact
- 0.00