How can I Localize anomalies with heatmaps using autoencoder?

Viewed 145

I am working on anomaly detection model (for PCBs) using Autoencoder , I am working on google Colab using free GPU. so as a first step I was trying to build my autoencoder and visualise the reconstruction of my training data(pictures without defects size 1,3 MP). I built a model of three layers with 150 epochs batch size =2, it gave me good results. I used SSIM loss function to calculate the difference between the test photos ( pictures with aomalies) and the training data(pictures without anomalies). The problem here that I want to visualize these differences with the HeatMap as I read in some articles that it is possible to localize anomalies in a pixel level .. I suppose it is related to the loss function that we use to calculate the difference.

do you have any idea what functions could help me visualize/Localize anomalies ?

1 Answers

The task of outputting where in an image is known as Anomaly Localization. There are many academic papers on the topic for advanced methods.

When using a reconstructing autoencoder on images for anomaly detection, one can compute the difference between the input image and the reconstructed output image as an anomaly-level image.

Related