Library / SDK
open-edge-platform/anomalib avatar
open-edge-platform/anomalib

Anomalib: a deep learning library for benchmarking and deploying visual anomaly detection

An anomaly detection library comprising state-of-the-art algorithms and features such as experiment management, hyper-parameter optimization, and edge inference.

6,207 stars997 forksPythonApache-2.0

At a glance

What is it?
Anomalib collects ready-to-use anomaly detection algorithms under a Lightning-based API and CLI, with OpenVINO export for Intel hardware. It is strongest when you have normal images and no labelled defects, and weakest when you need a general tabular or time-series detector.
Who is it for?
Adopt Anomalib if you train visual anomaly detectors on normal-only image data and want a single CLI plus OpenVINO export path. Do not adopt it for tabular, time-series or heavily supervised defect classification, because the library is built around visual, largely unsupervised detection.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 2 days ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 29, 2026, and from our analysis. They are not legal advice.

Editorial analysis

What Anomalib solves, and who it is actually for

Most defect detection projects start with a pile of good parts and very few labelled failures. Anomalib is built for that situation. The README describes it as a library that collects state-of-the-art anomaly detection algorithms for benchmarking on public and private datasets, with a strong focus on visual anomaly detection: detecting and localizing anomalies within images or videos. The target user is an engineer or researcher who has normal samples and wants a model that flags deviations, rather than someone with a balanced labelled classification dataset. The repository topics confirm the framing: anomaly-detection, anomaly-localization, anomaly-segmentation, unsupervised-learning, openvino. The library also carries the Geti topic, which points at Intel's annotation and deployment tooling rather than at a general ML audience. If your problem is credit-card fraud on tabular rows, Anomalib is the wrong shape of tool. If your problem is finding a scratch on a metal surface, it is aimed directly at you.

Lightning models, a config-driven CLI, and an OpenVINO export path

The architecture is layered. Model implementations are built on Lightning, which the README says reduces boilerplate code and limits implementation effort to the bare essentials. That choice matters in practice: training loops, checkpointing and metric logging come from Lightning rather than from Anomalib itself. Configuration is handled with omegaconf, and the CLI is assembled with jsonargparse, rich and rich_argparse, according to the dependency list in pyproject.toml. That combination is what allows both a Python API and a command line to drive the same model. On the deployment side, the majority of models can be exported to OpenVINO Intermediate Representation for accelerated inference on Intel hardware, and the repository ships a tools directory plus an application directory for inference deployment. The data flow is conventional for this class of library: a dataset produces normal images, a model learns a representation of normality, and inference produces an anomaly score plus a localization map. Anomalib's contribution is not a new training paradigm; it is the packaging of many published algorithms behind one interface so they can be compared on the same data.

Installing Anomalib and running a first training job

The README recommends a virtual environment and a modern installer such as uv or pip. The plain install pulls core dependencies and lets PyTorch resolve its default behaviour, which the README says usually works for CPU and standard CUDA setups.

bash
uv pip install anomalib

If you are on hardware other than CPU or standard CUDA, the README recommends naming a backend explicitly. The supported extras are cpu, cu126, cu130, rocm and xpu. The example below is the CUDA 13.0 variant.

bash
pip install "anomalib[cu130]"

Optional extras are separate and can be combined with a hardware extra. The README lists openvino for Intel optimization, clip for the winclip model, vlm for vision-language backends, and loggers for experiment tracking with wandb, comet and similar tools. A CPU-only setup with everything enabled looks like this.

bash
uv pip install "anomalib[full,cpu]"

After installation, the repository provides worked examples under examples/api, examples/cli, examples/configs and examples/notebooks. The README does not reproduce a full training command in the section shown, so the reliable first step is to read those example directories and run the CLI against one of the shipped configuration files. Expect the CLI help output to be generated from the model signatures, which is why jsonargparse and docstring_parser are direct dependencies.

The v2.6.2 change that can break existing data loaders

The most concrete limitation in the current release is an intentional API change. The v2.6.2 release notes state that Tabular.from_file() now only accepts csv, json and parquet, and that pickle and hdf are rejected because loading them can execute arbitrary code. The release notes tell users to load those formats themselves and pass a DataFrame to Tabular(...) instead. This is a security fix, and it is also a breaking change for any pipeline that relied on the old behaviour. There is no compatibility flag mentioned. If your training data sits in pickle or hdf files, the upgrade path is to convert or load those files in your own code before handing the frame to Anomalib. Beyond that, note that the project is visual-first: the README frames the goal as detecting and localizing anomalies in images or videos. Tabular support exists, but it is not the centre of the library, and the documentation's emphasis on benchmark datasets and OpenVINO export reflects that.

Anomalib compared with a general-purpose vision framework

The obvious alternative is to assemble the same algorithms yourself on top of PyTorch, or to use a broader vision framework where anomaly detection is one task among many. The difference is in what you inherit. A general framework gives you flexibility and a large model zoo, but you write the training loop, the scoring head, the threshold selection and the export pipeline. Anomalib gives you those pieces already wired, plus a CLI and configuration system that make runs reproducible across algorithms. The cost is the reverse: you accept Lightning and omegaconf as dependencies, and you work within the model interfaces the library defines. If you need a bespoke architecture with unusual loss terms, the Lightning base classes are a starting point rather than a constraint, but you will be reading library internals. If you need to compare five published methods on the same dataset next week, the library saves you that work entirely. That trade-off, not raw model quality, is the real reason to pick it.

Maintenance, releases and what the Apache-2.0 licence means here

The repository is not archived, and the last push was on 2026-09-21, one day before this writing. Three releases landed in the two months before that: lib/v2.6.0 on 2026-07-25, lib/v2.6.1 on 2026-09-04 and lib/v2.6.2 on 2026-09-11. The version is dynamic, generated by hatchling at build time, so the package version and the git tag are linked through the build. Python 3.10 or newer is required, and the dependency pins are tight in places: jsonargparse is capped below 4.47.0, and lightning is pinned to exclude 2.6.2 and 2.6.3, which pyproject.toml annotates as a malicious supply chain attack. That annotation is worth reading before you loosen any pin. The licence is Apache-2.0, which permits commercial use and modification and requires that you preserve notices and state changes; the repository also ships a third-party-programs.txt file, so downstream redistribution needs a look at the bundled components. This is a description of the licence text, not legal advice.

Editorial conclusion

Adopt Anomalib if you train visual anomaly detectors on normal-only image data and want a single CLI plus OpenVINO export path. Do not adopt it for tabular, time-series or heavily supervised defect classification, because the library is built around visual, largely unsupervised detection. Before committing, verify which optional extras your target model needs, and check the Tabular.from_file() restriction introduced in v2.6.2 against any existing pickle or hdf data-loading code.

Frequently asked questions

How do I install Anomalib?

The README recommends a virtual environment and installs from PyPI with uv pip install anomalib or pip install anomalib. For hardware other than CPU or standard CUDA, name a backend extra such as cu126, cu130, rocm or xpu, optionally combined with extras like openvino or full.

How do I use Anomalib to train a model?

Anomalib exposes both a Python API and a CLI for training, inference, benchmarking and hyperparameter optimization, configured through omegaconf and jsonargparse. The repository ships worked examples under examples/api, examples/cli, examples/configs and examples/notebooks to start from.

Can Anomalib run on Intel hardware?

Yes. The README states that the majority of models can be exported to OpenVINO Intermediate Representation for accelerated inference on Intel hardware, and the openvino extra installs the Intel OpenVINO optimization dependency. There is also an xpu extra for Intel GPU training.

Which file formats does Anomalib's Tabular.from_file() accept?

As of the v2.6.2 release, Tabular.from_file() only accepts csv, json and parquet. The release notes state that pickle and hdf are rejected because loading them can execute arbitrary code, and that users should load those formats themselves and pass a DataFrame to Tabular(...).

What Python version does Anomalib require?

The project metadata in pyproject.toml sets requires-python to >=3.10, and the classifiers list Python 3.10, 3.11 and 3.12. The README badges state Python 3.10 or newer, PyTorch 2.6 or newer, Lightning 2.2 or newer and OpenVINO 2024.0 or newer.

Official sources

  1. License: Apache-2.0
  2. open-edge-platform/anomalib on GitHub
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/open-edge-platform-anomalib.svg)](https://hysenlabs.com/projects/open-edge-platform-anomalib)