%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Code for Perturbation Learning Based Anomaly Detection%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Requirements:
We verify our code on the following environments
RTX 3080 GPU
CUDA 11.0
python 3.6.5
torch 1.7.0
torchvision 0.8.1
scikit-learn 0.22.2

Usage:
run ptyhon main_fmnist.py
1. main_fmnist.py: the main file to run the experiment.
2. VAE_fmnist.py: the VAE perturbator.
3. data: data save path.
4. data_preprocess: pre-process function file.
5. log: model save path, and also contains the tranied model on each class.
6. trainer: contains the training and testing function.

Special thanks to Sachin and EdgeML for sharing the code of their excellent work at https://github.com/microsoft/EdgeML.

If you find PLAD useful in your research, please consider citing our work:
@article{cai2022perturbation,
  title={Perturbation learning based anomaly detection},
  author={Jinyu Cai and Jicong Fan},
  booktitle={Advances in Neural Information Processing Systems},
  year={2022}
}
