Open LiuXinqi12 opened 4 years ago
I meet the same problem
The steps as follows can solve the problem:
sudo apt update
sudo apt-get install llvm-6.0
sudo apt-get install libsm6 libxrender1 libfontconfig1 freeglut3-dev
sudo apt --fix-broken install
wget https://github.com/mmatl/travis_debs/raw/master/xenial/mesa_18.3.3-0.deb
dpkg -i ./mesa_18.3.3-0.deb || true
apt install -f
git clone https://github.com/mmatl/pyopengl.git
pip install ./pyopengl
Because of Off-screen rendering, at last, you need to change "os.environ['PYOPENGL_PLATFORM'] = 'egl'" into "os.environ['PYOPENGL_PLATFORM'] = 'osmesa'" ,
The steps as follows can solve the problem:
sudo apt update sudo apt-get install llvm-6.0 sudo apt-get install libsm6 libxrender1 libfontconfig1 freeglut3-dev sudo apt --fix-broken install
wget https://github.com/mmatl/travis_debs/raw/master/xenial/mesa_18.3.3-0.deb dpkg -i ./mesa_18.3.3-0.deb || true apt install -f git clone https://github.com/mmatl/pyopengl.git pip install ./pyopengl
Because of Off-screen rendering, at last, you need to change "os.environ['PYOPENGL_PLATFORM'] = 'egl'" into "os.environ['PYOPENGL_PLATFORM'] = 'osmesa'" ,
Hi,
Thanks a lot!
I tried this but then I got this error:
output_img = rgb[:, :, :-1] * valid_mask + (1 - valid_mask) * img
ValueError: operands could not be broadcast together with shapes (1080,1920,2) (1080,1920,3)
Any idea about this error? Deepest thanks for your reply!
@lulindeng you can change "rgb[:, :, :-1]" into "rgb[:, :, :]",the error will disappear, good luck
@lulindeng you can change "rgb[:, :, :-1]" into "rgb[:, :, :]",the error will disappear, good luck
@xiezhongzhao It works, thanks a lot!
output_img = rgb[:, :, :-1] valid_mask + (1 - valid_mask) img
changed: output_img = rgb valid_mask + (1 - valid_mask) img
good luck!
How can I fix this on centos ?
os.environ['PYOPENGL_PLATFORM'] = 'osmesa'
hi, I meet a new error:“AttributeError("'GLXPlatform' object has no attribute 'OSMesa'",)” after fixing according your solution , could you give me some advice?
operating system and the version: ubuntu 16
python version: python=3.7
pytorch version: pytorch=1.6.0
the stack trace of the error: Traceback (most recent call last): File "demo.py", line 470, in
main(args)
File "demo.py", line 311, in main
renderer = Renderer(resolution=(orig_width, orig_height), orig_img=True, wireframe=args.wireframe)
File "/home/liuxinqi/study/VIBE-master/lib/utils/renderer.py", line 65, in init
point_size=1.0
File "/home/liuxinqi/anaconda3/envs/vibe-env/lib/python3.7/site-packages/pyrender/offscreen.py", line 31, in init
self._create()
File "/home/liuxinqi/anaconda3/envs/vibe-env/lib/python3.7/site-packages/pyrender/offscreen.py", line 145, in _create
self._platform.init_context()
File "/home/liuxinqi/anaconda3/envs/vibe-env/lib/python3.7/site-packages/pyrender/platforms/egl.py", line 188, in init_context
EGL_NO_CONTEXT, context_attributes
File "/home/liuxinqi/anaconda3/envs/vibe-env/lib/python3.7/site-packages/OpenGL/platform/baseplatform.py", line 402, in call
return self( *args, **named )
File "/home/liuxinqi/anaconda3/envs/vibe-env/lib/python3.7/site-packages/OpenGL/error.py", line 232, in glCheckError
baseOperation = baseOperation,
OpenGL.error.GLError: GLError(
err = 12297,
baseOperation = eglCreateContext,
cArguments = (
<OpenGL._opaque.EGLDisplay_pointer object at 0x7f827319ac20>,
<OpenGL._opaque.EGLConfig_pointer object at 0x7f827319ab90>,
<OpenGL._opaque.EGLContext_pointer object at 0x7f82883d4320>,
<OpenGL.arrays.lists.c_int_Array_7 object at 0x7f828814c200>,
),
result = <OpenGL._opaque.EGLContext_pointer object at 0x7f828804c200>
)
It's strange that I was able to run well before, and suddenly this problem occurred. now I have tried different versions of pyrender, searched Google, and still can't solve it.