zurutech / anomaly-toolbox

Anomaly detection using GANs.
MIT License
90 stars 12 forks source link

GANomaly implementation error #5

Closed paulvinell closed 4 months ago

paulvinell commented 2 years ago

I found this repository from your study "A Survey on GANs for Anomaly Detection". Wanting to reimplement the GANomaly model, I've been looking at your implementation. Upon comparison to the original study and code, it seems that the implementation of GANomaly is incorrect.

It seems that you have only one instance of the encoder, whereas the original study has two instances. Moreover, they say the following in the original GANomaly paper:

The second sub-network is the encoder network E that compresses the image ˆx that is reconstructed by the network G. With different parametrization, it has the same architectural details as G_E.

This seems like an issue that could compromise the study results.

iLeW commented 2 years ago

Hello @paulvinell, thank you for opening this issue. Indeed, you are right! 😁

We are aware of this change w.r.t. the original architecture. The motivation is because we faced some problems in replicating the original structure, in particular, we couldn't get it to converge properly. For sure, we can try again to have another look at it and with a fresh mind find a solution.

Anyway, if you'd like, and if maybe you've already thought about how to modify the code to add a new encoder, feel free to give it a try. We would welcome any valuable input to improve the work.

iLeW commented 4 months ago

Since there has been no further activity on this issue, I will proceed to close this issue.

If you have any additional insights or further suggestions on how we can improve the implementation, please feel free to open a new issue or reach out to us directly.