anomalib
Use anomalib for anomaly-detection install, data/model selection, training and evaluation, deployment and inference, and benchmark pipelines.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- anomalib
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Use anomalib for anomaly-detection install, data/model selection, training and evaluation, deployment and inference, and benchmark pipelines.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/repo-provenance.md1.9 KB
- 参考文档references/repo-routing-metadata.json335 B
- 参考文档references/troubleshooting.md2.7 KB
- 脚本scripts/check_import.py1.1 KB
03 SKILL.md 正文
Anomalib Repo Skill
Use this repo skill when the user asks about the anomalib Python package, anomaly-detection data modules, model selection, training and evaluation, export and inference, or benchmark pipelines.
This skill tree is self-contained. Future agents should use the bundled references and scripts inside this directory, not the original source checkout.
Repo at a glance
src/anomalib/: public package source for data, models, engine, deploy, and pipelines.docs/source/...: user-facing guides, API references, and troubleshooting notes distilled into bundled references.examples/api/andexamples/cli/: runnable workflow examples that informed the bundled recipes and scripts.tests/: behavior evidence for defaults, errors, and edge cases.tools/: repo-owned helpers and advanced entry points that were copied, adapted, or referenced where safe.
Quick start
- If you only need to confirm the package imports, run
scripts/check_import.py. - If installation, optional extras, or CLI flags are the problem, start with
sub-skills/install-and-cli/SKILL.md. - If the request is about data layout or choosing a model, route to
sub-skills/data-and-models/SKILL.md. - If the request is about fit/train/test/validate, metrics, callbacks, logging, preprocessing, or visualization, route to
sub-skills/training-and-evaluation/SKILL.md. - If the request is about export,
Engine.predict, or runtime inferencers, route tosub-skills/deployment-and-inference/SKILL.md. - If the request is about benchmark configs or tiled ensemble workflows, route to
sub-skills/pipelines-and-benchmarks/SKILL.md.
Route by task
| User request | Go to |
|---|---|
| "How do I install anomalib or fix a CLI/help problem?" | sub-skills/install-and-cli/ |
| "Which datamodule or model should I use?" | sub-skills/data-and-models/ |
| "How do training, validation, metrics, or callbacks work?" | sub-skills/training-and-evaluation/ |
| "How do I export or run inference from a checkpoint?" | sub-skills/deployment-and-inference/ |
| "How do I run a benchmark or tiled ensemble config?" | sub-skills/pipelines-and-benchmarks/ |
How to choose quickly
- Start with the smallest workflow that matches the user's current step.
- If the user is blocked by installation or CLI syntax, resolve that first through install-and-cli.
- If the user already has data and a model choice, use data-and-models before any training step.
- If the user has a checkpoint and wants predictions or deployment artifacts, use deployment-and-inference.
- If the user needs benchmark-scale orchestration, use pipelines-and-benchmarks and keep execution planning separate from model or data selection.
Shared references
references/repo-provenance.mdrecords the source snapshot, package version, and evidence footprint.references/repo-routing-metadata.jsonfeeds the managed repo-skill router during import.references/troubleshooting.mdcovers package-wide install, import, and routing failures.scripts/check_import.pyis a minimal package-import smoke check.
Operating notes
- Prefer the most specific sub-skill instead of staying at the root.
- Keep install and CLI issues separate from model or pipeline questions.
- Keep deployment and inference separate from training and evaluation.
- Keep benchmark orchestration separate from engine internals unless the user explicitly asks for both.
- If a user asks for a broad end-to-end task, use the sub-skill that owns the current bottleneck, then cross-link to the next step.
Self-check
A healthy runtime installation should at least be able to import anomalib and report its version. Use the bundled import check first, then move into the relevant sub-skill for deeper guidance.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).