a312863063 / seeprettyface-face_editor Goto Github PK
View Code? Open in Web Editor NEW这是一个基于StyleGAN的人脸属性编辑器
这是一个基于StyleGAN的人脸属性编辑器
大神 求帮助
Traceback (most recent call last):
File "play_with_dlatent.py", line 87, in
main()
File "play_with_dlatent.py", line 44, in main
generator = Generator(Gs_network, batch_size=1, randomize_noise=False)
File "E:\stylegan2\stylegan2_application\humanfacegenerators\util\generator_model.py", line 52, in init
self.dlatent_variable = next(v for v in tf.global_variables() if 'learnable_dlatents' in v.name)
StopIteration
您好,我想问下这个水平或竖直方向改变能否完成大幅度的角度改变(比如把正脸调成侧脸)。因为我看您放的示例图只有轻微的角度改变。
在colab上测试。
报错是:
……
KeyError: "The name 'G_synthesis_1/_Run/concat:0' refers to a Tensor which does not exist. The operation, 'G_synthesis_1/_Run/concat', does not exist in the graph."
During handling of the above exception, another exception occurred:
……
KeyError: "The name 'G_synthesis/_Run/concat:0' refers to a Tensor which does not exist. The operation, 'G_synthesis/_Run/concat', does not exist in the graph."
请遇到这个问题的小伙伴统一修改unit目录中的generator_model.py文件
将generator类中:
try:
self.generator_output = self.graph.get_tensor_by_name('G_synthesis_1/_Run/concat:0')
except KeyError:
# If we loaded only Gs and didn't load G or D, then scope "G_synthesis_1" won't exist in the graph.
self.generator_output = self.graph.get_tensor_by_name('G_synthesis/_Run/concat:0')
修改为:
try:
self.generator_output = self.graph.get_tensor_by_name('G_synthesis_1/_Run/concat/concat:0')
except KeyError:
# If we loaded only Gs and didn't load G or D, then scope "G_synthesis_1" won't exist in the graph.
self.generator_output = self.graph.get_tensor_by_name('G_synthesis/_Run/concat:0')
供楼主参考。
harry@MacBook-Pro seeprettyface % python play_with_dlatent.py
File "play_with_dlatent.py", line 9
SyntaxError: Non-ASCII character '\xe4' in file play_with_dlatent.py on line 9, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
我们现在使用的是 pbaylies/stylegan-encoder 的方法,但是获取一张图片的latent太慢了。看您的博客曾经介绍过BiGAN的方法获取latent,不知效果如何。
使用生成器的生成图片的数据集都是视线正对着的画面的,想请问有什么方法可以做到调整眼睛的位置
Traceback (most recent call last):
File "play_with_dlatent.py", line 87, in
main()
File "play_with_dlatent.py", line 43, in main
generator_network, discriminator_network, Gs_network = pickle.load(f)
File "D:\MyProjects\ai\seeprettyface-face_editor\dnnlib\tflib\network.py", line 279, in setstate
assert state["version"] in [2, 3]
AssertionError
what's happening ?
您好!请问 latent_directions 中 npy 文件的训练代码有开源吗?非常感谢!
Excellent work!
an issue is how you get emotion.npy or other *npy?
Hi,
I can only find the model in stylegan2 but not stylegan. Where should I look for?
Thanks!
作者您好,我看了一下代码,里面是通过已经训练好的模型然后随机生成出来的图片(png)和隐向量(.txt)文件,然后可以进行属性修改,表现效果还是很好的,那如果我就用我的一张自拍照,属性修改怎么处理呢?期待您的解答,感谢!
权重文件在那下载?
KeyError: "The name 'G_synthesis/_Run/concat:0' refers to a Tensor which does not exist. The operation, 'G_synthesis/_Run/concat', does not exist in the graph."
Hi @a312863063 ,
Thank you for this great repository and we are using this for our GANs research.
I need a clarification for creating the latent space vector from our own image to feed into this model. I can able to create new image and using that image can able to adjust the different attributes using latest directions like smile, age, etc.
I tried StyleGAN-encoder package to create latent space with FFHQ model and its size is (18,512) with *.npy format. But this repository needs in the format of .txt and its length is around (512). If possible can you please help me on how can I generate the latent space for the original(our own) images which is compatible with this model(i.e. latent spaces in *.txt format without any loss in the quality of image).
Also, while we create latent space form real image using StyleGan encoder, we are facing some loss in the quality, is it because of the model or do I need to adjust any parameter in general?
Thanks in advance, looking forward you response.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.