[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-71142":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":25,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":34,"readmeContent":35,"aiSummary":36,"trendingCount":16,"starSnapshotCount":16,"syncStatus":37,"lastSyncTime":38,"discoverSource":39},71142,"anomalib","open-edge-platform\u002Fanomalib","open-edge-platform","An anomaly detection library comprising state-of-the-art algorithms and features such as experiment management, hyper-parameter optimization, and edge inference.","https:\u002F\u002Fanomalib.readthedocs.io\u002Fen\u002Flatest\u002F",null,"Python",5828,938,45,63,0,12,40,112,36,114.92,"Apache License 2.0",false,"main",true,[27,28,29,30,31,32,33],"anomaly-detection","anomaly-localization","anomaly-segmentation","geti","neural-network-compression","openvino","unsupervised-learning","2026-06-12 04:00:59","\u003Cdiv align=\"center\">\n\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fopen-edge-platform\u002Fanomalib\u002Fmain\u002Fdocs\u002Fsource\u002F_static\u002Fimages\u002Flogos\u002Fanomalib-wide-blue.png\" width=\"600px\" alt=\"Anomalib Logo - A deep learning library for anomaly detection\">\n\n**A library for benchmarking, developing and deploying deep learning anomaly detection algorithms**\n\n---\n\n[Key Features](#key-features) •\n[Docs](https:\u002F\u002Fanomalib.readthedocs.io\u002Fen\u002Flatest\u002F) •\n[Notebooks](examples\u002Fnotebooks) •\n[License](LICENSE)\n\n[![python](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fpython-3.10%2B-green)]()\n[![pytorch](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fpytorch-2.6%2B-orange)]()\n[![lightning](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flightning-2.2%2B-blue)]()\n[![openvino](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fopenvino-2024.0%2B-purple)]()\n\n[![Pre-Merge Checks](https:\u002F\u002Fgithub.com\u002Fopen-edge-platform\u002Fanomalib\u002Factions\u002Fworkflows\u002Fpre_merge.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fopen-edge-platform\u002Fanomalib\u002Factions\u002Fworkflows\u002Fpre_merge.yml)\n[![codecov](https:\u002F\u002Fcodecov.io\u002Fgh\u002Fopen-edge-platform\u002Fanomalib\u002Fbranch\u002Fmain\u002Fgraph\u002Fbadge.svg?token=Z6A07N1BZK)](https:\u002F\u002Fcodecov.io\u002Fgh\u002Fopen-edge-platform\u002Fanomalib)\n[![Downloads](https:\u002F\u002Fstatic.pepy.tech\u002Fpersonalized-badge\u002Fanomalib?period=total&units=international_system&left_color=grey&right_color=green&left_text=PyPI%20Downloads)](https:\u002F\u002Fpepy.tech\u002Fproject\u002Fanomalib)\n[![snyk](https:\u002F\u002Fsnyk.io\u002Fadvisor\u002Fpython\u002Fanomalib\u002Fbadge.svg)](https:\u002F\u002Fsnyk.io\u002Fadvisor\u002Fpython\u002Fanomalib)\n[![OpenSSF Best Practices](https:\u002F\u002Fwww.bestpractices.dev\u002Fprojects\u002F8330\u002Fbadge)](https:\u002F\u002Fwww.bestpractices.dev\u002Fprojects\u002F8330)\n\n[![ReadTheDocs](https:\u002F\u002Freadthedocs.org\u002Fprojects\u002Fanomalib\u002Fbadge\u002F?version=latest)](https:\u002F\u002Fanomalib.readthedocs.io\u002Fen\u002Flatest\u002F?badge=latest)\n[![Anomalib - Gurubase docs](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FGurubase-Ask%20Anomalib%20Guru-006BFF)](https:\u002F\u002Fgurubase.io\u002Fg\u002Fanomalib)\n\n\u003Ca href=\"https:\u002F\u002Ftrendshift.io\u002Frepositories\u002F14514\" target=\"_blank\" rel=\"noopener noreferrer\">\u003Cimg src=\"https:\u002F\u002Ftrendshift.io\u002Fapi\u002Fbadge\u002Frepositories\u002F14514\" alt=\"open-edge-platform%2Fanomalib | Trendshift\" style=\"width: 250px; height: 55px;\" width=\"250\" height=\"55\"\u002F>\u003C\u002Fa>\n\n\u003C\u002Fdiv>\n\n---\n\n> 🌟 **Announcing v2.4.2 Release!** 🌟\n>\n> This patch release adds half-precision training for Dinomaly.\n>\n> Key Changes\n>\n> - Half precision training support for Dinomaly.\n>\n> We value your input! Please share feedback via [GitHub Issues](https:\u002F\u002Fgithub.com\u002Fopen-edge-platform\u002Fanomalib\u002Fissues) or our [Discussions](https:\u002F\u002Fgithub.com\u002Fopen-edge-platform\u002Fanomalib\u002Fdiscussions)\n\n# 👋 Introduction\n\nAnomalib is a deep learning library that aims to collect state-of-the-art anomaly detection algorithms for benchmarking on both public and private datasets. Anomalib provides several ready-to-use implementations of anomaly detection algorithms described in the recent literature, as well as a set of tools that facilitate the development and implementation of custom models. The library has a strong focus on visual anomaly detection, where the goal of the algorithm is to detect and\u002For localize anomalies within images or videos in a dataset. Anomalib is constantly updated with new algorithms and training\u002Finference extensions, so keep checking!\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fopen-edge-platform\u002Fanomalib\u002Fmain\u002Fdocs\u002Fsource\u002F_static\u002Fimages\u002Freadme.png\" width=\"1000\" alt=\"A prediction made by anomalib\">\n\u003C\u002Fp>\n\n## Key features\n\n- Simple and modular API and CLI for training, inference, benchmarking, and hyperparameter optimization.\n- The largest public collection of ready-to-use deep learning anomaly detection algorithms and benchmark datasets.\n- [**Lightning**](https:\u002F\u002Fwww.lightning.ai\u002F) based model implementations to reduce boilerplate code and limit the implementation efforts to the bare essentials.\n- The majority of models can be exported to [**OpenVINO**](https:\u002F\u002Fwww.intel.com\u002Fcontent\u002Fwww\u002Fus\u002Fen\u002Fdeveloper\u002Ftools\u002Fopenvino-toolkit\u002Foverview.html) Intermediate Representation (IR) for accelerated inference on Intel hardware.\n- A set of [inference tools](tools) for quick and easy deployment of the standard or custom anomaly detection models.\n\n# 📦 Installation\n\nAnomalib can be installed from PyPI. We recommend using a virtual environment and a modern package installer like `uv` or `pip`.\n\n## 🚀 Quick Install\n\nFor a standard installation, you can use `uv` or `pip`. This will install the latest version of Anomalib with its core dependencies. PyTorch will be installed based on its default behavior, which usually works for CPU and standard CUDA setups.\n\n```bash\n# With uv\nuv pip install anomalib\n\n# Or with pip\npip install anomalib\n```\n\nFor more control over the installation, such as specifying the PyTorch backend (e.g., XPU, CUDA and ROCm) or installing extra dependencies for specific models, see the advanced options below.\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>💡 Advanced Installation: Specify Hardware Backend\u003C\u002Fstrong>\u003C\u002Fsummary>\n\nTo ensure compatibility with your hardware, you can specify a backend during installation. This is the recommended approach for production environments and for hardware other than CPU or standard CUDA.\n\n**Using `uv`:**\n\n```bash\n# CPU support (default, works on all platforms)\nuv pip install \"anomalib[cpu]\"\n\n# CUDA 12.6 support (Linux\u002FWindows with NVIDIA GPU)\nuv pip install \"anomalib[cu126]\"\n\n# CUDA 13.0 support (Linux\u002FWindows with NVIDIA GPU)\nuv pip install \"anomalib[cu130]\"\n\n# CUDA 11.8 support (Linux\u002FWindows with NVIDIA GPU)\nuv pip install \"anomalib[cu118]\"\n\n# ROCm support (Linux with AMD GPU)\nuv pip install \"anomalib[rocm]\"\n\n# Intel XPU support (Linux with Intel GPU)\nuv pip install \"anomalib[xpu]\"\n```\n\n**Using `pip`:**\nThe same extras can be used with `pip`:\n\n```bash\npip install \"anomalib[cu130]\"\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>🧩 Advanced Installation: Additional Dependencies\u003C\u002Fstrong>\u003C\u002Fsummary>\n\nAnomalib includes most dependencies by default. For specialized features, you may need additional optional dependencies. Remember to include your hardware-specific extra.\n\n```bash\n# Example: Install with OpenVINO support and CUDA 13.0\nuv pip install \"anomalib[openvino,cu130]\"\n\n# Example: Install all optional dependencies for a CPU-only setup\nuv pip install \"anomalib[full,cpu]\"\n```\n\nHere is a list of available optional dependency groups:\n\n| Extra         | Description                              | Purpose                                     |\n| :------------ | :--------------------------------------- | :------------------------------------------ |\n| `[openvino]`  | Intel OpenVINO optimization              | For accelerated inference on Intel hardware |\n| `[clip]`      | Vision-language models                   | `winclip`                                   |\n| `[vlm]`       | Vision-language model backends           | Advanced VLM features                       |\n| `[loggers]`   | Experiment tracking (wandb, comet, etc.) | For experiment management                   |\n| `[notebooks]` | Jupyter notebook support                 | For running example notebooks               |\n| `[full]`      | All optional dependencies                | All optional features                       |\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>🔧 Advanced Installation: Install from Source\u003C\u002Fstrong>\u003C\u002Fsummary>\n\nFor contributing to `anomalib` or using a development version, you can install from source.\n\n**Using `uv`:**\nThis is the recommended method for developers as it uses the project's lock file for reproducible environments.\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fopen-edge-platform\u002Fanomalib.git\ncd anomalib\n\n# Create the virtual environment\nuv venv\n\n# Sync with the lockfile for a specific backend (e.g., CPU)\nuv sync --extra cpu\n\n# Or for a different backend like CUDA 13.0\nuv sync --extra cu130\n\n# To set up a full development environment\nuv sync --extra dev --extra cpu\n```\n\n**Using `pip`:**\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fopen-edge-platform\u002Fanomalib.git\ncd anomalib\n\n# Install in editable mode with a specific backend\npip install -e \".[cpu]\"\n\n# Install with development dependencies\npip install -e \".[dev,cpu]\"\n```\n\n\u003C\u002Fdetails>\n\n# 🧠 Training\n\nAnomalib supports both API and CLI-based training approaches:\n\n## 🔌 Python API\n\n```python\nfrom anomalib.data import MVTecAD\nfrom anomalib.models import Patchcore\nfrom anomalib.engine import Engine\n\n# Initialize components\ndatamodule = MVTecAD()\nmodel = Patchcore()\nengine = Engine()\n\n# Train the model\nengine.fit(datamodule=datamodule, model=model)\n```\n\n## ⌨️ Command Line\n\n```bash\n# Train with default settings\nanomalib train --model Patchcore --data anomalib.data.MVTecAD\n\n# Train with custom category\nanomalib train --model Patchcore --data anomalib.data.MVTecAD --data.category transistor\n\n# Train with config file\nanomalib train --config path\u002Fto\u002Fconfig.yaml\n```\n\n# 🤖 Inference\n\nAnomalib provides multiple inference options including Torch, Lightning, Gradio, and OpenVINO. Here's how to get started:\n\n## 🔌 Python API\n\n```python\n# Load model and make predictions\npredictions = engine.predict(\n    datamodule=datamodule,\n    model=model,\n    ckpt_path=\"path\u002Fto\u002Fcheckpoint.ckpt\",\n)\n```\n\n## ⌨️ Command Line\n\n```bash\n# Basic prediction\nanomalib predict --model anomalib.models.Patchcore \\\n                 --data anomalib.data.MVTecAD \\\n                 --ckpt_path path\u002Fto\u002Fmodel.ckpt\n\n# Prediction with results\nanomalib predict --model anomalib.models.Patchcore \\\n                 --data anomalib.data.MVTecAD \\\n                 --ckpt_path path\u002Fto\u002Fmodel.ckpt \\\n                 --return_predictions\n```\n\n> 📘 **Note:** For advanced inference options including Gradio and OpenVINO, check our [Inference Documentation](https:\u002F\u002Fanomalib.readthedocs.io).\n\n# Training on Intel GPUs\n\n> [!Note]\n> Currently, only single GPU training is supported on Intel GPUs.\n> These commands were tested on Arc 750 and Arc 770.\n\nEnsure that you have PyTorch with XPU support installed. For more information, please refer to the [PyTorch XPU documentation](https:\u002F\u002Fpytorch.org\u002Fdocs\u002Fstable\u002Fnotes\u002Fget_start_xpu.html)\n\n## 🔌 API\n\n```python\nfrom anomalib.data import MVTecAD\nfrom anomalib.engine import Engine, SingleXPUStrategy, XPUAccelerator\nfrom anomalib.models import Stfpm\n\nengine = Engine(\n    strategy=SingleXPUStrategy(),\n    accelerator=XPUAccelerator(),\n)\nengine.train(Stfpm(), datamodule=MVTecAD())\n```\n\n## ⌨️ CLI\n\n```bash\nanomalib train --model Padim --data MVTecAD --trainer.accelerator xpu --trainer.strategy xpu_single\n```\n\n# ⚙️ Hyperparameter Optimization\n\nAnomalib supports hyperparameter optimization (HPO) using [Weights & Biases](https:\u002F\u002Fwandb.ai\u002F) and [Comet.ml](https:\u002F\u002Fwww.comet.com\u002F).\n\n```bash\n# Run HPO with Weights & Biases\nanomalib hpo --backend WANDB --sweep_config tools\u002Fhpo\u002Fconfigs\u002Fwandb.yaml\n```\n\n> 📘 **Note:** For detailed HPO configuration, check our [HPO Documentation](https:\u002F\u002Fopen-edge-platform.github.io\u002Fanomalib\u002Ftutorials\u002Fhyperparameter_optimization.html).\n\n# 🧪 Experiment Management\n\nTrack your experiments with popular logging platforms through [PyTorch Lightning loggers](https:\u002F\u002Fpytorch-lightning.readthedocs.io\u002Fen\u002Fstable\u002Fextensions\u002Flogging.html):\n\n- 📊 Weights & Biases\n- 📈 Comet.ml\n- 📉 TensorBoard\n\nEnable logging in your config file to track:\n\n- Hyperparameters\n- Metrics\n- Model graphs\n- Test predictions\n\n> 📘 **Note:** For logging setup, see our [Logging Documentation](https:\u002F\u002Fopen-edge-platform.github.io\u002Fanomalib\u002Ftutorials\u002Flogging.html).\n\n# 📊 Benchmarking\n\nEvaluate and compare model performance across different datasets:\n\n```bash\n# Run benchmarking with default configuration\nanomalib benchmark --config tools\u002Fexperimental\u002Fbenchmarking\u002Fsample.yaml\n```\n\n> 💡 **Tip:** Check individual model performance in their respective README files:\n>\n> - [Patchcore Results](src\u002Fanomalib\u002Fmodels\u002Fimage\u002Fpatchcore\u002FREADME.md#mvtec-ad-dataset)\n> - [Other Models](src\u002Fanomalib\u002Fmodels\u002F)\n\n# Anomalib Studio\n\nAnomalib Studio is a low\u002Fno-code web application that allows users to train and deploy anomaly detection models. It enables users to leverage Anomalib's features in their operational environment. Users can connect USB and IP cameras, or use a folder of images, as input to the training pipeline. The tool allows direct output to their industrial pipelines through ROS messages, MQTT, etc.\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"docs\u002Fsource\u002F_static\u002Fimages\u002Fanomalib_studio.png\" alt=\"Anomalib Studio\" \u002F>\n\u003C\u002Fp>\n\nThe source code for Anomalib Studio lives in the [application](application) folder.\n\nAnomalib Studio is available as two distributions:\n\n1. As a [docker container](application\u002Fdocker)\n2. As a [standalone application](application\u002Fui)\n\nFor more information on each, refer to the respective README files.\n\n## Get started with development build\n\n### Setup Backend Dependencies\n\n> [!NOTE]\n> This assumes that you have `uv` installed. If not, please refer to the [installation guide](https:\u002F\u002Fdocs.astral.sh\u002Fuv\u002Fgetting-started\u002Finstallation\u002F).\n\n```bash\ncd application\u002Fbackend\nuv sync --extra xpu # or uv sync --extra cu130 for CUDA 13.0, uv sync --extra cpu for CPU\n```\n\n### Setup Frontend Dependencies\n\n```bash\ncd application\u002Fui\nnpm install\n```\n\n### Run the application\n\n> [!IMPORTANT]\n> Both backend and frontend dependencies should be installed before running the application.\n\nRun the backend server:\n\n```bash\ncd application\u002Fbackend\n.\u002Frun.sh\n```\n\nRun the frontend server:\n\n```bash\ncd application\u002Fui\nnpm run start\n```\n\nNavigate to [http:\u002F\u002Flocalhost:3000](http:\u002F\u002Flocalhost:3000) to see the application.\n\n# ✍️ Reference\n\nIf you find Anomalib useful in your research or work, please cite:\n\n```tex\n@inproceedings{akcay2022anomalib,\n  title={Anomalib: A deep learning library for anomaly detection},\n  author={Akcay, Samet and Ameln, Dick and Vaidya, Ashwin and Lakshmanan, Barath and Ahuja, Nilesh and Genc, Utku},\n  booktitle={2022 IEEE International Conference on Image Processing (ICIP)},\n  pages={1706--1710},\n  year={2022},\n  organization={IEEE}\n}\n```\n\n# 👥 Contributing\n\nWe welcome contributions! Check out our [Contributing Guide](CONTRIBUTING.md) to get started.\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fopen-edge-platform\u002Fanomalib\u002Fgraphs\u002Fcontributors\">\n    \u003Cimg src=\"https:\u002F\u002Fcontrib.rocks\u002Fimage?repo=open-edge-platform\u002Fanomalib\" alt=\"Contributors to open-edge-platform\u002Fanomalib\" \u002F>\n  \u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Cb>Thank you to all our contributors!\u003C\u002Fb>\n\u003C\u002Fp>\n","Anomalib 是一个专注于异常检测的深度学习库，集成了多种前沿算法，并提供了实验管理、超参数优化和边缘推理等功能。该项目使用 Python 编写，支持 PyTorch 和 OpenVINO 等框架，具备半精度训练等技术特性，适用于需要对图像或视频进行异常检测与定位的应用场景，如工业质量控制、安全监控等。此外，Anomalib 还为开发者提供了详尽的文档和示例代码，便于快速上手和模型定制。",2,"2026-06-11 03:36:05","high_star"]