a312863063 / seeprettyface-generator-wanghong Goto Github PK
View Code? Open in Web Editor NEW这是一个用StyleGAN训练出的网红脸生成器
这是一个用StyleGAN训练出的网红脸生成器
W tensorflow/core/common_runtime/bfc_allocator.cc:211] Allocator (GPU_0_bfc) ran out of memory trying to allocate 2.14GiB. The caller indicates that this is not a failure, but may mean that there could be performance gains if more memory were available.
Hey man, really love your result and I was trying to run this repository but I kept getting this out of memory... any idea how I go about fixing this?
I build is:
For some reason, my PC with the 1070 Graphic Card always freezes instead of showing me the message above. At least my GTX 970 PC show me the message above.
请问该怎么与generator_wanghong_hd.pkl
一起使用生成码 dlatent
?
如果使用 generator_wanghong_hd.pkl
,它会绘制错误的图像
# http://www.seeprettyface.com/generate_code/Fanbingbing.npy
dlatent= np.load('Fanbingbing.npy')
model_path = 'generator_wanghong_hd.pkl'
synthesis_kwargs = dict(output_transform=dict(func=tflib.convert_images_to_uint8, nchw_to_nhwc=True), minibatch_size=1)
with dnnlib.util.open_url(model_path) as f:
_G, _D, Gs = pickle.load(f)
img = Gs.components.synthesis.run(dlatent.reshape((-1, 18, 512)), randomize_noise=False, **synthesis_kwargs)[0]
plt.imshow(img)
plt.axis('off')
plt.show()
只有使用 karras2019stylegan-ffhq-1024x1024.pkl
时才会绘制正确的图像
# http://www.seeprettyface.com/generate_code/Fanbingbing.npy
dlatent= np.load('Fanbingbing.npy')
model_path = 'karras2019stylegan-ffhq-1024x1024.pkl'
synthesis_kwargs = dict(output_transform=dict(func=tflib.convert_images_to_uint8, nchw_to_nhwc=True), minibatch_size=1)
with dnnlib.util.open_url(model_path) as f:
_G, _D, Gs = pickle.load(f)
img = Gs.components.synthesis.run(dlatent.reshape((-1, 18, 512)), randomize_noise=False, **synthesis_kwargs)[0]
plt.imshow(img)
plt.axis('off')
plt.show()
Traceback (most recent call last):
File "generate_wanghong.py", line 10, in
import PIL.Image
ModuleNotFoundError: No module named 'PIL'
How can I Deal with it?
我的qq 994562751
作者你好,我在做视频的人脸性别转换相关的工作,我没有用stylegan,而是用cyclegan,基本就是把视频中的每一帧人脸检测出来,然后通过cyclegan生成异性的图片,但是我在替换的时候遇到了下面两个问题
你好~ 运行genrate_wanghong.py的时候报了这个错:
AttributeError: module 'tensorflow' has no attribute 'Dimension'
我使用的是tensorflow-gpu 2.0.0 ,不知道应该怎么改,大神可以教教我吗~百度了半天也查不到,谢谢了
CPU上可否生成?
anaconda搭建python3.6,TensorFlow==1.10.0,numpy==1.14.3但是运行后报错
InvalidArgumentError (see above for traceback): Cannot assign a device for operation 'Gs/_Run/Gs/latents_in': Operation was explicitly assigned to /device:GPU:0 but available devices are [ /job:localhost/replica:0/task:0/device:CPU:0 ]. Make sure the device specification refers to a valid device.
[[Node: Gs/_Run/Gs/latents_in = IdentityT=DT_FLOAT, _device="/device:GPU:0"]]
解决下代码问题...
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.