anomalib
Anomalib is a deep-learning library focused on benchmarking, developing, and deploying anomaly detection algorithms, particularly for visual/image-based defect detection. It bundles state-of-the-art unsupervised and few-shot anomaly detection models with training, evaluation, and edge-deployment tooling.
Apache-2.0Permissive — free to use in commercial and proprietary software, with attribution.View license →
Production readiness
4/5- Actively maintainedCommits in the last 6 months
- No known vulnerabilitiesNot yet scanned
- Clear, usable licenseApache-2.0 (permissive)
- Proven adoptionWidely used
- Has documentationDocumentation indexed
pip install anomalibOur analysis
Anomalib is an Intel-backed Python library providing a unified collection of image anomaly detection models with a common API for training, benchmarking, inference, and deployment. It targets unsupervised/visual defect detection where only normal samples are available for training.
When to use anomalib
Use it for industrial visual inspection and quality control where you need to flag defects or anomalies without labeled abnormal data, want to compare multiple SOTA models (PatchCore, PaDiM, FastFlow, etc.) on standard benchmarks like MVTec AD, or need OpenVINO/Torch export for edge deployment on Intel hardware.
When not to
Not a fit for tabular/time-series or generic outlier detection (use PyOD or Alibi Detect there), for NLP/LLM workloads, or when you need a lightweight classical anomaly model without the PyTorch Lightning and deep-learning dependency footprint.
Strengths
- Ready-to-use implementations of many published visual anomaly detection algorithms under one consistent interface
- Strong deployment story with OpenVINO and Torch export plus inference tooling
- Built on PyTorch Lightning with config-driven experiments and benchmarking against standard datasets
- Backed by Intel / open-edge-platform with active community and documentation
Trade-offs
- Narrowly scoped to image/visual anomaly detection; limited for other data modalities
- Heavyweight dependency stack (PyTorch, Lightning, OpenVINO) for what may be a single model need
- Best performance and export features lean toward Intel hardware
- Rapidly evolving API has historically introduced breaking changes between major versions
Maturity
Mature and actively maintained with significant adoption (thousands of stars), regular releases, and corporate backing; it is production-oriented but the API surface still evolves across versions.
Anomalib Documentation
Introduction
This is the source code for the Anomalib documentation. It is built using sphinx-design and myst parser.
Installation
To install the dependencies, run the following command from the project root:
pip install .[docs]
Build
To build the documentation, run the following command:
cd docs
sphinx-build -b html source build