Review: PR-115-Unsupervised Anomaly Detection with Generative Adversarial Networks

Joonsu Oh
1 min readAug 22, 2021
  1. Train a DCGAN to properly approximate the normal (not Gaussian!) distribution of images of interest. With this, we have one generator that can map a latent space to normal images and a discriminator that can discriminate real and fake images.
  2. Now, we have a trained DCGAN. Say, we have a new image that is unknown whether the image is normal or abnormal. How can we know if this image is normal or abnormal using the trained GAN? We can do the next.
  3. Find the z that gives the most visually similar G(z) to the given image. How? Set up a residual loss (L1 image loss) and discrimination loss (L1 loss between feature maps of discriminator) and optimize z.
  4. With the optimized z, we can get an anomaly score — the loss itself! Also, we can visually check abnormalities via visualization of residual losses.

--

--