Giter Site home page Giter Site logo

Comments (15)

dave7895 avatar dave7895 commented on May 23, 2024 1

oh, that looks nice. Thank you for the insights.

from stylegan2-pytorch.

lucidrains avatar lucidrains commented on May 23, 2024

@dave7895 this feature is actually a hack that people in the GAN field use to make the generated images look better. what they do is they estimate the average latent vector, and make sure that the random latent vector you sample does not stray too far from the average. --trunc-psi ranges from 0 to 1, and denotes that distance.

from stylegan2-pytorch.

dave7895 avatar dave7895 commented on May 23, 2024

I am not really experienced with the whole field, rather just starting out, so I do not really know what a latent vector is. Would just a very general short description or explanation be possible if it is not too much?

from stylegan2-pytorch.

lucidrains avatar lucidrains commented on May 23, 2024

@dave7895 the generator actually learns to create the images from a bag of numbers (512 to be exact). we call that collection of numbers the latent vector.

latent vector -> generator -> image
image -> discriminator -> 1 or 0, (real or fake)

from stylegan2-pytorch.

dave7895 avatar dave7895 commented on May 23, 2024

These numbers come from the nodes of the neural net?

from stylegan2-pytorch.

lucidrains avatar lucidrains commented on May 23, 2024

@dave7895 you pass this latent vector into the net, you get to choose them!

from stylegan2-pytorch.

dave7895 avatar dave7895 commented on May 23, 2024

Is it so that the network chooses one of the 512 and with psi-trunc you make the space of choosing for centered and try to remove outliers?

from stylegan2-pytorch.

lucidrains avatar lucidrains commented on May 23, 2024

@dave7895 yes, actually I randomly sample 512 numbers (z), and the outliers are removed once they are transformer to w (style vector)

from stylegan2-pytorch.

lucidrains avatar lucidrains commented on May 23, 2024

@dave7895 each individual image actually comes from a specific set of 512 numbers. i choose them randomly, but you can set those numbers yourself

from stylegan2-pytorch.

dave7895 avatar dave7895 commented on May 23, 2024

So it would be possible to use the exact same set of numbers on different models and then watch the about the same face get generated by different generations?

from stylegan2-pytorch.

lucidrains avatar lucidrains commented on May 23, 2024

@dave7895 we don't have much control over how the generator decides to layout the latent space, so every time you train a new network, it may decide to put the same face at a different coordinate

from stylegan2-pytorch.

dave7895 avatar dave7895 commented on May 23, 2024

That I can understand. Just like brains being different between siblings for example. But how is it with the same network a thousand iterations later?

from stylegan2-pytorch.

lucidrains avatar lucidrains commented on May 23, 2024

@dave7895 ohh, what do you mean? do you mean how is the face for the same latent vector of the same network trained for 1k iterations?

from stylegan2-pytorch.

dave7895 avatar dave7895 commented on May 23, 2024

The actual question was if the latent space, which defines the possible latent vector due to its dimensions if I understood correctly, changes during training. If it does not change then you could feed the same numbers each time at least once, and you could see one of the faces evolving as the network evolves.

from stylegan2-pytorch.

lucidrains avatar lucidrains commented on May 23, 2024

@dave7895 oh yes, many people do that with GANs already! https://pythonawesome.com/content/images/2019/08/celeba_dragan.gif

from stylegan2-pytorch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.