thodan / bop_toolkit

A Python toolkit of the BOP benchmark for 6D object pose estimation.
http://bop.felk.cvut.cz
MIT License
376 stars 135 forks source link

model info and gt masks errors #58

Closed bnespoulous closed 2 years ago

bnespoulous commented 2 years ago

Hi there,

I'm trying to rebuild a dataset similar to those of the BOP challenge. For that I generated synthetic images with BlenderProc and now I try to generate the json files I need and the masks. Before executing these scripts on my dataset, i run it on T-LESS dataset to make sure I can use his scripts. After running two scripts, I get the following errors that I can't solve:

8/10|09:00:09: Initializing renderer... [w] Backend (<module 'glumpy.app.window.backends.backend_glfw' from '/home/imr/.local/lib/python3.8/site-packages/glumpy/app/window/backends/backend_glfw.py'>) not available [w] Backend (<module 'glumpy.app.window.backends.backend_pyglet' from '/home/imr/.local/lib/python3.8/site-packages/glumpy/app/window/backends/backend_pyglet.py'>) not available [w] Backend (<module 'glumpy.app.window.backends.backend_sdl' from '/home/imr/.local/lib/python3.8/site-packages/glumpy/app/window/backends/backend_sdl.py'>) not available [w] Backend (<module 'glumpy.app.window.backends.backend_sdl2' from '/home/imr/.local/lib/python3.8/site-packages/glumpy/app/window/backends/backend_sdl2.py'>) not available [w] Backend (<module 'glumpy.app.window.backends.backend_osxglut' from '/home/imr/.local/lib/python3.8/site-packages/glumpy/app/window/backends/backend_osxglut.py'>) not available [w] Backend (<module 'glumpy.app.window.backends.backend_freeglut' from '/home/imr/.local/lib/python3.8/site-packages/glumpy/app/window/backends/backend_freeglut.py'>) not available 8/10|09:00:12: Calculating masks - dataset: tless (train, pbr), scene: 0, im: 0 QOpenGLContext::swapBuffers() called with non-exposed window, behavior is undefined

8/10|08:53:40: Processing model of object 1... Traceback (most recent call last): File "scripts/calc_model_info.py", line 40, in size = map(float, (model['pts'].max(axis=0) - ref_pt).flatten()) TypeError: unsupported operand type(s) for -: 'float' and 'map'

Has anyone encountered this kind of error before, or would know how to fix it?

bnespoulous commented 2 years ago

for the masks it is an error during the installation on the two following modules: apt-get install freetype apt-get install libglfw3

bnespoulous commented 2 years ago

for the model info I changed:

ref_pt = map(float, model['pts'].min(axis=0).flatten()) size = map(float, (model['pts'].max(axis=0) - ref_pt).flatten())

by:

ref_pt = model['pts'].min(axis=0).flatten()
size =(model['pts'].max(axis=0) - ref_pt)

and I have good results