Skip to content

AMCO-UniPD/moviad

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

drawing

Project Objective

MoViAD is an Open Source library for easy and modular Visual Anomaly Detection, built for industrial and research purposes. The library contains some State-of-the-Art models with their trainers, standard datasets, evaluator for calculating standard metrics, and a feature extractor. The library structure is totally modular, allowing an easy isolation of the components needed for your project. The library will support different scenarios:

  • Standard anomaly detection (model training and evaluation on a given category) ✅
  • Contaminated anomaly detection (model training ed evaluation on a given category with a contaminate training set) ✅
  • Continual anomaly detection (model training and evaluation considering a stream of tasks) 🚧 (Work in progress)
  • Few shot anomaly detection 🚧 (Work in progress)

How to Install

Inside the main repository directory, run the following command:

Editable mode (if you need to work on the code):

pip install -e ./

Fixed mode (if you just want to use the code):

pip install ./

How to use the library

The library follows this structure:

  • inside the /models/model_name directory is present the code of anomaly detection models
  • inside the /trainers directory is present the code for training the anomaly detection models
  • inside the /datasets directory is present the code for the anomaly detection datasets that must be used
  • inside the /utilies directory is present the code for anomaly detection utilities

Execution example

Inside the /main_scripts directory are present some execution scripts for training and testing the AD models.

For example, for training patchcore:

python main_scripts/main_patchcore.py --mode train --dataset_path /home/datasets/mvtec --category pill --backbone mobilenet_v2 --ad_layers features.4 features.7 features.10 --device cuda:0 --save_path ./patch.pt 

For every main script all its parameters are documented.

AD Models

Feature Extraction Backbones

Datasets

Contribute

If you want to contribute to the repository, follow the present code structure:

  • inside the /models/model_name directory put the code for possible new anomaly detection models
  • inside the /trainers directory put the code for training an anomaly detection model
  • inside the /datasets directory put the code for possible new anomaly detection datasets that must be used

Every contribution must be open with a pull request.

Citations

If you use MoViAD in your work, please cite us! 🤗

Works that uses MoViAD:

  • "PaSTe: Improving the efficiency of visual anomaly detection at the edge", Manuel Barusco, Francesco Borsatti, Davide Dalle Pezze, Francesco Paissan, Elisabetta Farella, Gian Antonio Susto. paper
  • "From Vision to Sound: Advancing Audio Anomaly Detection with Vision-Based Algorithm", Manuel Barusco, Francesco Borsatti, Davide Dalle Pezze, Francesco Paissan, Elisabetta Farella, Gian Antonio Susto. paper

About

Open Source library for easy and modular Visual Anomaly Detection

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •