Open CMartinETH opened 4 months ago
Thanks for your interest and sorry for the late reply. I had errors with OpenGL before but never this specific one, could you share the exact environment you used? Just to be sure that the script actually installed the correct packages. Which OS are you using?
Thanks a lot for your work, the results from your paper look great!
I am trying to reproduce your results by running the command
python run_test.py -cp exp_data/baseline/ dataset.test.name=nocs test.mask=predicted
. Unfortunately, I am getting the following error:Traceback (most recent call last): File "/home/chris/anaconda3/envs/oryon/lib/python3.8/site-packages/OpenGL/latebind.py", line 41, in __call__ return self._finalCall( *args, **named ) TypeError: 'NoneType' object is not callable
I set up a Conda environment with your setup.sh script, had to fix some dependency / package issues there. Other than that, I added the checkpoint and result path' to the config file. But those where the only changes to the repo. Any ideas, what the issue could be here? Thanks a lot!
Hi Martin,
Do you figure it out? I got the same error here.
For training, I also got the error below, do you know how to fix this. Since I didn't find a place to obtain such a file.
@jcorsetti
I tried to reinstall the OpenGL via pip. It gives me a new error as follows:
Traceback (most recent call last): File "run_test.py", line 40, in eval_pipeline trainer.test(system, test_data, ckpt_path=args.eval.ckpt) File "/home/user/anaconda3/envs/pytorch22/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 754, in test return call._call_and_handle_interrupt( File "/home/user/anaconda3/envs/pytorch22/lib/python3.8/site-packages/pytorch_lightning/trainer/call.py", line 43, in _call_and_handle_interrupt return trainer.strategy.launcher.launch(trainer_fn, *args, trainer=trainer, kwargs) File "/home/user/anaconda3/envs/pytorch22/lib/python3.8/site-packages/pytorch_lightning/strategies/launchers/subprocess_script.py", line 105, in launch return function(*args, *kwargs) File "/home/user/anaconda3/envs/pytorch22/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 794, in _test_impl results = self._run(model, ckpt_path=ckpt_path) File "/home/user/anaconda3/envs/pytorch22/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 987, in _run results = self._run_stage() File "/home/user/anaconda3/envs/pytorch22/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1026, in _run_stage return self._evaluation_loop.run() File "/home/user/anaconda3/envs/pytorch22/lib/python3.8/site-packages/pytorch_lightning/loops/utilities.py", line 182, in _decorator return loop_run(self, args, kwargs) File "/home/user/anaconda3/envs/pytorch22/lib/python3.8/site-packages/pytorch_lightning/loops/evaluation_loop.py", line 135, in run self._evaluation_step(batch, batch_idx, dataloader_idx, dataloader_iter) File "/home/user/anaconda3/envs/pytorch22/lib/python3.8/site-packages/pytorch_lightning/loops/evaluation_loop.py", line 396, in _evaluation_step output = call._call_strategy_hook(trainer, hook_name, step_args) File "/home/user/anaconda3/envs/pytorch22/lib/python3.8/site-packages/pytorch_lightning/trainer/call.py", line 309, in _call_strategy_hook output = fn(args, *kwargs) File "/home/user/anaconda3/envs/pytorch22/lib/python3.8/site-packages/pytorch_lightning/strategies/strategy.py", line 425, in test_step return self.lightning_module.test_step(args, *kwargs) File "/home/user/Desktop/oryon/pipeline.py", line 325, in test_step self.evaluator.register_test({ File "/home/user/Desktop/oryon/utils/evaluator.py", line 292, in register_test self.register_eval(results, clear) File "/home/user/Desktop/oryon/utils/evaluator.py", line 283, in register_eval vsd_errs = vsd(pred_r, pred_t, gt_r, gt_t, depth, camera.reshape(3,3), self.vsd_delta, self.vsd_taus, True, obj_diam, self.renderer, cls_id) File "/home/user/Desktop/oryon/bop_toolkit_lib/pose_error.py", line 42, in vsd depth_est = renderer.render_object( File "/home/user/Desktop/oryon/bop_toolkit_lib/renderer_vispy.py", line 538, in render_object self.on_draw(obj_id, mat_model, mat_view, mat_proj, clear=clear) File "/home/user/Desktop/oryon/bop_toolkit_lib/renderer_vispy.py", line 561, in on_draw self.depth = self._draw_depth(obj_id, mat_model, mat_view, mat_proj) File "/home/user/Desktop/oryon/bop_toolkit_lib/renderer_vispy.py", line 603, in _draw_depth program.draw("triangles", self.index_buffers[obj_id]) File "/home/user/anaconda3/envs/pytorch22/lib/python3.8/site-packages/vispy/gloo/program.py", line 543, in draw canvas.context.flush_commands() File "/home/user/anaconda3/envs/pytorch22/lib/python3.8/site-packages/vispy/gloo/context.py", line 172, in flush_commands self.glir.flush(self.shared.parser) File "/home/user/anaconda3/envs/pytorch22/lib/python3.8/site-packages/vispy/gloo/glir.py", line 584, in flush self._shared.flush(parser) File "/home/user/anaconda3/envs/pytorch22/lib/python3.8/site-packages/vispy/gloo/glir.py", line 506, in flush parser.parse(self._filter(self.clear(), parser)) File "/home/user/anaconda3/envs/pytorch22/lib/python3.8/site-packages/vispy/gloo/glir.py", line 824, in parse self._parse(command) File "/home/user/anaconda3/envs/pytorch22/lib/python3.8/site-packages/vispy/gloo/glir.py", line 804, in _parse ob.link_program(args) File "/home/user/anaconda3/envs/pytorch22/lib/python3.8/site-packages/vispy/gloo/glir.py", line 1127, in link_program self._unset_variables = self._get_active_attributes_and_uniforms() File "/home/user/anaconda3/envs/pytorch22/lib/python3.8/site-packages/vispy/gloo/glir.py", line 1148, in _get_active_attributes_and_uniforms name, size, gtype = func(self._handle, i) File "/home/user/anaconda3/envs/pytorch22/lib/python3.8/site-packages/vispy/gloo/gl/_pyopengl2.py", line 90, in glGetActiveAttrib name, size, type = GL.glGetActiveAttrib(program, index, bufSize=bufsize) File "src/latebind.pyx", line 39, in OpenGL_accelerate.latebind.LateBind.call TypeError: call() got an unexpected keyword argument 'bufSize
@plusgrey the FileNotFoundError should have been fixed with a commit I did a couple of months ago. About the OpenGL error, I previously got this, I think it's due to a mismatch between the GL library on the system and PyOpenGL. I fixed it by reinstalling a different version a few times, but it's quite annoying and I could't find a precise way to solve this.
This issue on the vispy repository seems to be related though: https://github.com/vispy/vispy/issues/1838, I suggest to have a look at this.
In the meantime, as a workaround you can change this line to avoid the computation of VSD, which is triggering the error:
self.evaluator = Evaluator(args.exp_tag, compute_vsd=True)
on line 41 of oryon/pipeline.py. Just set compute_vsd=False and it should work. However in this way the evaluator will not compute the VSD metric.
@plusgrey the FileNotFoundError should have been fixed with a commit I did a couple of months ago. About the OpenGL error, I previously got this, I think it's due to a mismatch between the GL library on the system and PyOpenGL. I fixed it by reinstalling a different version a few times, but it's quite annoying and I could't find a precise way to solve this.
This issue on the vispy repository seems to be related though: vispy/vispy#1838, I suggest to have a look at this.
In the meantime, as a workaround you can change this line to avoid the computation of VSD, which is triggering the error:
self.evaluator = Evaluator(args.exp_tag, compute_vsd=True)
on line 41 of oryon/pipeline.py. Just set compute_vsd=False and it should work. However in this way the evaluator will not compute the VSD metric.
Thanks for your prompt response, I have solved this problem by reinstall the whole environment and add the following line on the run_test.py
import resource
rlimit = resource.getrlimit(resource.RLIMIT_NOFILE)
resource.setrlimit(resource.RLIMIT_NOFILE, (4096, rlimit[1]))
However, when I tried to test the model on TyoL datasets, it tells me that there is no such a file ‘data/tyol/models_bop/models_name.json'. I have checked the official BOP website and your release oryon_data.zip, I didn't find it. Could you please help me with this? Thanks so much.
Thanks @plusgrey, that's a nice workaround! You are right about the missing file on TOYL dataset. I just updated the release, you should find models_name.json in the updated oryon_data.zip, in the toyl folder. Make sure to also pull repo version, I changed one of the file with the location of the object names json file. Let me know if other problems arise.
Thanks a lot for your work, the results from your paper look great!
I am trying to reproduce your results by running the command
python run_test.py -cp exp_data/baseline/ dataset.test.name=nocs test.mask=predicted
. Unfortunately, I am getting the following error:I set up a Conda environment with your setup.sh script, had to fix some dependency / package issues there. Other than that, I added the checkpoint and result path' to the config file. But those where the only changes to the repo. Any ideas, what the issue could be here? Thanks a lot!