项目作者: Xiaohui9607

项目描述 :
Code for reproducing f-AnoGAN in Pytorch
高级语言: Python
项目地址: git://github.com/Xiaohui9607/f_anogan_pytorch.git
创建时间: 2020-07-27T18:25:55Z
项目社区:https://github.com/Xiaohui9607/f_anogan_pytorch

开源协议:

下载


f-AnoGAN: Fast unsupervised anomaly detection with generative adversarial networks

Code for reproducing f-AnoGAN training and anomaly scoring presented in “f-AnoGAN: Fast Unsupervised Anomaly Detection with Generative Adversarial Networks”, implemented in Pytorch.

Requirements

scikit-learn==0.21.2

torch==1.4.0

torchvision==0.5.0

Run

Generative adversarial training

  1. $ python ./gan_training.py --n_epochs 50 --dataset mnist --latent_dim 128 --img_size 32 --channels 1 --abnormal_class 0 --device cuda --out ckpts

Encoder training

  1. $ python ./enc_training.py --n_epochs 5 --dataset mnist --latent_dim 128 --img_size 32 --channels 1 --abnormal_class 0 --device cuda --out ckpts --G_path ckpts/G_epoch49.pt --D_path ckpts/D_epoch49.pt