Skip to content

How to generate images from the PixelCNN? #13

@Hanzy1996

Description

@Hanzy1996

The PixelCNN learn to model the prior q(z) in the paper and the code. For any given classes/labels, PixelCNN should model their prior q(z), as shown in the code

def generate(self, label, shape=(8, 8), batch_size=64):
here. And the prior here is actually the index of some codes in the codebook.

I first generate the index for some given classes as the codes

def generate(self, label, shape=(8, 8), batch_size=64):
do, which is q(z)=GatedPixelCNN.generate(label).
After I got the index q(z), I try to generate the images based on the index using the decoder in VQVAE
def decode(self, latents):
, which is images=VectorQuantizedVAE.decode(q(z)).
However, these generated images look very unrealistic, unlike the reconstruction results.

Can we evaluate the PixelCNN based on the generated images? How can I get the realistic images based on the prior generated by PixelCNN?

Best wishes!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions