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

EGL lib issue #23

Closed
gilbertoyw opened this issue Jul 7, 2024 · 4 comments
Closed

EGL lib issue #23

gilbertoyw opened this issue Jul 7, 2024 · 4 comments

Comments

@gilbertoyw
Copy link

Hello, thanks for sharing this code.

I've tried to run it on Windows 11 and Ubuntu 20.4, and I've got the same issue after executing the demo.py (see below). Can you help me?

(multihmr) PS C:\Users\gilbe\multi-hmr> python demo.py --img_folder example_data --out_folder demo_out --extra_views 1 --model_name multiHMR_896_L
Traceback (most recent call last):
File "C:\Users\gilbe\anaconda3\envs\multihmr\lib\site-packages\OpenGL\platform\egl.py", line 67, in EGL
return ctypesloader.loadLibrary(
File "C:\Users\gilbe\anaconda3\envs\multihmr\lib\site-packages\OpenGL\platform\ctypesloader.py", line 45, in loadLibrary
return dllType( name, mode )
File "C:\Users\gilbe\anaconda3\envs\multihmr\lib\ctypes_init_.py", line 374, in init
self._handle = _dlopen(self._name, mode)
FileNotFoundError: ("Could not find module 'EGL' (or one of its dependencies). Try using the full path with constructor syntax.", 'EGL', None)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\gilbe\multi-hmr\demo.py", line 19, in
from utils import normalize_rgb, render_meshes, get_focalLength_from_fieldOfView, demo_color as color, print_distance_on_image, render_side_views, create_scene, MEAN_PARAMS, CACHE_DIR_MULTIHMR, SMPLX_DIR
File "C:\Users\gilbe\multi-hmr\utils_init_.py", line 8, in
from .render import render_meshes, print_distance_on_image, render_side_views, create_scene, OPENCV_TO_OPENGL_CAMERA_CONVENTION
File "C:\Users\gilbe\multi-hmr\utils\render.py", line 7, in
import pyrender
File "C:\Users\gilbe\anaconda3\envs\multihmr\lib\site-packages\pyrender_init_.py", line 3, in
from .light import Light, PointLight, DirectionalLight, SpotLight
File "C:\Users\gilbe\anaconda3\envs\multihmr\lib\site-packages\pyrender\light.py", line 10, in
from OpenGL.GL import *
File "C:\Users\gilbe\anaconda3\envs\multihmr\lib\site-packages\OpenGL\GL_init_.py", line 3, in
from OpenGL import error as _error
File "C:\Users\gilbe\anaconda3\envs\multihmr\lib\site-packages\OpenGL\error.py", line 12, in
from OpenGL import platform, configflags
File "C:\Users\gilbe\anaconda3\envs\multihmr\lib\site-packages\OpenGL\platform_init
.py", line 35, in
load()
File "C:\Users\gilbe\anaconda3\envs\multihmr\lib\site-packages\OpenGL\platform_init
.py", line 32, in _load
plugin.install(globals())
File "C:\Users\gilbe\anaconda3\envs\multihmr\lib\site-packages\OpenGL\platform\baseplatform.py", line 92, in install
namespace[ name ] = getattr(self,name,None)
File "C:\Users\gilbe\anaconda3\envs\multihmr\lib\site-packages\OpenGL\platform\baseplatform.py", line 14, in get
value = self.fget( obj )
File "C:\Users\gilbe\anaconda3\envs\multihmr\lib\site-packages\OpenGL\platform\egl.py", line 93, in GetCurrentContext
return self.EGL.eglGetCurrentContext
File "C:\Users\gilbe\anaconda3\envs\multihmr\lib\site-packages\OpenGL\platform\baseplatform.py", line 14, in get
value = self.fget( obj )
File "C:\Users\gilbe\anaconda3\envs\multihmr\lib\site-packages\OpenGL\platform\egl.py", line 73, in EGL
raise ImportError("Unable to load EGL library", *err.args)
ImportError: ('Unable to load EGL library', "Could not find module 'EGL' (or one of its dependencies). Try using the full path with constructor syntax.", 'EGL', None)

@fabienbaradel
Copy link
Contributor

Hi @gilbertoyw , thanks for your interest in our work.
It seems that your code is not able to load EGL library which is used for doing the rendering in our demo code.
Please have look to this related issue.
In Ubuntu you need to install OpenGL using the following command lines.
Hope it helps,

@gilbertoyw
Copy link
Author

Thank you very much @fabienbaradel I will follow this thread.

@fabienbaradel
Copy link
Contributor

Great, since it is not directly related to Multi-HMR I am closing this issue. Feel free to ask to re-open it.
Good luck!

@chris-hndz
Copy link

chris-hndz commented Jul 9, 2024

I only commented out line 6 and it worked for me on Windows:
# os.environ["PYOPENGL_PLATFORM"] = "egl"

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