A03ki / f-AnoGAN

Implementation of f-AnoGAN with PyTorch
MIT License
128 stars 35 forks source link

Add f-AnoGAN for the MVTec Anomaly Detection Dataset #2

Closed A03ki closed 4 years ago

A03ki commented 4 years ago

This PR will be able to train and test eriklindernoren's DCGAN for the MVTec Anomaly Detection Dataset.

Usage

Change a directory

cd mvtec_ad

You can choose one item from datasets below.

"bottle", "cable", "capsule", "carpet", "grid", "hazelnut", "leather", "metal_nut", "mvtec_anomaly_detection", "pill", "screw", "tile", "toothbrush", "transistor", "wood", "zipper".

For more information of datasets, see MVTec Anomaly Detection Dataset (MVTec AD) - MVTec Software GmbH.

Training Generator and Discriminator

python train_wgangp.py "bottle" --seed 1 --n_epochs 1000

Training Encoder

python train_encoder_izif.py "bottle" --seed 1 --sample_interval 50 --n_epochs 100

Test

python test_anomaly_detection.py "bottle" --seed 1