vq-vae-2-pytorch icon indicating copy to clipboard operation
vq-vae-2-pytorch copied to clipboard

[train_vqvae] Can I know rationale why training sample shows as duplicate?

Open kimdn opened this issue 5 years ago • 5 comments
trafficstars

I mean training sample in https://github.com/rosinality/vq-vae-2-pytorch/#stage-1

Even when I ran train_vqvae with my own data set, many image files in sample folder showed as duplicate.

Initially, I thought that images in the 1st row are original one and images in the 2nd row are regenerated/reproduced one.

However, it looks like images from train_pixelsnail are reproduced one.

kimdn avatar Sep 02 '20 20:09 kimdn

Hard to understand what you mean. Could you let me know it in more details?

rosinality avatar Sep 03 '20 00:09 rosinality

Hard to understand what you mean. Could you let me know it in more details?

Yes.

In https://github.com/rosinality/vq-vae-2-pytorch/#stage-1 I see 16 pictures (e.g. 8 pictures in top row (1st row), 8 pictures in bottom row (2nd row)). To me, 8 pictures in the top row are identical/same as those in the bottom row.

Is there a reason why it shows these duplicate images?

Thanks

kimdn avatar Sep 03 '20 00:09 kimdn

Does the number of images in your dataset is less than 8? Anyway, top row is input images, and the bottom row is output images from the model, so it should not be duplicated.

rosinality avatar Sep 03 '20 11:09 rosinality

Does the number of images in your dataset is less than 8?

No, my dataset is 3,000 images of FFHQ.

Anyway, top row is input images, and the bottom row is output images from the model, so it should not be duplicated.

I see, it sounds like images in top row are input to vq-vae2 encoder, and images in down row are output from vq-vae2 decoder. That's what I initially understood. I got totally same/identical pictures as of input images in down row.

Then, basically train_pixelsnail is for further refinement with respect to reconstruction of images?

If so, then I'm confused why result from train_pixelsnail (https://github.com/rosinality/vq-vae-2-pytorch/issues/4#issuecomment-505867882) looks poorer than result from step 1 (train_vqvae.py)????

kimdn avatar Sep 03 '20 16:09 kimdn

No, pixelsnail is a prior that you can sample latent codes from it. So pixelsnail will allow to generate samples.

rosinality avatar Sep 03 '20 16:09 rosinality