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

demo.py opengl errors #22

Closed
aespielberg opened this issue Oct 7, 2021 · 1 comment
Closed

demo.py opengl errors #22

aespielberg opened this issue Oct 7, 2021 · 1 comment

Comments

@aespielberg
Copy link

Hi,

Thank you for the project, it's very exciting! I'm trying to run the demo, but I am getting a weird opengl error. I tried use_opendr, but the output was just two images: one was the input image, and the other was just a black square. I presume this means opendr is not happy either, even though opendr doesn't throw an error.

Looking through the other issues, I have tried the fix here; this did not change the output AFAICT.

$ python3 demo.py --checkpoint=data/pretrained_model/PyMAF_model_checkpoint.pt --img_file examples/COCO_val2014_000000019667.jpg
INFO:OpenGL.acceleratesupport:OpenGL_accelerate module loaded
INFO:OpenGL.arrays.arraydatatype:Using accelerated ArrayDatatype
Run demo for a single input image.
INFO:models.hmr:loaded resnet50 imagenet pretrained model
Traceback (most recent call last):
  File "demo.py", line 569, in <module>
    run_image_demo(args)
  File "demo.py", line 126, in run_image_demo
    mesh_filename=save_mesh_path
  File "/home/aespielberg/ResearchCode/pinscreen/zozo/PyMAF/utils/renderer.py", line 141, in __call__
    rgb, _ = self.renderer.render(self.scene, flags=render_flags)
  File "/home/aespielberg/anaconda3/envs/pymaf/lib/python3.6/site-packages/pyrender/offscreen.py", line 102, in render
    retval = self._renderer.render(scene, flags, seg_node_map)
  File "/home/aespielberg/anaconda3/envs/pymaf/lib/python3.6/site-packages/pyrender/renderer.py", line 125, in render
    self._update_context(scene, flags)
  File "/home/aespielberg/anaconda3/envs/pymaf/lib/python3.6/site-packages/pyrender/renderer.py", line 737, in _update_context
    p._add_to_context()
  File "/home/aespielberg/anaconda3/envs/pymaf/lib/python3.6/site-packages/pyrender/primitive.py", line 324, in _add_to_context
    self._vaid = glGenVertexArrays(1)
  File "src/latebind.pyx", line 39, in OpenGL_accelerate.latebind.LateBind.__call__
  File "src/wrapper.pyx", line 314, in OpenGL_accelerate.wrapper.Wrapper.__call__
  File "src/wrapper.pyx", line 311, in OpenGL_accelerate.wrapper.Wrapper.__call__
  File "/home/aespielberg/anaconda3/envs/pymaf/lib/python3.6/site-packages/OpenGL/platform/baseplatform.py", line 401, in __call__
    if self.load():
  File "/home/aespielberg/anaconda3/envs/pymaf/lib/python3.6/site-packages/OpenGL/platform/baseplatform.py", line 390, in load
    error_checker = self.error_checker,
  File "/home/aespielberg/anaconda3/envs/pymaf/lib/python3.6/site-packages/OpenGL/platform/baseplatform.py", line 148, in constructFunction
    if (not is_core) and not self.checkExtension( extension ):
  File "/home/aespielberg/anaconda3/envs/pymaf/lib/python3.6/site-packages/OpenGL/platform/baseplatform.py", line 270, in checkExtension
    result = extensions.ExtensionQuerier.hasExtension( name )
  File "/home/aespielberg/anaconda3/envs/pymaf/lib/python3.6/site-packages/OpenGL/extensions.py", line 98, in hasExtension
    result = registered( specifier )
  File "/home/aespielberg/anaconda3/envs/pymaf/lib/python3.6/site-packages/OpenGL/extensions.py", line 105, in __call__
    if not specifier.startswith( self.prefix ):
TypeError: ('startswith first arg must be bytes or a tuple of bytes, not str', (1, array([0], dtype=uint32)))

@aespielberg
Copy link
Author

I got it working. The fix was here

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

1 participant