Comments (21)
Adding following lines to the rendering.py seems to solve the problem for some people:
import os
os.environ['PYOPENGL_PLATFORM'] = 'egl' # Uncommnet this line while running remotely
I updated the script accordingly
from voca.
I'm trying to fix this problem. I think it's a problem of pyrender. I'm looking forward to getting help.
I found a solution:
- Firstly, follow the installation guide for OSMESA here;
- Secondly, use the code from here (original visualize_sequence.py throws a segmentation fault with osmesa, so I slightly modified it).
Hope it helps!
from voca.
I found the answer. Just use PYOPENGL_PLATFORM=osmesa. For example:
PYOPENGL_PLATFORM=osmesa python run_voca.py
from voca.
I guess it could be dump from the OpenGL version.
Here's my information:
>> glxinfo | grep OpenGL
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.8, 256 bits)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 11.2.0
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 11.2.0
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.0 Mesa 11.2.0
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
OpenGL ES profile extensions:
from voca.
I'm trying to fix this problem. I think it's a problem of pyrender. I'm looking forward to getting help.
cv2 >= 3
Traceback (most recent call last):
File "/home/mesh/.virtualenvs/voca/lib/python3.6/site-packages/pyrender/platforms/pyglet.py", line 32, in init_context
width=1, height=1)
File "/home/mesh/.virtualenvs/voca/lib/python3.6/site-packages/pyglet/window/xlib/__init__.py", line 170, in __init__
super(XlibWindow, self).__init__(*args, **kwargs)
File "/home/mesh/.virtualenvs/voca/lib/python3.6/site-packages/pyglet/window/__init__.py", line 592, in __init__
config = screen.get_best_config(config)
File "/home/mesh/.virtualenvs/voca/lib/python3.6/site-packages/pyglet/canvas/base.py", line 197, in get_best_config
raise window.NoSuchConfigException()
pyglet.window.NoSuchConfigException
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "run_training.py", line 94, in <module>
main()
File "run_training.py", line 91, in main
model.train()
File "/home/mesh/voca/utils/voca_model.py", line 189, in train
, data_specifier='training')
File "/home/mesh/voca/utils/voca_model.py", line 249, in _render_sequences
self._render_helper(out_folder, data_specifier)
File "/home/mesh/voca/utils/voca_model.py", line 274, in _render_helper
self._render_sequences_helper(video_fname, raw_audio[i_seq], processed_audio[i_seq], templates[i_seq], vertices[i_seq], condition_idx)
File "/home/mesh/voca/utils/voca_model.py", line 306, in _render_sequences_helper
gt_img = render_mesh_helper(Mesh(seq_verts[i_frame], self.template_mesh.f), center)
File "/home/mesh/voca/utils/rendering.py", line 108, in render_mesh_helper
r = pyrender.OffscreenRenderer(viewport_width=frustum['width'], viewport_height=frustum['height'])
File "/home/mesh/.virtualenvs/voca/lib/python3.6/site-packages/pyrender/offscreen.py", line 31, in __init__
self._create()
File "/home/mesh/.virtualenvs/voca/lib/python3.6/site-packages/pyrender/offscreen.py", line 134, in _create
self._platform.init_context()
File "/home/mesh/.virtualenvs/voca/lib/python3.6/site-packages/pyrender/platforms/pyglet.py", line 40, in init_context
'internal error message was "{}"'.format(e)
ValueError: Failed to initialize Pyglet window with an OpenGL >= 3+ context. If you're logged in via SSH, ensure that you're running your script with vglrun (i.e. VirtualGL). The internal error message was ""
from voca.
Same problem.Don't know how to fix it.
from voca.
Are you running on a server as well?
from voca.
Are you running on a server as well?
yep, ubuntu 16.04.
from voca.
Are you running on a server as well?
yep, ubuntu 16.04.
The same
from voca.
Sorry, but I cannot reproduce the problem.
Just to clarify, you are all able to output the meshes but only the rendering is an issue @huybery @qianchenghao @Banayaki ?
from voca.
Sorry, but I cannot reproduce the problem.
Just to clarify, you are all able to output the meshes but only the rendering is an issue @huybery @qianchenghao @Banayaki ?
yes, the mesh could be generated, but the video can not be output.
from voca.
I found the answer. Just use PYOPENGL_PLATFORM=osmesa. For example:
PYOPENGL_PLATFORM=osmesa python run_voca.py
I have try it... it doesn't work..
from voca.
@huybery does a visualization with OpenGL work for you? I.e. are you able to load one of these meshes with the mesh package and visualize it? Something along these lines
from psbody.mesh import Mesh
mesh = Mesh(filename='xxxxxxxxxx.obj')
mesh.show()
Does this work?
from voca.
@huybery does a visualization with OpenGL work for you? I.e. are you able to load one of these meshes with the mesh package and visualize it? Something along these lines
from psbody.mesh import Mesh
mesh = Mesh(filename='xxxxxxxxxx.obj')
mesh.show()
Does this work?
yes, it works well. I can not generate video on ubuntu16.04, but I could do it on macos...
from voca.
I use my own wav files to run_voca.py. And I also meet a problem
Use standard file APIs to check for files with this prefix.
Traceback (most recent call last):
File "/Users/plm/app/anaconda3/envs/voca/lib/python3.6/site-packages/pyrender/platforms/pyglet_platform.py", line 32, in init_context
width=1, height=1)
File "/Users/plm/app/anaconda3/envs/voca/lib/python3.6/site-packages/pyglet/window/init.py", line 632, in init
self._create()
File "/Users/plm/app/anaconda3/envs/voca/lib/python3.6/site-packages/pyglet/window/cocoa/init.py", line 194, in create
self.context.attach(self.canvas)
File "/Users/plm/app/anaconda3/envs/voca/lib/python3.6/site-packages/pyglet/gl/cocoa.py", line 291, in attach
self.nscontext.setView(canvas.nsview)
AttributeError: 'NoneType' object has no attribute 'setView'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "run_voca.py", line 45, in
inference(tf_model_fname, ds_fname, audio_fname, template_fname, condition_idx, out_path)
File "/Users/plm/pro/voca/utils/inference.py", line 112, in inference
render_sequence_meshes(audio_fname, predicted_vertices, template, out_path)
File "/Users/plm/pro/voca/utils/inference.py", line 70, in render_sequence_meshes
img = render_mesh_helper(Mesh(sequence_vertices[i_frame], template.f), center)
File "/Users/plm/pro/voca/utils/rendering.py", line 107, in render_mesh_helper
r = pyrender.OffscreenRenderer(viewport_width=frustum['width'], viewport_height=frustum['height'])
File "/Users/plm/app/anaconda3/envs/voca/lib/python3.6/site-packages/pyrender/offscreen.py", line 31, in init
self._create()
File "/Users/plm/app/anaconda3/envs/voca/lib/python3.6/site-packages/pyrender/offscreen.py", line 134, in _create
self.platform.init_context()
File "/Users/plm/app/anaconda3/envs/voca/lib/python3.6/site-packages/pyrender/platforms/pyglet_platform.py", line 38, in init_context
'internal error message was "{}"'.format(e)
ValueError: Failed to initialize Pyglet window with an OpenGL >= 3+ context. If you're logged in via SSH, ensure that you're running your script with vglrun (i.e. VirtualGL). The internal error message was "'NoneType' object has no attribute 'setView'"
from voca.
I also met this problem... I logged with remote ssh with vglrun working well, it seems that the problem lies in rendering?
from voca.
@huybery @qianchenghao @plmsmile @tegusi by default executing run_voca.py
outputs the animated meshes AND renders the meshes to a video using pyrender. Pyrender however seems to cause problems for several different configurations (e.g. when running remotely, etc.). I don't know how to fix this issue, but the rendering itself is not essential for running VOCA, as the meshes are output anyways. As a workaround, pull the newest changes and the script with --visualize False
. This will solely output the meshes which then can be visualized or rendered with any other tool. Does this work for you?
from voca.
@huybery @qianchenghao @plmsmile @tegusi by default executing
run_voca.py
outputs the animated meshes AND renders the meshes to a video using pyrender. Pyrender however seems to cause problems for several different configurations (e.g. when running remotely, etc.). I don't know how to fix this issue, but the rendering itself is not essential for running VOCA, as the meshes are output anyways. As a workaround, pull the newest changes and the script with--visualize False
. This will solely output the meshes which then can be visualized or rendered with any other tool. Does this work for you?
Thanks! It is a workaround for generating meshes while I am still seeking a tool to visualize them, do you have any suggestion?
from voca.
I'm trying to fix this problem. I think it's a problem of pyrender. I'm looking forward to getting help.
I found a solution:
- Firstly, follow the installation guide for OSMESA here;
- Secondly, use the code from here (original visualize_sequence.py throws a segmentation fault with osmesa, so I slightly modified it).
Hope it helps!
That's really help! Thanks!
from voca.
@sultanovazamat @Changlin-Lee I replaced visualize_sequence.py
code with the deb file with osmesa installed. But I still get this kind of error(pyrender: Falied rendering frame
). Is there anything else I need to correct? Thank you.
ubuntu 18.04
cuda 10.1
from voca.
I found the answer. Just use PYOPENGL_PLATFORM=osmesa. For example:
PYOPENGL_PLATFORM=osmesa python run_voca.py
WORKS for me :D
from voca.
Related Issues (20)
- Can't find "output_graph.pb" or "gstep_52280.model" in trained model
- Missing files from training data HOT 3
- question about the learning rate decay HOT 1
- Which equipment is needed to collect data and how can I buy it? HOT 3
- Difference between generic FLAME models and VOCA-compatible FLAME models? HOT 10
- is the eye blink useful for FLame 2020 model ? HOT 3
- "video.mp4" only has speech but no images ? HOT 4
- Windows support and installing MPI-IS / mesh HOT 1
- Should --uv_template_fname be the same as --template_fname in run_voca.py?
- can you give pretrained_models?
- Initialization Of Decoder Layer
- Problem of training voca
- How to control expression in the edit_sequence.py? HOT 2
- Can I train this on custom dataset?
- Unknown mesh file format. HOT 1
- Training with new Tensorflow Version
- Unsolved reference tfbody
- Missing data on subj_seq_to_idx.pkl file HOT 1
- If I want to control the expression of the eyes, how should I set the parameters?
- I haven't found the 'output_graph.pb' file, where can I get it?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from voca.