GDR-Net
GDR-Net copied to clipboard
Too many bugs when run lm_pbr_1_gen_xyz_crop, could you upload the xyz_crop of lm_pbr?
python tools/lm/lm_pbr_1_gen_xyz_crop.py
using egl
split: train selected scene ids: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49]
0%| | 0/50 [00:00<?, ?it/s, train_all]split: train scene: 0
0%| | 0/1000 [00:00<?, ?it/s, 0]
0%| | 0/50 [00:00<?, ?it/s, train_all]
Traceback (most recent call last):
File "/home/object-pose-detection/GDR-Net/tools/lm/lm_pbr_1_gen_xyz_crop.py", line 230, in <module>
xyz_gen.main()
File "/home/object-pose-detection/GDR-Net/tools/lm/lm_pbr_1_gen_xyz_crop.py", line 139, in main
bgr_gl, depth_gl = self.get_renderer().render(render_obj_id, IM_W, IM_H, K, R, t, near, far)
File "/home/object-pose-detection/GDR-Net/tools/lm/lm_pbr_1_gen_xyz_crop.py", line 100, in get_renderer
self.renderer = Renderer(
File "/home/object-pose-detection/GDR-Net/tools/lm/../../lib/meshrenderer/meshrenderer_phong.py", line 23, in __init__
self._fbo = gu.Framebuffer(
File "/home/object-pose-detection/GDR-Net/tools/lm/../../lib/meshrenderer/gl_utils/fbo.py", line 19, in __init__
glNamedFramebufferTexture(self.__id, k, attachement.id, 0)
File "/home/object-pose-detection/GDR-Net/env/lib/python3.9/site-packages/OpenGL/platform/baseplatform.py", line 415, in __call__
return self( *args, **named )
ctypes.ArgumentError: argument 1: <class 'TypeError'>: wrong type
Adding some details with respect to the issue title
PyOpenGL==3.1.5
Cython==0.29.27
Possibly related issue: https://github.com/THU-DA-6D-Pose-Group/GDR-Net/issues/28
@AlbertoRemus have you solved this? ctypes.ArgumentError: argument 1: <class 'TypeError'>: wrong type
I tried export 'export PYOPENGL_PLATFORM='egl'' but it is also already supported by the script so I assume that is not the error
@AlbertoRemus , @wangg12 could you please provide some help here?
I installed PyOpenGL
(venv) (base) hannah@hsworkstation:~/Documents/GitHub/GDR-Net$ python tools/lm/lm_pbr_1_gen_xyz_crop.py
using egl
split: train selected scene ids: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49]
0%| | 0/50 [00:00<?, ?it/s, train_all]split: train scene: 0
0%| | 0/1000 [00:00<?, ?it/s, 0]
0%| | 0/50 [00:00<?, ?it/s, train_all]
Traceback (most recent call last):
File "tools/lm/lm_pbr_1_gen_xyz_crop.py", line 230, in <module>
xyz_gen.main()
File "tools/lm/lm_pbr_1_gen_xyz_crop.py", line 139, in main
bgr_gl, depth_gl = self.get_renderer().render(render_obj_id, IM_W, IM_H, K, R, t, near, far)
File "tools/lm/lm_pbr_1_gen_xyz_crop.py", line 100, in get_renderer
self.renderer = Renderer(
File "/home/hannah/Documents/GitHub/GDR-Net/tools/lm/../../lib/meshrenderer/meshrenderer_phong.py", line 23, in __init__
self._fbo = gu.Framebuffer(
File "/home/hannah/Documents/GitHub/GDR-Net/tools/lm/../../lib/meshrenderer/gl_utils/fbo.py", line 19, in __init__
glNamedFramebufferTexture(self.__id, k, attachement.id, 0)
File "/home/hannah/Documents/GitHub/GDR-Net/venv/lib/python3.8/site-packages/OpenGL/platform/baseplatform.py", line 415, in __call__
return self( *args, **named )
ctypes.ArgumentError: argument 1: <class 'TypeError'>: wrong type
Hi @HannahHaensen ,
As far as I managed to understand it is a problem solvable through a proper cast as in https://github.com/AlbertoRemus/GDR-Net/commit/984b9542b5b719c8a6e00f31c2c414b2dcfd5da6
The related OpenGL API to have an idea of the correct input types can be found by searching the involved functions at: https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glBufferStorage.xhtml
I'm not an OpenGL expert so if anyone has further insights is more than welcome
@AlbertoRemus thank you! Yeah the type issue I identified as well, but I stuck at fixing it. I will try your solution. Thank you very much!
@AlbertoRemus @HannahHaensen Have you solved this? I am also troubled by this question
ctypes.ArgumentError: argument 1: <class 'TypeError'>: wrong type
I don't have that problem anymore by using python=3.6.