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

Some Comments #1

Open
olivercoad opened this issue Aug 12, 2019 · 1 comment
Open

Some Comments #1

olivercoad opened this issue Aug 12, 2019 · 1 comment

Comments

@olivercoad
Copy link

BTW good job with this, it's a great use for simplex noise. It's an elegant method of making random looping walks through latent space.

Just a few comments related to your code.

1. You no longer need data/landscape.js to set the starting latent because a is immediately overridden using the noise loops:

for (let i = 0; i < imgSize; i++) { //loop through all pixels, and select the corresponding value for the vector with the randomness generated from our Noise Loop function
a[i] = n[i].value(angle);
}

2. In the video you asked about the diameter. You're right in that it kind of sets how much randomness there is - it determines the size of the walk through the simplex noise input space. Because the loop goes round using the angle, the diameter effectively kind of determines the noise octave/frequency and how much total variation there will be.

3. The image size has been conflated with the number of dimensions in the latent vector.
In StyleGAN, the latent vector has 512 dimensions. The size of the output image is independent to the latent vector and depends on the pretrained model used.

For example here are the sizes of the pretrained models from https://github.com/NVlabs/stylegan

Path Description
ffhq-1024x1024 Generated using Flickr-Faces-HQ dataset at 1024×1024.
bedrooms-256x256 Generated using LSUN Bedroom dataset at 256×256.
cars-512x384 Generated using LSUN Car dataset at 512×384.
cats-256x256 Generated using LSUN Cat dataset at 256×256.

In stylegan-transition.js, the variable imgSize should instead be called something like latentDimensions. For example here there is a NoiseLoop for each dimension of the latent vector.

for (let i = 0; i < imgSize; i++) {
n[i] = new NoiseLoop(20, -1, 1); //diameter, min, max
}

@valentinvieriu
Copy link

I double what you are saying @olivercoad . Did you managed to fix the code?
At this moment the code discards the initial input.

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