Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recontructed images visualization #16

Open
elsaschalck opened this issue Dec 3, 2020 · 4 comments
Open

Recontructed images visualization #16

elsaschalck opened this issue Dec 3, 2020 · 4 comments

Comments

@elsaschalck
Copy link

Hello,
I'm especially interested in the reconstruction of the images given as input to the model, and I would like to get and visualize the reconstructed images. To do so, is it the right way to use output_img = output.sample() after logits, log_q, log_p, kl_all, _ = model(x) and output = model.decoder_output(logits) in the train and test functions ? Would you recommend to take several samples for the same image ?
Thank you for the work and the release,
Elsa

@arash-vahdat
Copy link
Contributor

Hi Elsa,

Sorry for my slow reply. Yes for colored images output.sample() is a good way of obtaining images. Are you planning on computing metrics like FID score on these samples? When we sample from the decoder using the method above, there is a very small amount of noise that is usually not visible to us but it can badly hurt the FID score.

Regards,
-- Arash

@elsaschalck
Copy link
Author

elsaschalck commented Dec 18, 2020

Hi Arash,
Thank you for your answer and for the details.
I am not planning to compute metrics like FID score on the images for the moment. I am focusing on image reconstruction instead of image generation.
I would like to compare the output image to the input image during training and testing. My final goal is to study how well the network is able to reconstruct an given input image, for instance through the use of a metric like MSE. Therefore, how can I get the final reconstructed image for a given input ?
Kind regards,
Elsa

@arash-vahdat
Copy link
Contributor

For that purpose too, output.sample() should work. As you have noticed we record reconstructed images in this line:
https://github.com/NVlabs/NVAE/blob/master/train.py#L202

@elsaschalck
Copy link
Author

Great, thank you, I was looking for this specific line.
Best regards,
Elsa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants