skills/43-wentorai-research-plugins/skills/domains/ai-ml/anomaly-detection-papers-guide/SKILL.md
Industrial anomaly detection methods and benchmark papers
npx skillsauth add brycewang-stanford/Awesome-Agent-Skills-for-Empirical-Research anomaly-detection-papers-guideInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Industrial anomaly detection uses machine learning to identify defects, faults, and anomalies in manufacturing and quality inspection. This curated collection covers methods from reconstruction-based (autoencoders) to memory-bank approaches (PatchCore), normalizing flows, knowledge distillation, and foundation model-based detectors. Includes benchmark datasets, evaluation metrics, and real-world deployment considerations.
Anomaly Detection Methods
├── Reconstruction-based
│ ├── Autoencoder (AE, VAE)
│ ├── GAN-based (AnoGAN, GANomaly)
│ └── Diffusion-based (AnoDDPM)
├── Embedding-based
│ ├── Memory bank (PatchCore, PaDiM)
│ ├── Knowledge distillation (STPM, RD4AD)
│ └── Self-supervised (CutPaste, DRAEM)
├── Normalizing Flows
│ ├── FastFlow, CFLOW-AD, CS-Flow
│ └── DifferNet
├── Foundation Models
│ ├── CLIP-based (WinCLIP, AnomalyCLIP)
│ ├── SAM-based (GroundedSAM-AD)
│ └── Vision-language (AnomalyGPT)
└── 3D Anomaly Detection
├── Point cloud methods
└── Multi-modal (RGB + 3D)
| Method | Year | Approach | MVTec AUROC | |--------|------|----------|-------------| | PatchCore | 2022 | Memory bank | 99.1% | | PaDiM | 2021 | Multivariate Gaussian | 97.9% | | RD4AD | 2022 | Knowledge distillation | 98.5% | | FastFlow | 2022 | Normalizing flow | 99.4% | | SimpleNet | 2023 | Feature adaptation | 99.6% | | WinCLIP | 2023 | CLIP zero-shot | 95.2% | | AnomalyGPT | 2024 | Vision-language | 96.3% |
benchmarks = {
"MVTec AD": {
"categories": 15,
"images": 5354,
"type": "Product/texture defects",
"annotation": "Pixel-level masks",
},
"MVTec 3D-AD": {
"categories": 10,
"images": 4147,
"type": "3D point cloud + RGB",
},
"VisA": {
"categories": 12,
"images": 10821,
"type": "Complex structure anomalies",
},
"BTAD": {
"categories": 3,
"images": 2830,
"type": "Industrial body/surface",
},
"MPDD": {
"categories": 6,
"images": 1064,
"type": "Metal parts defects",
},
}
for name, info in benchmarks.items():
print(f"{name}: {info['categories']} categories, "
f"{info['images']} images — {info['type']}")
# PatchCore-style anomaly detection
from anomalib.data import MVTec
from anomalib.models import Patchcore
from anomalib.engine import Engine
# Setup dataset
datamodule = MVTec(
root="./datasets/MVTec",
category="bottle",
image_size=(256, 256),
)
# Initialize model
model = Patchcore(
backbone="wide_resnet50_2",
layers=["layer2", "layer3"],
coreset_sampling_ratio=0.1,
)
# Train and test
engine = Engine()
engine.fit(model=model, datamodule=datamodule)
results = engine.test(model=model, datamodule=datamodule)
print(f"Image AUROC: {results[0]['image_AUROC']:.3f}")
print(f"Pixel AUROC: {results[0]['pixel_AUROC']:.3f}")
# Standard anomaly detection metrics
from sklearn.metrics import roc_auc_score
import numpy as np
# Image-level: Is this image anomalous?
image_auroc = roc_auc_score(y_true_image, y_score_image)
# Pixel-level: Where is the anomaly?
pixel_auroc = roc_auc_score(
y_true_pixel.flatten(), y_score_pixel.flatten()
)
# PRO metric: Per-Region Overlap
# Better than pixel AUROC for small anomalies
# Weights each connected anomaly region equally
### Active Directions (2024-2025)
1. **Zero/few-shot AD** — Detect anomalies without normal training data
2. **Multi-class unified** — One model for all product categories
3. **Foundation model AD** — CLIP/SAM/LLM-based detection
4. **Logical anomalies** — Structural/contextual defects
5. **Continual learning** — Adapt to new defect types
6. **3D anomaly detection** — Point cloud and multi-modal
7. **Real-time deployment** — Edge device optimization
development
Conduct rigorous thematic analysis (TA) of qualitative data following Braun and Clarke's (2006) six-phase framework. Use whenever the user mentions 'thematic analysis', 'TA', 'Braun and Clarke', 'qualitative coding', 'identifying themes', or asks for help analysing interviews, focus groups, open-ended survey responses, or transcripts to identify patterns. Also trigger for questions about inductive vs theoretical coding, semantic vs latent themes, essentialist vs constructionist epistemology, building a thematic map, or writing up a qualitative findings section. Covers all six phases, the four upfront analytic decisions, the 15-point quality checklist, and the five common pitfalls. Produces a Word document write-up and an annotated thematic map. Does NOT cover IPA, grounded theory, discourse analysis, conversation analysis, or narrative analysis — use a different method for those.
development
Guide users through writing a systematic literature review (SLR) following the PRISMA 2020 framework. Use this skill whenever the user mentions 'systematic review', 'systematic literature review', 'SLR', 'PRISMA', 'PRISMA 2020', 'PRISMA flow diagram', 'PRISMA checklist', or asks for help writing, structuring, or auditing a literature review that follows reporting guidelines. Also trigger when the user asks about inclusion/exclusion criteria for a review, search strategies for databases like Scopus/WoS/PubMed, study selection processes, risk of bias assessment, or narrative synthesis for a review paper. This skill covers the full PRISMA 2020 checklist (27 items), produces a Word document manuscript in strict journal article format, generates an annotated PRISMA flow diagram, and enforces APA 7th Edition referencing throughout. It does NOT cover meta-analysis or statistical pooling. By Chuah Kee Man.
testing
Performs placebo-in-time sensitivity analysis with hierarchical null model and optional Bayesian assurance. Use when checking model robustness, verifying lack of pre-intervention effects, or estimating study power.
data-ai
Fit, summarize, plot, and interpret a chosen CausalPy experiment. Use after the causal method has been selected, including when configuring PyMC/sklearn models and scale-aware custom priors.