cosypose
cosypose copied to clipboard
Add HOPE dataset
I've integrated the HOPE dataset (https://bop.felk.cvut.cz/datasets/#HOPE) into the necessary configs and BOP scripts.
I have verified that the following scripts result in a correctly formatted BOP submission file that achieves the expected scores in the BOP evaluation server:
python -m cosypose.scripts.download --bop_dataset=hope
python -m cosypose.scripts.convert_models_to_urdf --models=hope
# manually copied trained model weights
python -m cosypose.scripts.run_bop_inference --config bop-pbr --dataset hope # added --dataset flag
python -m cosypose.scripts.run_bop20_eval_multi --result_id=bop-pbr--383758 \
--method=maskrcnn_detections/refiner/iteration=4 --convert_only
The final script (cosypose.scripts.run_bop20_eval_multi
) does currently produce an error that I would like help to resolve:
Traceback (most recent call last):
File "/home/big_white/miniconda3/envs/cosypose_SR/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/home/big_white/miniconda3/envs/cosypose_SR/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/big_white/code/cosypose_SR/cosypose/scripts/run_bop20_eval_multi.py", line 61, in <module>
main()
File "/home/big_white/code/cosypose_SR/cosypose/scripts/run_bop20_eval_multi.py", line 57, in main
print(scores_path.read_text())
File "/home/big_white/miniconda3/envs/cosypose_SR/lib/python3.7/pathlib.py", line 1216, in read_text
with self.open(mode='r', encoding=encoding, errors=errors) as f:
File "/home/big_white/miniconda3/envs/cosypose_SR/lib/python3.7/pathlib.py", line 1203, in open
opener=self._opener)
File "/home/big_white/miniconda3/envs/cosypose_SR/lib/python3.7/pathlib.py", line 1058, in _opener
return self._accessor.open(self, flags, mode)
FileNotFoundError: [Errno 2] No such file or directory: '/home/big_white/code/cosypose_SR/local_data/bop_eval_outputs/challenge2020-383758_hope-test/scores_bop19.json'
The following files need to be uploaded to the appropriate cloud drive for cosypose.scripts.download
to work correctly:
- Trained model weights (https://drive.google.com/file/d/1ohQP6jFUwlidWwko4pNz5L-ubRz6FRl5/view?usp=sharing), to allow:
python -m cosypose.scripts.download --model=detector-bop-hope-pbr--15246
python -m cosypose.scripts.download --model=coarse-bop-hope-pbr--225203
python -m cosypose.scripts.download --model=refiner-bop-hope-pbr--955392
- URDF meshes (https://drive.google.com/file/d/17A7AFh0Wc5YXQqkNnQxFCuBX4gHCZc1D/view?usp=sharing), to allow:
python -m cosypose.scripts.download --urdf_models=hope
PBR training images are not publicly available, so I have commented out the relevant settings in the HOPE config, e.g. in cosypose/bop_config.py
:
# train_pbr_ds_name=[hope.pbr]
I uploaded the network weights and urdfs in the common google drive with the other ones.
I just resolved the merge conflict that resulted from #14. I also confirmed that the following download scripts are working:
python -m cosypose.scripts.download --urdf_models=hope
python -m cosypose.scripts.download --model=detector-bop-hope-pbr--15246
python -m cosypose.scripts.download --model=coarse-bop-hope-pbr--225203
python -m cosypose.scripts.download --model=refiner-bop-hope-pbr--955392
The error mentioned in my opening comment is still unresolved. I will take another look, but @ylabbe let me know if you have any ideas for fixing it.
FileNotFoundError: [Errno 2] No such file or directory: '/home/big_white/code/cosypose_SR/local_data/bop_eval_outputs/challenge2020-383758_hope-test/scores_bop19.json'
As noted above, there is one unresolved error:
The final script (
cosypose.scripts.run_bop20_eval_multi
) does currently produce an error that I would like help to resolve:Traceback (most recent call last): File "/home/big_white/miniconda3/envs/cosypose_SR/lib/python3.7/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/home/big_white/miniconda3/envs/cosypose_SR/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/big_white/code/cosypose_SR/cosypose/scripts/run_bop20_eval_multi.py", line 61, in <module> main() File "/home/big_white/code/cosypose_SR/cosypose/scripts/run_bop20_eval_multi.py", line 57, in main print(scores_path.read_text()) File "/home/big_white/miniconda3/envs/cosypose_SR/lib/python3.7/pathlib.py", line 1216, in read_text with self.open(mode='r', encoding=encoding, errors=errors) as f: File "/home/big_white/miniconda3/envs/cosypose_SR/lib/python3.7/pathlib.py", line 1203, in open opener=self._opener) File "/home/big_white/miniconda3/envs/cosypose_SR/lib/python3.7/pathlib.py", line 1058, in _opener return self._accessor.open(self, flags, mode) FileNotFoundError: [Errno 2] No such file or directory: '/home/big_white/code/cosypose_SR/local_data/bop_eval_outputs/challenge2020-383758_hope-test/scores_bop19.json'
Is it possible that the following loop needs to be skipped when using the --convert_only
flag?
https://github.com/Simple-Robotics/cosypose/blob/f526e290baa615bea561b35da1e70dd64a3a147e/cosypose/scripts/run_bop20_eval_multi.py#L52-L57
@ylabbe, I was reminded earlier today that we hadn't merged support for the HOPE dataset into CosyPose. The only script that fails, to my knowledge, is cosypose.scripts.run_bop20_eval_multi
. Do you have any ideas why it's failing?