Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't visualization with vis_snapshot.py #28

Closed
bruinxiong opened this issue Jun 22, 2021 · 6 comments
Closed

Can't visualization with vis_snapshot.py #28

bruinxiong opened this issue Jun 22, 2021 · 6 comments

Comments

@bruinxiong
Copy link

Thanks to this fabulous work. However, when l use vis_snapshot.py to visualize smpl parameters of People-Snapshot, I get the following error:
/app/tools$ python vis_snapshot.py
INFO - 2021-06-22 15:08:19,340 - acceleratesupport - OpenGL_accelerate module loaded
INFO - 2021-06-22 15:08:19,345 - arraydatatype - Using accelerated ArrayDatatype
Traceback (most recent call last):
File "vis_snapshot.py", line 84, in
renderer = Renderer(height=1080, width=1080, faces=faces)
File "/app/tools/snapshot_smpl/renderer.py", line 23, in init
self.renderer = pyrender.OffscreenRenderer(height, width)
File "/home/linxiong/miniconda/lib/python3.8/site-packages/pyrender/offscreen.py", line 31, in init
self._create()
File "/home/linxiong/miniconda/lib/python3.8/site-packages/pyrender/offscreen.py", line 149, in _create
self._platform.init_context()
File "/home/linxiong/miniconda/lib/python3.8/site-packages/pyrender/platforms/pyglet_platform.py", line 50, in init_context
self._window = pyglet.window.Window(config=conf, visible=False,
File "/home/linxiong/miniconda/lib/python3.8/site-packages/pyglet/window/xlib/init.py", line 171, in init
super(XlibWindow, self).init(*args, **kwargs)
File "/home/linxiong/miniconda/lib/python3.8/site-packages/pyglet/window/init.py", line 575, in init
display = pyglet.canvas.get_display()
File "/home/linxiong/miniconda/lib/python3.8/site-packages/pyglet/canvas/init.py", line 95, in get_display
return Display()
File "/home/linxiong/miniconda/lib/python3.8/site-packages/pyglet/canvas/xlib.py", line 123, in init
raise NoSuchDisplayException('Cannot connect to "%s"' % name)
pyglet.canvas.xlib.NoSuchDisplayException: Cannot connect to "None"

How to solve it ? I find some solutions via google, but all don't work.
Thanks!

@bruinxiong
Copy link
Author

I run this code in docker container.

@pengsida
Copy link
Member

This visualization code requires the computer to have a display.

@bruinxiong
Copy link
Author

@pengsida Thank you for your reply. Of course, I connect a display. I have solved the visulization issues caused by PyOpenGL, pyglet and freeglut3. By the way, I found that if I use Dockerfile to build docker image, after run the container, maybe the unknown device type error from spconv library will be reported. This issue may relate to the version of spconv, CUDA, Pytorch and even python. So, if some guys meet this issue like me. Please refer those links ( traveller59/spconv#58, traveller59/spconv#152) to solve. In other words, change to lower version of spconv, such as v.1.0 not v.1.2.1 in spconv.sh and modify the Dockerfile to build the available image with corresponding version of cuda, cudnn and pytorch.

@bruinxiong
Copy link
Author

Furthermore, if some guys meet the error like me for vis_snapshot.py and render_mesh.py as following:
libGL error: No matching fbConfigs or visuals found libGL error: failed to load driver: swrast
you may refer to this link (jessfraz/dockerfiles#253), maybe it will help you to solve the issue.

@pengsida
Copy link
Member

Thank you!

@zshyang
Copy link

zshyang commented May 23, 2022

@pengsida Thank you for your reply. Of course, I connect a display. I have solved the visulization issues caused by PyOpenGL, pyglet and freeglut3. By the way, I found that if I use Dockerfile to build docker image, after run the container, maybe the unknown device type error from spconv library will be reported. This issue may relate to the version of spconv, CUDA, Pytorch and even python. So, if some guys meet this issue like me. Please refer those links ( traveller59/spconv#58, traveller59/spconv#152) to solve. In other words, change to lower version of spconv, such as v.1.0 not v.1.2.1 in spconv.sh and modify the Dockerfile to build the available image with corresponding version of cuda, cudnn and pytorch.

Hi @bruinxiong , how do you solve the no display issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants