ROMP: Can't run demo with provided instructions

Hi there,

Really awesome work. Unfortunately, it can’t run with the provided instructions. Trying to sh run.sh results in multiple errors.

First:

----------------
Traceback (most recent call last):
  File "core/test.py", line 2, in <module>
    from base import *
  File "/home/jb/Documents/python/CenterHMR/src/core/base.py", line 20, in <module>
    from dataset.mixed_dataset import SingleDataset
  File "/home/jb/Documents/python/CenterHMR/src/dataset/mixed_dataset.py", line 5, in <module>
    from dataset.internet import Internet
  File "/home/jb/Documents/python/CenterHMR/src/dataset/internet.py", line 9, in <module>
    import smplx
ModuleNotFoundError: No module named 'smplx'

I installed smplx from here: https://github.com/vchoutas/smplx

Next:

----------------
In Ubuntu, using osmesa mode for rendering
Traceback (most recent call last):
  File "/home/jb/anaconda3/envs/centerhmr/lib/python3.7/site-packages/OpenGL/platform/osmesa.py", line 25, in GL
    mode=ctypes.RTLD_GLOBAL 
  File "/home/jb/anaconda3/envs/centerhmr/lib/python3.7/site-packages/OpenGL/platform/ctypesloader.py", line 45, in loadLibrary
    return dllType( name, mode )
  File "/home/jb/anaconda3/envs/centerhmr/lib/python3.7/ctypes/__init__.py", line 364, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: ('OSMesa: cannot open shared object file: No such file or directory', 'OSMesa', None)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "core/test.py", line 2, in <module>
    from base import *
  File "/home/jb/Documents/python/CenterHMR/src/core/base.py", line 21, in <module>
    from visualization.visualization import Visualizer
  File "/home/jb/Documents/python/CenterHMR/src/visualization/visualization.py", line 15, in <module>
    from .renderer import get_renderer
  File "/home/jb/Documents/python/CenterHMR/src/visualization/renderer.py", line 19, in <module>
    import pyrender
  File "/home/jb/anaconda3/envs/centerhmr/lib/python3.7/site-packages/pyrender/__init__.py", line 3, in <module>
    from .light import Light, PointLight, DirectionalLight, SpotLight
  File "/home/jb/anaconda3/envs/centerhmr/lib/python3.7/site-packages/pyrender/light.py", line 10, in <module>
    from OpenGL.GL import *
  File "/home/jb/anaconda3/envs/centerhmr/lib/python3.7/site-packages/OpenGL/GL/__init__.py", line 3, in <module>
    from OpenGL import error as _error
  File "/home/jb/anaconda3/envs/centerhmr/lib/python3.7/site-packages/OpenGL/error.py", line 12, in <module>
    from OpenGL import platform, _configflags
  File "/home/jb/anaconda3/envs/centerhmr/lib/python3.7/site-packages/OpenGL/platform/__init__.py", line 35, in <module>
    _load()
  File "/home/jb/anaconda3/envs/centerhmr/lib/python3.7/site-packages/OpenGL/platform/__init__.py", line 32, in _load
    plugin.install(globals())
  File "/home/jb/anaconda3/envs/centerhmr/lib/python3.7/site-packages/OpenGL/platform/baseplatform.py", line 92, in install
    namespace[ name ] = getattr(self,name,None)
  File "/home/jb/anaconda3/envs/centerhmr/lib/python3.7/site-packages/OpenGL/platform/baseplatform.py", line 14, in __get__
    value = self.fget( obj )
  File "/home/jb/anaconda3/envs/centerhmr/lib/python3.7/site-packages/OpenGL/platform/osmesa.py", line 66, in GetCurrentContext
    function = self.OSMesa.OSMesaGetCurrentContext
  File "/home/jb/anaconda3/envs/centerhmr/lib/python3.7/site-packages/OpenGL/platform/baseplatform.py", line 14, in __get__
    value = self.fget( obj )
  File "/home/jb/anaconda3/envs/centerhmr/lib/python3.7/site-packages/OpenGL/platform/osmesa.py", line 60, in OSMesa
    def OSMesa( self ): return self.GL
  File "/home/jb/anaconda3/envs/centerhmr/lib/python3.7/site-packages/OpenGL/platform/baseplatform.py", line 14, in __get__
    value = self.fget( obj )
  File "/home/jb/anaconda3/envs/centerhmr/lib/python3.7/site-packages/OpenGL/platform/osmesa.py", line 28, in GL
    raise ImportError("Unable to load OpenGL library", *err.args)
ImportError: ('Unable to load OpenGL library', 'OSMesa: cannot open shared object file: No such file or directory', 'OSMesa', None)

I had to install Mesa using the instructions from PyRender: https://pyrender.readthedocs.io/en/latest/install/

Next:

Traceback (most recent call last):
  File "core/test.py", line 50, in <module>
    main()
  File "core/test.py", line 46, in main
    demo.run(demo_image_folder)
  File "core/test.py", line 20, in run
    self.visualizer = Visualizer(model_type=self.model_type,resolution =vis_size, input_size=self.input_size, result_img_dir = test_save_dir,with_renderer=True)
  File "/home/jb/Documents/python/CenterHMR/src/visualization/visualization.py", line 23, in __init__
    self.renderer = get_renderer(model_type=model_type,resolution=self.resolution)
  File "/home/jb/Documents/python/CenterHMR/src/visualization/renderer.py", line 138, in get_renderer
    renderer = Renderer(faces,resolution=resolution[:2])
  File "/home/jb/Documents/python/CenterHMR/src/visualization/renderer.py", line 69, in __init__
    point_size=1.0)
  File "/home/jb/anaconda3/envs/centerhmr/lib/python3.7/site-packages/pyrender/offscreen.py", line 31, in __init__
    self._create()
  File "/home/jb/anaconda3/envs/centerhmr/lib/python3.7/site-packages/pyrender/offscreen.py", line 149, in _create
    self._platform.init_context()
  File "/home/jb/anaconda3/envs/centerhmr/lib/python3.7/site-packages/pyrender/platforms/osmesa.py", line 19, in init_context
    from OpenGL.osmesa import (
ImportError: cannot import name 'OSMesaCreateContextAttribs' from 'OpenGL.osmesa' (/home/jb/anaconda3/envs/centerhmr/lib/python3.7/site-packages/OpenGL/osmesa/__init__.py)

This one stumped me, couldn’t get it to work. Maybe my Mesa installation is still not correct?

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 20 (10 by maintainers)

Commits related to this issue

Most upvoted comments

Q-Q. Sorry, this is out of my knowledge. Please consider to put this issue on vedo github. Don’t bother I have put it on here

Hi, wanna ask you a question. Do u know how to show video frame by frame but also in vedo with interactive mode on?

Something like I can switch the camera angle while predict realtime on videos.

Please try to simply use : os.environ['PYOPENGL_PLATFORM'] = 'egl' like this.