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

can this code generate special face dataset? #1

Open
mobilejammer opened this issue Jul 18, 2019 · 6 comments
Open

can this code generate special face dataset? #1

mobilejammer opened this issue Jul 18, 2019 · 6 comments

Comments

@mobilejammer
Copy link

for example, I want to train a gender and age model, so face dataset label with gender and age is needed. If I just want to generate woman in one dir and man in another dir , this can avoid label the gender attribute by me.

@a312863063
Copy link
Owner

Maybe that works out. But for this code ,it’s used for generate yellow people only...

@shiyuanyin
Copy link

@a312863063
hi
I want to ask you,if I want to generate more face ,for example 10000,or 1000000 , will appear some similar repetitive face, and generate face maybe have train data face?. I want to use it in face recognition. Maybe I need millions of faces,I don't know if I can make a lot of different fake faces.

@a312863063
Copy link
Owner

Hi, actually you can make numerous different faces without worrying that they will have repetitive ones or they might exist in training data. This is because the generate latent is randomly sampled from 512-dimensional normal distributions, therefore generate latent is always unique, and generated picture is unique either.

@sky186
Copy link

sky186 commented Oct 30, 2019

Hi,
@a312863063
Thank you for your reply. I'm happy to know it. I can make a lot of virtual faces.
But now,I have another question.
I find the generate face have a little distortion when I run this project.
The algorithm itself has this problem, right?
Or,It can be avoided or reduced through data training?

@sky186
Copy link

sky186 commented Oct 30, 2019

@a312863063
Hi
the code generate_yellow.py, this latents random need to change ,not use 512 ?
if I generate numerous different faces , the lantents value decide the unique face?
# Generate latent.
latents = np.random.randn(1, Gs.input_shape[1]) #512,
images = Gs.run(latents, None, truncation_psi=0.7, randomize_noise=True, output_transform=fmt)

@sky186
Copy link

sky186 commented Oct 31, 2019

    # Generate latent. 随机生成一组 512高斯分布的浮点值,取值主要在-1.96~+1.96之间,,如果按照前三位取值,每个随机数字可能性(196+196)可能性
    # 总共有 392^512 次方个人脸,重叠的概率还是有的,但是非常小,类似人群中发现有 陌生的人长得很像的情况
    latents = np.random.randn(1, Gs.input_shape[1]) #512 np.array([[1.08496709, -0.06483675,..........]]),

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

4 participants