Alessandro Flaborea, Bardh Prenkaj, Bharti Munjal, Marco Aurelio Sterpa, Dario Aragona, Luca Podo and Fabio Galasso
The official PyTorch implementation of the IEEE/CVF CVPR Visual Anomaly and Novelty Detection (VAND) Workshop paper Are we certain it's anomalous?.
Visit our webpage for more details.
.
├── assets
│ └── teaser_hypad.png
├── anomaly_detection.py
├── configs
│ └── univariate.yaml
│ └── multivariate.yaml
├── data
│ └── dataset.pickle
│ └── all univariate datasets
├── environment.yml
├── hyperspace
│ ├── hyrnn_nets.py
│ ├── losses.py
│ ├── poincare_distance.py
│ └── utils.py
├── LICENSE
├── main.py
├── math_.py
├── models
│ └── tadgan.py
├── README.md
├── train.py
└── utils
├── anomaly_detection_utils.py
├── dataloader_multivariate.py
├── dataloader.py
├── data.py
└── utils.py
conda env create -f environment.yml
conda activate hypad
The univariate datasets have been added to this repo.
At present, the univariate datasets are not available for download. To stay informed about the status of the site, please track this issue for updates.
The YAHOO dataset can be requested here https://webscope.sandbox.yahoo.com/catalog.php?datatype=s&did=70
To run TadGAN and HypAD, you must pass one of the signals associated with each dataset. You can find the list of datasets and signals in data/datasets.pickle.
All the univariate datasets, except for 'SMAP' and 'MSL', use the same set for train and test. When train == test, the flag unique_dataset must be set to True.
To run HypAD:
python main.py --config configs/univariate.yaml
To run TadGAN just set the parameter hyperbolic to False
Run the anomaly detector with the config used during trained which is stored in trained_models/models_{eucl/hyper}_{signal}_{epochs}_{lr}
python anomaly_detection.py --config trained_models/models_{eucl/hyper}_{signal}_{epochs}_{lr}/config.yaml
additional flags you can use:
- How to compute the reconstruction error rec_error [dtw/area/point] (dtw by default) (not used with HypAD)
- How to combine critic_score and reconstruction_error combination [mult/sum/rec/critic/uncertainty] (mult by default, uncertainty only for HypAD)
To run HypAD:
python main.py --config configs/multivariate.yaml
To run TadGAN just set the parameter hyperbolic to False
Run the anomaly detector with the config used during trained which is stored in trained_models/models_{eucl/hyper}_{signal}_{epochs}_{lr}
python anomaly_detection.py --config trained_models/models_{eucl/hyper}_{signal}_{epochs}_{lr}/config.yaml
list of signals: [fall, weakness, nocturia. moretimeinchair, slowerwalking]
Ask flaborea@di.uniroma1.it for the multivariate dataset.
@InProceedings{Flaborea_2023_CVPR,
author = {Flaborea, Alessandro and Prenkaj, Bardh and Munjal, Bharti and Sterpa, Marco Aurelio and Aragona, Dario and Podo, Luca and Galasso, Fabio},
title = {Are We Certain It's Anomalous?},
booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) Workshops},
month = {June},
year = {2023},
pages = {2897-2907}
}
We build upon TadGAN.