Here is a PyTorch code of anomaly detection by GANs. The overall GAN structure is taken from eriklindernoren's code.
- (DONE)anogan: A PyTorch implementation of Unsupervised Anomaly Detection with Generative Adversarial Networks to Guide Marker Discovery
- (ToDo)f-anogan: f-AnoGAN: Fast unsupervised anomaly detection with generative adversarial networks
- (ToDo)timegan: Time-series Generative Adversarial Networks
- MNIST: it is automatically downloaded by torchvision.
- energy: download appliance energy prediction dataset into the data/energy folder.
Train GAN(DCGAN) with normal dataset
- MNIST: Run train.py --dataset mnist --train
- energy: Run train.py --dataset energy --train --data_path ../data/energy/energydata_complete.csv --window_size 28 --skip_size 7
Projection test dataset with sparse noise onto the pretrained GAN manifolds.
- MNIST: Run test.py --dataset mnist --add_noise
- energy: Run test.py --dataset energy --add_noise --data_path ../data/energy/energydata_complete.csv --window_size 28 --skip_size 7