open-edge-platform/anomalib

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

What it solves

Anomalib tackles the challenge of detecting and localizing anomalies (unusual patterns) in visual data, such as images and videos. Instead of building anomaly detection models from scratch, developers and researchers get a single library with many state-of-the-art algorithms already implemented, plus tools to benchmark them on public or private datasets, train custom models, and deploy them efficiently.

How it works

Anomalib is built on PyTorch and PyTorch Lightning, which reduces boilerplate code and lets users focus on the essential parts of their models. It offers both a Python API and a command-line interface (CLI) for training, inference, and benchmarking. Users can pick from a large collection of pre-built models (like Patchcore, Padim, STFPM, and newer ones such as MH-PatchCore, RAD, and FoundAD) and run them on popular datasets like MVTec AD. Models can be exported to OpenVINO Intermediate Representation for accelerated inference on Intel hardware. The library also includes a low/no-code web application called Anomalib Studio (still in pre-release) that lets users train and deploy models using camera streams or image folders, and output results to industrial pipelines via ROS or MQTT.

Who it's for

Anomalib is aimed at deep learning practitioners, researchers, and engineers working on visual anomaly detection. It's useful for those who want to quickly benchmark existing algorithms, develop custom models, or deploy anomaly detection in real-world industrial environments. The CLI and API make it accessible both for scripting and for integration into larger systems, while Anomalib Studio targets users who prefer a graphical interface without coding.

Highlights

  • Largest public collection of ready-to-use deep learning anomaly detection algorithms and benchmark datasets.
  • Simple and modular API and CLI for training, inference, and benchmarking.
  • Lightning-based implementations to minimize boilerplate code.
  • Export to OpenVINO for accelerated inference on Intel hardware.
  • Inference tools for standard or custom models, including Torch, Lightning, Gradio, and OpenVINO options.
  • The v2.7.0 release adds new models (MH-PatchCore, RAD, FoundAD) and hardened checkpoint/path handling.
  • Anomalib Studio provides a low/no-code web app for training and deployment with camera or image inputs.

Related

  • Project
  • Project
  • Project
  • Project
  • Project