Skip to main content

AnomaVision

AnomaVision banner

Simple visual anomaly detection from normal images.

AnomaVision is a production-oriented computer vision toolkit for detecting defects and unusual patterns from normal images.

Supported methods:

  • PaDiM
  • PatchCore
  • EfficientAD

It supports training, evaluation, threshold calibration, ONNX/OpenVINO/TensorRT export where supported, KV260/XModel deployment, production data-drift monitoring, and non-invasive deployment validation.

🚀 Quick start

📦 Install

git clone https://github.com/DeepKnowledge1/AnomaVision.git
cd AnomaVision
uv venv --python 3.11 .venv
source .venv/bin/activate        # Windows: .venv\\Scripts\\Activate.ps1
uv sync --extra cpu

🧠 Train

anomavision train --config config.yml

🔍 Detect

anomavision detect --config config.yml --img_path ./dataset/bottle/test

📤 Export

anomavision export --config config.yml --format onnx

🛡️ Deployment validation

Validate exported models before deployment without changing the anomaly-detection algorithm.

It checks model integrity, inference, performance, backend compatibility, and output consistency against a reference model.

anomavision validate `
  --model model.onnx `
  --reference-model model.pt `
  --config config.yml

🛡️ Deployment validation

Before moving an exported model into production, AnomaVision can validate the deployment artifact without changing the underlying anomaly-detection algorithm.

It checks model integrity, inference, performance, supported backend availability, and—when a reference model is supplied—output consistency.

Quick example

anomavision validate `
  --model distributions\\padim\\bottle\\anomav_exp\\model.onnx `
  --config config.yml `
  --runs 20

Typical output includes:

AnomaVision Deployment Validation
────────────────────────────────────
Model: distributions\padim\bottle\anomav_exp\model.onnx
✓ File Exists
✓ Onnx Valid
✓ Onnxruntime Inference
✓ Static Input Shape
Latency: 11.020 ms
FPS:     90.75
....

Supported deployment artifacts include PyTorch, TorchScript, ONNX, TensorRT, OpenVINO, Hailo HEF, and Vitis AI/KV260 XModel.

Note: backend availability means the required runtime components are installed. It does not by itself prove that a specific model has been tested on physical target hardware.

See the Deployment Validation guide for all options, consistency validation, JSON output, backend details, and recommended production usage.

📡 Production data drift

Production data-drift monitoring helps detect changes in the data seen by an anomaly detector after deployment.

It compares production representations against a trusted normal reference population using a rolling window. It can report metrics such as PSI, mean shift, standard-deviation shift, cosine shift, and drift score, with the result available through a dashboard and JSON status file.

The monitor is an observer only: it does not change anomaly scores or localization. Drift is an early-warning signal that should be investigated for causes such as lighting, camera position, preprocessing, or product changes.

Quick example

anomavision detect `
  --config config.yml `
  --model model.onnx `
  --enable-drift-monitoring `
  --drift-reference .\\drift\\reference_embeddings.npy

See the Production Data Drift guide for reference generation, metrics, dashboard, configuration, and troubleshooting.


📊 Benchmarks

AnomaVision includes a reproducible benchmark workflow for comparing anomaly-detection performance and runtime characteristics.

The benchmark reports Image AUROC, Pixel AUROC, latency, P95 latency, FPS, model/artifact size, and memory usage. The current comparison script uses a shared evaluation contract so results can be reproduced consistently.

Quick example

Run a single class:

python scripts\\benchmarks\\compare_with_anomalib.py `
  --dataset_path D:\\01-DATA `
  --class_name bottle `
  --algorithms padim `
  --device cpu

Run all available MVTec classes:

python scripts/benchmarks/compare_with_anomalib.py `
  --dataset_path D:/01-DATA/VisA_pytorch `
  --all_classes `
  --algorithms padim `
  --device cpu

With --all_classes, the script automatically discovers supported MVTec class directories present under the dataset path and runs the same AnomaVision-vs-Anomalib comparison for each available class. --class_name and --all_classes are mutually exclusive. Results are written separately under benchmark_results/<algorithm>/<class_name>/.

Historical benchmark results are available for MVTec AD and VisA, including per-class results and visual comparisons. These results are retained for reference; the corrected benchmark should be rerun before making current performance claims.

See the Benchmark guide for the methodology, commands, metrics, and detailed results.


⚡ KV260 support

AnomaVision supports a Vitis AI workflow for PaDiM and PatchCore on the AMD/Xilinx Kria KV260. XModel compilation has been validated in the Vitis AI environment; final on-device validation requires the physical hardware.

📚 Documentation

Topic Guide
Quick start docs/quickstart.md
Installation docs/installation.md
CLI / configuration docs/cli.md, docs/config.md
Python API docs/api.md
Deployment validation docs/deployment_validation.md
Production data drift docs/anomaly_detection_production_data_drift.md
KV260 / XModel docs/kv260_xmodel.md
Production deployment docs/production_deployment.md
Benchmarks docs/benchmark.md
Troubleshooting docs/troubleshooting.md

📄 License

AnomaVision is released under the MIT License. See LICENSE.

Metadata

Release files for anomavision 3.6.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for anomavision 3.6.2
File Size Uploaded
anomavision-3.6.2.tar.gz 8.3 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for anomavision 3.6.2
File Interpreter ABI Platform
anomavision-3.6.2-py3-none-any.whl Python 3 none any Details

Total release size: 8.4 MB

Release files / anomavision-3.6.2.tar.gz

Download URL anomavision-3.6.2.tar.gz
Size 8.3 MB
Tags Source
SHA-256 checksum
How to use checksums
833e55e31dd96947d6b5429f5a0fc9b1c14276cb161376d5f802aedff9131e4e
BLAKE2b-256 checksum
How to use checksums
4d4e370b86761a735d8d0531abf290bdace752a2e9d3401af3b8d53b8fc513c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.

Transparency log

Release files / anomavision-3.6.2-py3-none-any.whl

Download URL anomavision-3.6.2-py3-none-any.whl
Size 147.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
505c18a42fd34d62c3a46b962c319e8e83a67f4436d961d013bf8ce1e49aa08d
BLAKE2b-256 checksum
How to use checksums
89b6c39eb045d5774b4b667f6325f42a9b8a900e21ab1cc4c8df99a864b45160
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

3.6.2 This release

2 release files

3.6.1

2 release files

3.6.0

2 release files

3.5.1

2 release files

3.5.0

2 release files

3.4.0

2 release files

3.3.3

2 release files

3.3.1

2 release files

3.2.2

2 release files

3.2.1

2 release files

3.2.0

2 release files

3.1.0

2 release files

3.0.27

2 release files

3.0.12

2 release files

3.0.10

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page