rosinality / vq-vae-2-pytorch

Implementation of Generating Diverse High-Fidelity Images with VQ-VAE-2 in PyTorch
Other
1.59k stars 271 forks source link

using vq-vae-2 for scoring probability of an image #36

Open zoharbarzelay opened 4 years ago

zoharbarzelay commented 4 years ago

Thanks a lot for this repo! quick question: once i train on your image set - can i somehow then use the model to estimate the probability that a new image is from the same distribution of the training set?

basically i want to use VAE to learn a prior model over images..

Thanks for anyone who can help with this!

Best, Z.

venergiac commented 4 years ago

I reconstruct the image and I compare reconstructed with original using SSIM comparison

zoharbarzelay commented 4 years ago

I reconstruct the image and I compare reconstructed with original using SSIM comparison

Thanks for your answer! could you plz provide some more details? for instance, what are the different colors in the graph?

rosinality commented 4 years ago

I think you can use prior (like PixelSNAIL) and reconstruction loss of the decoder to calculate likelihood.

zoharbarzelay commented 4 years ago

I think you can use prior (like PixelSNAIL) and reconstruction loss of the decoder to calculate likelihood.

thanks for your answer! how would you suggest that i use PixelSNAIL?

rosinality commented 4 years ago

@zozobozo I think you can use probability estimates of PixelSNAIL that you can calculate by forward the code of the sample.