Reproduce “ToCoAD: Two-Stage Contrastive Learning for Industrial Anomaly Detection” on OpenResearch

Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Yun Liang, Zhiguang Hu, Junjie Huang, Donglin Di, Anyang Su, Lei Fan

ToCoAD introduces a two-stage contrastive learning framework for industrial anomaly detection that adaptively fine-tunes pre-trained feature extractors to bridge the domain gap between general and industrial images. The approach achieved competitive image-level AUROC scores of 99.10% on MVTec AD and 95.35% on VisA, alongside high pixel-level AUROC of 97.70% on BTAD.

Key insights

  • The two-stage training strategy, integrating initial discriminative pre-training with subsequent negative-guided contrastive learning, is crucial for effectively adapting feature extractors to industrial domains and improving anomaly localization.
  • Focal Loss is more effective than Cross-Entropy Loss for training the discriminative network due to its ability to handle the inherent class imbalance in pixel-level one-class classification tasks.
  • Using deeper semantic features (e.g., from layer 3 and layer 4) within the contrastive learning network provides richer information for positive sample comparison, leading to better anomaly detection performance.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.