Giter VIP home page Giter VIP logo

seeprettyface-generator-wanghong's People

Contributors

a312863063 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

seeprettyface-generator-wanghong's Issues

Ran Out of Memory

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:

  • Windows 10
  • GTX 970 and 1070 (separate PC respectively)
  • Python 3.6.9
  • Tensorflow-gpu 1.14
  • VS2017&2019 Community
  • CUDA 10.0 + cuDNN 7.6.5

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.

Stylegan

怎么用生成码 dlatent?

请问该怎么与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()

image

只有使用 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()

image

No module named 'PIL'

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?

视频人脸替换

作者你好,我在做视频的人脸性别转换相关的工作,我没有用stylegan,而是用cyclegan,基本就是把视频中的每一帧人脸检测出来,然后通过cyclegan生成异性的图片,但是我在替换的时候遇到了下面两个问题

  1. 将生成人脸替换到原视频后,有很明显的边框
  2. 替换后的人脸,经常会闪烁
    但我看作者你生成的视频很自然,所以想了解下你有没有遇到我说的这两个问题,或者是怎么解决的

AttributeError: module 'tensorflow' has no attribute 'Dimension'

你好~ 运行genrate_wanghong.py的时候报了这个错:
AttributeError: module 'tensorflow' has no attribute 'Dimension'
我使用的是tensorflow-gpu 2.0.0 ,不知道应该怎么改,大神可以教教我吗~百度了半天也查不到,谢谢了

报错:nvalidArgumentError (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 = Identity[T=DT_FLOAT, _device="/device:GPU:0"](Gs/_Run/split)]]

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"]]
解决下代码问题...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.