my_anomalib-1.2.0
corrected anomalib version 1.2.0
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.9%) to scientific vocabulary
Repository
corrected anomalib version 1.2.0
Basic Info
- Host: GitHub
- Owner: unaxetxebe49
- License: apache-2.0
- Language: Python
- Default Branch: main
- Size: 14.9 MB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 3
- Releases: 0
Metadata Files
README.md
**A library for benchmarking, developing and deploying deep learning anomaly detection algorithms**
---
[Key Features](#key-features)
[Docs](https://anomalib.readthedocs.io/en/latest/)
[Notebooks](notebooks)
[License](LICENSE)
[]()
[]()
[]()
[](https://github.com/openvinotoolkit/anomalib/actions/workflows/pre_merge.yml)
[](https://anomalib.readthedocs.io/en/latest/?badge=latest)
[](https://codecov.io/gh/openvinotoolkit/anomalib)
[](https://pepy.tech/project/anomalib)
[](https://discord.com/channels/1230798452577800237)
Introduction
Anomalib 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/or localize anomalies within images or videos in a dataset. Anomalib is constantly updated with new algorithms and training/inference extensions, so keep checking!
Key features
- Simple and modular API and CLI for training, inference, benchmarking, and hyperparameter optimization.
- The largest public collection of ready-to-use deep learning anomaly detection algorithms and benchmark datasets.
- Lightning based model implementations to reduce boilerplate code and limit the implementation efforts to the bare essentials.
- The majority of models can be exported to OpenVINO Intermediate Representation (IR) for accelerated inference on Intel hardware.
- A set of inference tools for quick and easy deployment of the standard or custom anomaly detection models.
Installation
Anomalib provides two ways to install the library. The first is through PyPI, and the second is through a local installation. PyPI installation is recommended if you want to use the library without making any changes to the source code. If you want to make changes to the library, then a local installation is recommended.
Install from PyPI
Installing the library with pip is the easiest way to get started with anomalib. ```bash pip install anomalib ``` This will install Anomalib CLI using the [dependencies](/pyproject.toml) in the `pyproject.toml` file. Anomalib CLI is a command line interface for training, inference, benchmarking, and hyperparameter optimization. If you want to use the library as a Python package, you can install the library with the following command: ```bash # Get help for the installation arguments anomalib install -h # Install the full package anomalib install # Install with verbose output anomalib install -v # Install the core package option only to train and evaluate models via Torch and Lightning anomalib install --option core # Install with OpenVINO option only. This is useful for edge deployment as the wheel size is smaller. anomalib install --option openvino ```Install from source
To install from source, you need to clone the repository and install the library using pip via editable mode. ```bash # Use of virtual environment is highly recommended # Using conda yes | conda create -n anomalib_env python=3.10 conda activate anomalib_env # Or using your favorite virtual environment # ... # Clone the repository and install in editable mode git clone https://github.com/openvinotoolkit/anomalib.git cd anomalib pip install -e . ``` This will install Anomalib CLI using the [dependencies](/pyproject.toml) in the `pyproject.toml` file. Anomalib CLI is a command line interface for training, inference, benchmarking, and hyperparameter optimization. If you want to use the library as a Python package, you can install the library with the following command: ```bash # Get help for the installation arguments anomalib install -h # Install the full package anomalib install # Install with verbose output anomalib install -v # Install the core package option only to train and evaluate models via Torch and Lightning anomalib install --option core # Install with OpenVINO option only. This is useful for edge deployment as the wheel size is smaller. anomalib install --option openvino ```Training
Anomalib supports both API and CLI-based training. The API is more flexible and allows for more customization, while the CLI training utilizes command line interfaces, and might be easier for those who would like to use anomalib off-the-shelf.
Training via API
```python # Import the required modules from anomalib.data import MVTec from anomalib.models import Patchcore from anomalib.engine import Engine # Initialize the datamodule, model and engine datamodule = MVTec() model = Patchcore() engine = Engine() # Train the model engine.fit(datamodule=datamodule, model=model) ```Training via CLI
```bash # Get help about the training arguments, run: anomalib train -h # Train by using the default values. anomalib train --model Patchcore --data anomalib.data.MVTec # Train by overriding arguments. anomalib train --model Patchcore --data anomalib.data.MVTec --data.category transistor #Train by using a config file. anomalib train --configInference
Anomalib includes multiple inferencing scripts, including Torch, Lightning, Gradio, and OpenVINO inferencers to perform inference using the trained/exported model. Here we show an inference example using the Lightning inferencer. For other inferencers, please refer to the Inference Documentation.
Inference via API
The following example demonstrates how to perform Lightning inference by loading a model from a checkpoint file. ```python # Assuming the datamodule, model and engine is initialized from the previous step, # a prediction via a checkpoint file can be performed as follows: predictions = engine.predict( datamodule=datamodule, model=model, ckpt_path="path/to/checkpoint.ckpt", ) ```Inference via CLI
```bash # To get help about the arguments, run: anomalib predict -h # Predict by using the default values. anomalib predict --model anomalib.models.Patchcore \ --data anomalib.data.MVTec \ --ckpt_pathHyperparameter Optimization
Anomalib supports hyperparameter optimization (HPO) using wandb and comet.ml. For more details refer the HPO Documentation
HPO via API
```python # To be enabled in v1.1 ```HPO via CLI
The following example demonstrates how to perform HPO for the Patchcore model. ```bash anomalib hpo --backend WANDB --sweep_config tools/hpo/configs/wandb.yaml ```Experiment Management
Anomalib is integrated with various libraries for experiment tracking such as Comet, tensorboard, and wandb through pytorch lighting loggers. For more information, refer to the Logging Documentation
Experiment Management via API
```python # To be enabled in v1.1 ```Experiment Management via CLI
Below is an example of how to enable logging for hyper-parameters, metrics, model graphs, and predictions on images in the test data-set. You first need to modify the `config.yaml` file to enable logging. The following example shows how to enable logging: ```yaml # Place the experiment management config here. ``` ```bash # Place the Experiment Management CLI command here. ```Benchmarking
Anomalib provides a benchmarking tool to evaluate the performance of the anomaly detection models on a given dataset. The benchmarking tool can be used to evaluate the performance of the models on a given dataset, or to compare the performance of multiple models on a given dataset.
Each model in anomalib is benchmarked on a set of datasets, and the results are available in src/anomalib/models/<type>/<model_name>/README.md. For example, the MVTec AD results for the Patchcore model are available in the corresponding README.md file.
Benchmarking via API
```python # To be enabled in v1.1 ```Benchmarking via CLI
To run the benchmarking tool, run the following command: ```bash anomalib benchmark --config tools/benchmarking/benchmark_params.yaml ```Reference
If you use this library and love it, use this to cite it
tex
@inproceedings{akcay2022anomalib,
title={Anomalib: A deep learning library for anomaly detection},
author={Akcay, Samet and Ameln, Dick and Vaidya, Ashwin and Lakshmanan, Barath and Ahuja, Nilesh and Genc, Utku},
booktitle={2022 IEEE International Conference on Image Processing (ICIP)},
pages={1706--1710},
year={2022},
organization={IEEE}
}
Contributing
For those who would like to contribute to the library, see CONTRIBUTING.md for details.
Thank you to all of the people who have already made a contribution - we appreciate your support!
Owner
- Login: unaxetxebe49
- Kind: user
- Repositories: 1
- Profile: https://github.com/unaxetxebe49
Citation (CITATION.cff)
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!
cff-version: 1.2.0
title: "Anomalib: A Deep Learning Library for Anomaly Detection"
message: "If you use this library and love it, cite the software and the paper \U0001F917"
authors:
- given-names: Samet
family-names: Akcay
email: samet.akcay@intel.com
affiliation: Intel
- given-names: Dick
family-names: Ameln
email: dick.ameln@intel.com
affiliation: Intel
- given-names: Ashwin
family-names: Vaidya
email: ashwin.vaidya@intel.com
affiliation: Intel
- given-names: Barath
family-names: Lakshmanan
email: barath.lakshmanan@intel.com
affiliation: Intel
- given-names: Nilesh
family-names: Ahuja
email: nilesh.ahuja@intel.com
affiliation: Intel
- given-names: Utku
family-names: Genc
email: utku.genc@intel.com
affiliation: Intel
version: 0.2.6
doi: https://doi.org/10.48550/arXiv.2202.08341
date-released: 2022-02-18
references:
- type: article
authors:
- given-names: Samet
family-names: Akcay
email: samet.akcay@intel.com
affiliation: Intel
- given-names: Dick
family-names: Ameln
email: dick.ameln@intel.com
affiliation: Intel
- given-names: Ashwin
family-names: Vaidya
email: ashwin.vaidya@intel.com
affiliation: Intel
- given-names: Barath
family-names: Lakshmanan
email: barath.lakshmanan@intel.com
affiliation: Intel
- given-names: Nilesh
family-names: Ahuja
email: nilesh.ahuja@intel.com
affiliation: Intel
- given-names: Utku
family-names: Genc
email: utku.genc@intel.com
affiliation: Intel
title: "Anomalib: A Deep Learning Library for Anomaly Detection"
year: 2022
journal: ArXiv
doi: https://doi.org/10.48550/arXiv.2202.08341
url: https://arxiv.org/abs/2202.08341
abstract: >-
This paper introduces anomalib, a novel library for
unsupervised anomaly detection and localization.
With reproducibility and modularity in mind, this
open-source library provides algorithms from the
literature and a set of tools to design custom
anomaly detection algorithms via a plug-and-play
approach. Anomalib comprises state-of-the-art
anomaly detection algorithms that achieve top
performance on the benchmarks and that can be used
off-the-shelf. In addition, the library provides
components to design custom algorithms that could
be tailored towards specific needs. Additional
tools, including experiment trackers, visualizers,
and hyper-parameter optimizers, make it simple to
design and implement anomaly detection models. The
library also supports OpenVINO model optimization
and quantization for real-time deployment. Overall,
anomalib is an extensive library for the design,
implementation, and deployment of unsupervised
anomaly detection models from data to the edge.
keywords:
- Unsupervised Anomaly detection
- Unsupervised Anomaly localization
license: Apache-2.0
GitHub Events
Total
- Delete event: 8
- Issue comment event: 8
- Push event: 5
- Pull request event: 19
- Create event: 14
Last Year
- Delete event: 8
- Issue comment event: 8
- Push event: 5
- Pull request event: 19
- Create event: 14
Dependencies
- actions/checkout v4 composite
- actions/setup-python v5 composite
- actions/upload-artifact v4 composite
- AlexanderDokuchaev/md-dead-link-check v0.9 composite
- actions/checkout v4 composite
- actions/setup-python v5 composite
- actions/checkout v4 composite
- actions/setup-python v5 composite
- actions/download-artifact v4 composite
- myst-parser *
- nbsphinx *
- pandoc *
- sphinx *
- sphinx-copybutton *
- sphinx_autodoc_typehints *
- sphinx_book_theme *
- sphinx_design *
- docstring_parser *
- jsonargparse [signatures]>=4.27.7
- lightning-utilities *
- omegaconf >=2.1.1
- rich >=13.5.2
- rich_argparse *