Download Latest Version Release Anomalib Library v2.7.0 source code.zip (23.5 MB) Google Add to Preferred Sources
Home / lib_v2.7.0
Name Modified Size InfoDownloads / Week
Parent folder
anomalib-2.7.0-py3-none-any.whl 2026-10-06 1.1 MB
anomalib-2.7.0-py3-none-any.whl.publish.attestation 2026-10-06 9.8 kB
anomalib-2.7.0.tar.gz 2026-10-06 767.3 kB
anomalib-2.7.0.tar.gz.publish.attestation 2026-10-06 9.8 kB
README.md 2026-10-06 12.9 kB
Release Anomalib Library v2.7.0 source code.tar.gz 2026-10-06 22.4 MB
Release Anomalib Library v2.7.0 source code.zip 2026-10-06 23.5 MB
Totals: 7 Items   47.8 MB 0

What's Changed

Added

Removed

  • ⚠️ breaking: Remove APIs scheduled for 2.7.0 — legacy ONNX exporter (dynamo=False; dynamo/onnxscript via anomalib[openvino] now required), restore_frozen_encoder_weights / pre-timm ViT checkpoint migration (retrain or re-export), and raise minimum PyTorch to >=2.10.0 (torchvision>=0.25.0 for cpu/cu/xpu; ROCm remains torch>=2.13.0) by @ashwinvaidya17 in https://github.com/open-edge-platform/anomalib/pull/3826

Changed

Fixed

New Contributors

Full Changelog: https://github.com/open-edge-platform/anomalib/compare/lib/v2.6.2...lib/v2.7.0


API Changes

v2.7.0 removes the legacy ONNX exporter and pre-timm ViT checkpoint migration, raises the minimum PyTorch version, and changes several security-sensitive defaults. New models: MHPatchcore, Rad, and FoundAD.

At a glance

Kind Change What to do
Removed Legacy ONNX exporter (dynamo=False) Use dynamo=True (default); install anomalib[openvino] for onnxscript
Removed restore_frozen_encoder_weights / pre-timm ViT checkpoint loading Retrain or re-export under a current release
Removed PyTorch <2.10 on cpu/cu/xpu extras Upgrade to torch>=2.10.0 (ROCm: >=2.13.0)
Changed Checkpoint load defaults to weights_only=True Migrate old checkpoints once with weights_only=False, or pass custom components into load_from_checkpoint
Changed Dataset root path hardening Ensure metadata paths resolve under root
Changed AUPR scoring Expect step-wise average precision (edge-case scores may change)
Added MHPatchcore from anomalib.models import MHPatchcore
Added Rad from anomalib.models import Rad
Added FoundAD from anomalib.models import FoundAD

Removed

Legacy ONNX exporter (dynamo=False)

  • Module: anomalib.models.components.base.export_mixin
  • Deprecated since: v2.5.1
  • Why: Torch’s dynamo-based exporter is required; the legacy path was removed in v2.7.0.

    :::python

    Before (no longer works)

    model.to_onnx(export_root="./exports", dynamo=False)

    After (default)

    pip install "anomalib[openvino]" # provides onnxscript

    model.to_onnx(export_root="./exports") # dynamo=True

    or explicitly:

    model.to_onnx(export_root="./exports", dynamo=True)

Pre-timm ViT checkpoint migration (restore_frozen_encoder_weights)

  • Module: previously anomalib.models.components.base.restore_frozen_encoder_weights
  • Deprecated since: v2.5.0
  • Why: Loading Vision Transformer checkpoints trained before the timm-encoder migration is no longer supported.

    :::python

    Before: dinomaly / inp_former / anomaly_dino / patchflow / l2bt

    automatically rewrote legacy encoder keys in on_load_checkpoint

    After: retrain, or export/re-save a checkpoint under anomalib >= 2.5

    with the timm-based encoder layout, then load that checkpoint

Minimum PyTorch >=2.10.0

  • Module: install extras (cpu, cu126, cu130, xpu); ROCm remains torch>=2.13.0
  • Why: Announced with the ONNX dynamo deprecation; required for the dynamo exporter path.

    :::bash

    Before

    pip install "anomalib[cpu]" # allowed torch>=2.6

    After

    pip install "anomalib[cpu]" # requires torch>=2.10, torchvision>=0.25

    ROCm

    pip install "anomalib[rocm]" # requires torch>=2.13

Changed

Checkpoint loading defaults to weights_only=True

  • Impact: Untrusted .ckpt files can no longer execute arbitrary code via pickle. Checkpoints that pickled live component objects in hyper_parameters fail to load until migrated. Custom PreProcessor subclasses and non-default Evaluator / Visualizer instances are not reconstructed automatically.
  • PR: [#3801]

    :::python

    Migrate an old checkpoint once (trusted file only), then re-save

    model = MyModel.load_from_checkpoint("old.ckpt", weights_only=False)

    ... or pass custom components explicitly:

    model = MyModel.load_from_checkpoint( "model.ckpt", pre_processor=MyPreProcessor(), evaluator=my_evaluator, visualizer=my_visualizer, )

Dataset root path hardening

  • Impact: When a dataset root is set, metadata path columns (Tabular and similar loaders) must resolve under that root; absolute paths outside root are rejected.
  • PR: [#3794], [#3796]

    :::python

    Paths in metadata must stay under root

    datamodule = Tabular( name="custom", samples=samples, # path columns relative to / under root root="./datasets/custom", )

AUPR uses step-wise average precision

  • Impact: Constant, all-zero, and inverted detectors score at the anomaly rate instead of a misleading mid-range value (previously ~0.525 in some cases).
  • PR: [#3797]

Added

MHPatchcore

  • Import: from anomalib.models import MHPatchcore
  • PR: [#3809]

    :::python from anomalib.data import MVTecAD from anomalib.engine import Engine from anomalib.models import MHPatchcore

    datamodule = MVTecAD() model = MHPatchcore() engine = Engine() engine.fit(model=model, datamodule=datamodule)

Rad

  • Import: from anomalib.models import Rad
  • PR: [#3721]

    :::python from anomalib.data import MVTecAD from anomalib.engine import Engine from anomalib.models import Rad

    datamodule = MVTecAD() model = Rad() engine = Engine() engine.fit(model=model, datamodule=datamodule)

FoundAD

  • Import: from anomalib.models import FoundAD
  • PR: [#3793]

    :::python from anomalib.data import MVTecAD from anomalib.engine import Engine from anomalib.models import FoundAD

    datamodule = MVTecAD() model = FoundAD() engine = Engine() engine.fit(model=model, datamodule=datamodule)

What's Changed

New Contributors

Full Changelog: https://github.com/open-edge-platform/anomalib/compare/lib/v2.6.2...lib/v2.7.0

Source: README.md, updated 2026-10-06