Open mobilejammer opened 5 years ago
Maybe that works out. But for this code ,it’s used for generate yellow people only...
@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.
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.
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?
@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?
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)
# 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,..........]]),
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.