explaingit

open-edge-platform/anomalib

5,734PythonAudience · developerComplexity · 3/5Setup · easy

TLDR

Python library for detecting visual defects and anomalies in images without needing labeled defect examples. Bundles many published algorithms, trains on normal images, and flags anything that looks wrong, ideal for manufacturing quality inspection and similar tasks.

Mindmap

mindmap
  root((repo))
    Algorithms
      Many built-in models
      Easy comparison
      Standard datasets
    Training
      PyTorch backend
      Lightning framework
      Auto hyperparameter tuning
    Deployment
      OpenVINO export
      CLI tools
      Python API
    Hardware Support
      NVIDIA CUDA
      AMD ROCm
      Intel XPU
      CPU only
    Use Cases
      Manufacturing inspection
      Visual defect detection
      Video anomaly detection
    Extras
      Experiment tracking
      Jupyter notebooks
      Vision-language models
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Spot defective products on a manufacturing line by training only on images of good products

USE CASE 2

Flag unusual frames in video streams without manually labeling every possible fault type

USE CASE 3

Compare multiple anomaly detection algorithms on the same dataset to find the best fit

USE CASE 4

Export a trained defect-detection model for fast inference on Intel hardware

Tech stack

PythonPyTorchLightningOpenVINOpipuvCUDAROCm

Getting it running

Difficulty · easy Time to first run · 30min

Install via pip install anomalib. Choose an extras flag for your hardware: [gpu] for CUDA, [rocm] for AMD, or plain CPU. Optional extras for notebooks and experiment tracking available.

Open source project maintained by Intel's Open Edge Platform team. Check the repository for the specific license terms.

In plain English

Anomalib is a Python library for detecting things that look wrong or out of place in images and video. The core problem it solves is called anomaly detection: given a set of images of how something normally looks (say, a product on a manufacturing line), the library can train a model to flag images where something appears different or defective. This is done without needing labeled examples of every possible defect, which makes it useful when defects are rare or unpredictable. The library collects a large number of published anomaly detection algorithms in one place so that researchers and engineers can compare them against each other on standard datasets. It also provides the infrastructure to run training, make predictions on new images, and tune model settings automatically. The code is built on top of PyTorch and the Lightning training framework, which handle the underlying machine learning machinery. Once a model is trained, Anomalib can export it to a format compatible with Intel's OpenVINO toolkit, which speeds up inference on Intel CPUs and GPUs. There are also tools for deploying models directly from the command line or via a Python API, without writing much extra code. Installing the library is straightforward with pip or the uv package manager. Different installation options exist depending on your hardware: NVIDIA GPUs with CUDA, AMD GPUs with ROCm, Intel GPUs with XPU, or a plain CPU-only setup. Optional extras add support for experiment tracking, Jupyter notebooks, and vision-language model features. The project is maintained by the Open Edge Platform team and is actively updated with new algorithms. It is aimed at machine learning practitioners working on visual quality inspection, manufacturing, and similar tasks where spotting visual defects matters.

Copy-paste prompts

Prompt 1
I have a folder of normal product images. Using Anomalib, write me Python code to train an anomaly detection model on them and then run predictions on a new folder of test images.
Prompt 2
Using Anomalib's CLI, what command do I run to train the PatchCore algorithm on my custom image dataset and export the result to OpenVINO format?
Prompt 3
I want to compare three Anomalib algorithms on the MVTec dataset and print a table of their AUROC scores. Write the Python code to do this.
Prompt 4
I've trained an Anomalib model and want to deploy it in a simple Python script that takes an image path as input and prints whether it's normal or anomalous. Show me how.
Prompt 5
Explain the difference between the main anomaly detection algorithms available in Anomalib, PatchCore, FastFlow, and EfficientAD, in plain English so I can pick the right one for a manufacturing defect project.
Open on GitHub → Explain another repo

← open-edge-platform on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.