donggong1 / memae-anomaly-detection

MemAE for anomaly detection. -- Gong, Dong, et al. "Memorizing Normality to Detect Anomaly: Memory-augmented Deep Autoencoder for Unsupervised Anomaly Detection". ICCV 2019.
https://donggong1.github.io/anomdec-memae.html
MIT License
467 stars 104 forks source link

Initialization and update of memory #4

Open Karamya opened 5 years ago

Karamya commented 5 years ago

Your paper does not discuss about how you initialise the memory and how do you update the memory while training. Can you please share your code for this and refer me to the relevant publication where they discuss about this. Thanks

h19920918 commented 5 years ago

When implementing this paper, I used weight parameters for the memory. It means that the parameters will be updated by the loss during training procedure. But I'm not sure.

Also, I want to see how to initialize and update the memory.

Karamya commented 5 years ago

Thanks @h19920918 , can your reproduce the results for example on MNIST which they show in the paper. If yes, can you share your code

h19920918 commented 5 years ago

I didn't apply their main contribution about Anomaly Detection, just training my network on MNIST dataset. But when I visualized an image from single memory slot, I couldn't reproduce the results in the paper.

If I finish fixing some bugs, it might be uploaded on my GitHub.

h19920918 commented 5 years ago

I uploaded my code for you.

But it's not perfectly implemented.

And you might feel something strange when you watch the code, since it is not main objective to perfectly implement.

Karamya commented 5 years ago

Thanks, will have a look 👍

0merjavaid commented 4 years ago

@h19920918 your code runs smoothly! thanks man! and I also feel like the reconstruction from memory index is also decent. the reason it didn't work in your case is that you are training for all digits i.e 0-9. when I trained on just one digit 0 the reconstructions are reasonable(using random idx).

h19920918 commented 4 years ago

@0merjavaid Thanks!