Code for reproducing f-AnoGAN in Pytorch
Code for reproducing f-AnoGAN training and anomaly scoring presented in “f-AnoGAN: Fast Unsupervised Anomaly Detection with Generative Adversarial Networks”, implemented in Pytorch.
scikit-learn==0.21.2
torch==1.4.0
torchvision==0.5.0
$ python ./gan_training.py --n_epochs 50 --dataset mnist --latent_dim 128 --img_size 32 --channels 1 --abnormal_class 0 --device cuda --out ckpts
$ 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