Open JJHuang127 opened 1 year ago
Have you correctly set up bop_renderer?
For me, when building the bop renderer, the file bop_renderer.cpython-37m-x86_64-linux-gnu.so was located in the 'build' folder. This is the file you'll want, so I changed the bop_renderer_path in the file ./lib/pysixd/renderer_cpp.py, line 13 (or before the import bop_renderer) like this:
bop_renderer_path = "/path/to/the/bop_renderer/build/"
and after that
sys.path.append(bop_renderer_path)
.
That worked for me.
For me, when building the bop renderer, the file bop_renderer.cpython-37m-x86_64-linux-gnu.so was located in the 'build' folder. This is the file you'll want, so I changed the bop_renderer_path in the file ./lib/pysixd/renderer_cpp.py, line 13 like this:
bop_renderer_path = "/path/to/the/bop_renderer/build/"
. That worked for me.
There is no need to change the path. Just soft linking the path to bop_renderer to the project root is fine.
Hi, Thanks for the help. I install bop_renderer correctly and softlink it to GDRNPP. but after that I got this new error about VSD when testing on T-Less with pretrained model. Is there any way to fix it?
20230227_195504|WRN|core.gdrn_modeling.engine.test_utils:load_and_print_val_scores_tab@422: output/gdrn/tless/convnext_a6_AugCosyAAEGray_BG05_mlL1_DMask_amodalClipBox_classAware_tless/inference_model_final_wo_optim/tless_bop_test_primesense/convnext-a6-AugCosyAAEGray-BG05-mlL1-DMask-amodalClipBox-classAware-tless-test-iter0_tless-test/error:vsd_ntop:-1_delta:15.000_tau:0.050 does not exist.
20230227_195504|ERR|__main__:<module>@233: An error has been caught in function '<module>', process 'MainProcess' (2293680), thread 'MainThread' (139632199861056):
Traceback (most recent call last):
> File "/home/lab/Desktop/gdrnpp_bop2022-main/./core/gdrn_modeling/main_gdrn.py", line 233, in <module>
main(args)
│ └ Namespace(config_file='/home/lab/Desktop/gdrnpp_bop2022-main/configs/gdrn/tless/convnext_a6_AugCosyAAEGray_BG05_mlL1_...
└ <function main at 0x7efd71471dc0>
File "/home/lab/Desktop/gdrnpp_bop2022-main/./core/gdrn_modeling/main_gdrn.py", line 199, in main
Lite(
└ <class '__main__.Lite'>
File "/home/lab/miniconda3/lib/python3.9/site-packages/pytorch_lightning/lite/lite.py", line 402, in _run_impl
return run_method(*args, **kwargs)
│ │ └ {}
│ └ (Namespace(config_file='/home/lab/Desktop/gdrnpp_bop2022-main/configs/gdrn/tless/convnext_a6_AugCosyAAEGray_BG05_mlL1...
└ functools.partial(<bound method LightningLite._run_with_strategy_setup of <__main__.Lite object at 0x7efd71693eb0>>, <bound m...
File "/home/lab/miniconda3/lib/python3.9/site-packages/pytorch_lightning/lite/lite.py", line 409, in _run_with_strategy_setup
return run_method(*args, **kwargs)
│ │ └ {}
│ └ (Namespace(config_file='/home/lab/Desktop/gdrnpp_bop2022-main/configs/gdrn/tless/convnext_a6_AugCosyAAEGray_BG05_mlL1...
└ <bound method Lite.run of <__main__.Lite object at 0x7efd71693eb0>>
File "/home/lab/Desktop/gdrnpp_bop2022-main/./core/gdrn_modeling/main_gdrn.py", line 183, in run
return self.do_test(cfg, model)
│ │ │ └ _LiteModule(
│ │ │ (_forward_module): GDRN_DoubleMask(
│ │ │ (backbone): FeatureListNet(
│ │ │ (stem_0): Conv2d(3, 128, kernel_size...
│ │ └ Config (path: /home/lab/Desktop/gdrnpp_bop2022-main/configs/gdrn/tless/convnext_a6_AugCosyAAEGray_BG05_mlL1_DMask_amo...
│ └ <function GDRN_Lite.do_test at 0x7efd715fe940>
└ <__main__.Lite object at 0x7efd71693eb0>
File "/home/lab/Desktop/gdrnpp_bop2022-main/core/gdrn_modeling/../../core/gdrn_modeling/engine/engine.py", line 159, in do_test
results_i = gdrn_inference_on_dataset(cfg, model, data_loader, evaluator, amp_test=cfg.TEST.AMP_TEST)
│ │ │ │ │ └ Config (path: /home/lab/Desktop/gdrnpp_bop2022-main/configs/gdrn/tless/convnext_a6_AugCosyAAEGray_BG05_mlL1_DMask_amo...
│ │ │ │ └ <core.gdrn_modeling.engine.gdrn_evaluator.GDRN_Evaluator object at 0x7efd76d5f220>
│ │ │ └ <pytorch_lightning.lite.wrappers._LiteDataLoader object at 0x7efd701310a0>
│ │ └ _LiteModule(
│ │ (_forward_module): GDRN_DoubleMask(
│ │ (backbone): FeatureListNet(
│ │ (stem_0): Conv2d(3, 128, kernel_size...
│ └ Config (path: /home/lab/Desktop/gdrnpp_bop2022-main/configs/gdrn/tless/convnext_a6_AugCosyAAEGray_BG05_mlL1_DMask_amo...
└ <function gdrn_inference_on_dataset at 0x7efd71640670>
File "/home/lab/Desktop/gdrnpp_bop2022-main/core/gdrn_modeling/../../core/gdrn_modeling/engine/gdrn_evaluator.py", line 804, in gdrn_inference_on_dataset
results = evaluator.evaluate() # results is always None
│ └ <function GDRN_Evaluator.evaluate at 0x7efd715d1550>
└ <core.gdrn_modeling.engine.gdrn_evaluator.GDRN_Evaluator object at 0x7efd76d5f220>
File "/home/lab/Desktop/gdrnpp_bop2022-main/core/gdrn_modeling/../../core/gdrn_modeling/engine/gdrn_evaluator.py", line 584, in evaluate
return self._eval_predictions()
│ └ <function GDRN_Evaluator._eval_predictions at 0x7efd715d15e0>
└ <core.gdrn_modeling.engine.gdrn_evaluator.GDRN_Evaluator object at 0x7efd76d5f220>
File "/home/lab/Desktop/gdrnpp_bop2022-main/core/gdrn_modeling/../../core/gdrn_modeling/engine/gdrn_evaluator.py", line 595, in _eval_predictions
save_and_eval_results(self.cfg, results_all, self._output_dir, obj_ids=self.obj_ids)
│ │ │ │ │ │ │ └ [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]
│ │ │ │ │ │ └ <core.gdrn_modeling.engine.gdrn_evaluator.GDRN_Evaluator object at 0x7efd76d5f220>
│ │ │ │ │ └ 'output/gdrn/tless/convnext_a6_AugCosyAAEGray_BG05_mlL1_DMask_amodalClipBox_classAware_tless/inference_model_final_wo_optim/t...
│ │ │ │ └ <core.gdrn_modeling.engine.gdrn_evaluator.GDRN_Evaluator object at 0x7efd76d5f220>
│ │ │ └ {'iter0': [{'scene_id': '1', 'im_id': 1, 'obj_id': 2, 'score': tensor(0.9654, dtype=torch.float64), 'R': [-0.9439048171043396...
│ │ └ Config (path: /home/lab/Desktop/gdrnpp_bop2022-main/configs/gdrn/tless/convnext_a6_AugCosyAAEGray_BG05_mlL1_DMask_amo...
│ └ <core.gdrn_modeling.engine.gdrn_evaluator.GDRN_Evaluator object at 0x7efd76d5f220>
└ <function save_and_eval_results at 0x7efd71640940>
File "/home/lab/Desktop/gdrnpp_bop2022-main/core/gdrn_modeling/../../core/gdrn_modeling/engine/test_utils.py", line 73, in save_and_eval_results
load_and_print_val_scores_tab(
└ <function load_and_print_val_scores_tab at 0x7efd71640f70>
File "/home/lab/Desktop/gdrnpp_bop2022-main/core/gdrn_modeling/../../core/gdrn_modeling/engine/test_utils.py", line 423, in load_and_print_val_scores_tab
raise RuntimeError("{} does not exist.".format(score_root))
└ 'output/gdrn/tless/convnext_a6_AugCosyAAEGray_BG05_mlL1_DMask_amodalClipBox_classAware_tless/inference_model_final_wo_optim/t...
RuntimeError: output/gdrn/tless/convnext_a6_AugCosyAAEGray_BG05_mlL1_DMask_amodalClipBox_classAware_tless/inference_model_final_wo_optim/tless_bop_test_primesense/convnext-a6-AugCosyAAEGray-BG05-mlL1-DMask-amodalClipBox-classAware-tless-test-iter0_tless-test/error:vsd_ntop:-1_delta:15.000_tau:0.050 does not exist.
Hi, Thanks for the help. I install bop_renderer correctly and softlink it to GDRNPP. but after that I got this new error about VSD when testing on T-Less with pretrained model. Is there any way to fix it?
20230227_195504|WRN|core.gdrn_modeling.engine.test_utils:load_and_print_val_scores_tab@422: output/gdrn/tless/convnext_a6_AugCosyAAEGray_BG05_mlL1_DMask_amodalClipBox_classAware_tless/inference_model_final_wo_optim/tless_bop_test_primesense/convnext-a6-AugCosyAAEGray-BG05-mlL1-DMask-amodalClipBox-classAware-tless-test-iter0_tless-test/error:vsd_ntop:-1_delta:15.000_tau:0.050 does not exist. 20230227_195504|ERR|__main__:<module>@233: An error has been caught in function '<module>', process 'MainProcess' (2293680), thread 'MainThread' (139632199861056): Traceback (most recent call last): > File "/home/lab/Desktop/gdrnpp_bop2022-main/./core/gdrn_modeling/main_gdrn.py", line 233, in <module> main(args) │ └ Namespace(config_file='/home/lab/Desktop/gdrnpp_bop2022-main/configs/gdrn/tless/convnext_a6_AugCosyAAEGray_BG05_mlL1_... └ <function main at 0x7efd71471dc0> File "/home/lab/Desktop/gdrnpp_bop2022-main/./core/gdrn_modeling/main_gdrn.py", line 199, in main Lite( └ <class '__main__.Lite'> File "/home/lab/miniconda3/lib/python3.9/site-packages/pytorch_lightning/lite/lite.py", line 402, in _run_impl return run_method(*args, **kwargs) │ │ └ {} │ └ (Namespace(config_file='/home/lab/Desktop/gdrnpp_bop2022-main/configs/gdrn/tless/convnext_a6_AugCosyAAEGray_BG05_mlL1... └ functools.partial(<bound method LightningLite._run_with_strategy_setup of <__main__.Lite object at 0x7efd71693eb0>>, <bound m... File "/home/lab/miniconda3/lib/python3.9/site-packages/pytorch_lightning/lite/lite.py", line 409, in _run_with_strategy_setup return run_method(*args, **kwargs) │ │ └ {} │ └ (Namespace(config_file='/home/lab/Desktop/gdrnpp_bop2022-main/configs/gdrn/tless/convnext_a6_AugCosyAAEGray_BG05_mlL1... └ <bound method Lite.run of <__main__.Lite object at 0x7efd71693eb0>> File "/home/lab/Desktop/gdrnpp_bop2022-main/./core/gdrn_modeling/main_gdrn.py", line 183, in run return self.do_test(cfg, model) │ │ │ └ _LiteModule( │ │ │ (_forward_module): GDRN_DoubleMask( │ │ │ (backbone): FeatureListNet( │ │ │ (stem_0): Conv2d(3, 128, kernel_size... │ │ └ Config (path: /home/lab/Desktop/gdrnpp_bop2022-main/configs/gdrn/tless/convnext_a6_AugCosyAAEGray_BG05_mlL1_DMask_amo... │ └ <function GDRN_Lite.do_test at 0x7efd715fe940> └ <__main__.Lite object at 0x7efd71693eb0> File "/home/lab/Desktop/gdrnpp_bop2022-main/core/gdrn_modeling/../../core/gdrn_modeling/engine/engine.py", line 159, in do_test results_i = gdrn_inference_on_dataset(cfg, model, data_loader, evaluator, amp_test=cfg.TEST.AMP_TEST) │ │ │ │ │ └ Config (path: /home/lab/Desktop/gdrnpp_bop2022-main/configs/gdrn/tless/convnext_a6_AugCosyAAEGray_BG05_mlL1_DMask_amo... │ │ │ │ └ <core.gdrn_modeling.engine.gdrn_evaluator.GDRN_Evaluator object at 0x7efd76d5f220> │ │ │ └ <pytorch_lightning.lite.wrappers._LiteDataLoader object at 0x7efd701310a0> │ │ └ _LiteModule( │ │ (_forward_module): GDRN_DoubleMask( │ │ (backbone): FeatureListNet( │ │ (stem_0): Conv2d(3, 128, kernel_size... │ └ Config (path: /home/lab/Desktop/gdrnpp_bop2022-main/configs/gdrn/tless/convnext_a6_AugCosyAAEGray_BG05_mlL1_DMask_amo... └ <function gdrn_inference_on_dataset at 0x7efd71640670> File "/home/lab/Desktop/gdrnpp_bop2022-main/core/gdrn_modeling/../../core/gdrn_modeling/engine/gdrn_evaluator.py", line 804, in gdrn_inference_on_dataset results = evaluator.evaluate() # results is always None │ └ <function GDRN_Evaluator.evaluate at 0x7efd715d1550> └ <core.gdrn_modeling.engine.gdrn_evaluator.GDRN_Evaluator object at 0x7efd76d5f220> File "/home/lab/Desktop/gdrnpp_bop2022-main/core/gdrn_modeling/../../core/gdrn_modeling/engine/gdrn_evaluator.py", line 584, in evaluate return self._eval_predictions() │ └ <function GDRN_Evaluator._eval_predictions at 0x7efd715d15e0> └ <core.gdrn_modeling.engine.gdrn_evaluator.GDRN_Evaluator object at 0x7efd76d5f220> File "/home/lab/Desktop/gdrnpp_bop2022-main/core/gdrn_modeling/../../core/gdrn_modeling/engine/gdrn_evaluator.py", line 595, in _eval_predictions save_and_eval_results(self.cfg, results_all, self._output_dir, obj_ids=self.obj_ids) │ │ │ │ │ │ │ └ [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] │ │ │ │ │ │ └ <core.gdrn_modeling.engine.gdrn_evaluator.GDRN_Evaluator object at 0x7efd76d5f220> │ │ │ │ │ └ 'output/gdrn/tless/convnext_a6_AugCosyAAEGray_BG05_mlL1_DMask_amodalClipBox_classAware_tless/inference_model_final_wo_optim/t... │ │ │ │ └ <core.gdrn_modeling.engine.gdrn_evaluator.GDRN_Evaluator object at 0x7efd76d5f220> │ │ │ └ {'iter0': [{'scene_id': '1', 'im_id': 1, 'obj_id': 2, 'score': tensor(0.9654, dtype=torch.float64), 'R': [-0.9439048171043396... │ │ └ Config (path: /home/lab/Desktop/gdrnpp_bop2022-main/configs/gdrn/tless/convnext_a6_AugCosyAAEGray_BG05_mlL1_DMask_amo... │ └ <core.gdrn_modeling.engine.gdrn_evaluator.GDRN_Evaluator object at 0x7efd76d5f220> └ <function save_and_eval_results at 0x7efd71640940> File "/home/lab/Desktop/gdrnpp_bop2022-main/core/gdrn_modeling/../../core/gdrn_modeling/engine/test_utils.py", line 73, in save_and_eval_results load_and_print_val_scores_tab( └ <function load_and_print_val_scores_tab at 0x7efd71640f70> File "/home/lab/Desktop/gdrnpp_bop2022-main/core/gdrn_modeling/../../core/gdrn_modeling/engine/test_utils.py", line 423, in load_and_print_val_scores_tab raise RuntimeError("{} does not exist.".format(score_root)) └ 'output/gdrn/tless/convnext_a6_AugCosyAAEGray_BG05_mlL1_DMask_amodalClipBox_classAware_tless/inference_model_final_wo_optim/t... RuntimeError: output/gdrn/tless/convnext_a6_AugCosyAAEGray_BG05_mlL1_DMask_amodalClipBox_classAware_tless/inference_model_final_wo_optim/tless_bop_test_primesense/convnext-a6-AugCosyAAEGray-BG05-mlL1-DMask-amodalClipBox-classAware-tless-test-iter0_tless-test/error:vsd_ntop:-1_delta:15.000_tau:0.050 does not exist.
Hi, unfortunately, I also met this issue. Have you solved it? Appreciate any comments.
For me, when building the bop renderer, the file bop_renderer.cpython-37m-x86_64-linux-gnu.so was located in the 'build' folder. This is the file you'll want, so I changed the bop_renderer_path in the file ./lib/pysixd/renderer_cpp.py, line 13 (or before the import bop_renderer) like this:
bop_renderer_path = "/path/to/the/bop_renderer/build/"
and after thatsys.path.append(bop_renderer_path)
. That worked for me.
This path can be also set in here: gdrnpp_bop2022/lib/pysixd/config.py
, line 32
Hi, I have a problem when eval the pretrained model with T-less dataset. Is there any way to fix it?
import bop_renderer ModuleNotFoundError: No module named 'bop_renderer' Traceback (most recent call last): File "/home/lab/Desktop/gdrnpp_bop2022-main/lib/pysixd/scripts/eval_pose_results_more.py", line 301, in <module> raise RuntimeError("Calculation of pose errors failed.") RuntimeError: Calculation of pose errors failed.