How nelson1425/efficientad works
Project Type and Purpose
• EfficientAD is an open-source Python toolkit for visual anomaly detection, implementing the methods from “EfficientAD: Accurate Visual Anomaly Detection” (arXiv:2303.14535).
• It provides training, inference, benchmarking, and evaluation pipelines on datasets like MVTec AD and MVTec LOCO, optionally leveraging ImageNet for pretraining.
File Structure
• Top-level scripts:
• efficientad.py – main entry point for training and inference
• pretraining.py – standalone pretraining routine using general images
• benchmark.py – measures model latency throughput
• Utilities:
• common.py – shared helper functions (data loading, metric computation, CLI parsing)
• Models directory: stores pretrained weights (teacher_small.pth, teacher_medium.pth)
• Results directory: contains JSON metrics outputs
• Ancillary files: LICENSE, README.md
Extract Additional Insights from README
• Describes supported datasets (Mvtec AD, Mvtec LOCO) and evaluation workflows.
• Specifies dependency stack (Python 3.10, PyTorch, torchvision, scikit-learn, tifffile).
• Outlines CLI arguments for dataset paths, model size, and weight selection.
• Details external evaluation scripts (not part of repo) that consume anomaly maps and produce metrics.