Traceback (most recent call last): File "/home/cyl/.conda/envs/cosypose/lib/python3.7/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/home/cyl/.conda/envs/cosypose/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/cyl/cosypose/cosypose/scripts/run_cosypose_eval.py", line 491, in <module> main() File "/home/cyl/cosypose/cosypose/scripts/run_cosypose_eval.py", line 332, in main scene_ds = make_scene_dataset(ds_name) File "/home/cyl/cosypose/cosypose/datasets/datasets_cfg.py", line 68, in make_scene_dataset ids.append(np.where(mask)[0].item()) ValueError: can only convert an array of size 1 to a Python scalar
添加debug输出,得到
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Debug - scene_id: 48, view_id: 1 Debug - mask matches: 1 Debug - where result shape: (1,), values: [225] Debug - scene_id: 48, view_id: 36 Debug - mask matches: 1 Debug - where result shape: (1,), values: [226] Debug - scene_id: 48, view_id: 47 Debug - mask matches: 1 Debug - where result shape: (1,), values: [227] Debug - scene_id: 48, view_id: 83 Debug - mask matches: 1 Debug - where result shape: (1,), values: [228] Debug - scene_id: 48, view_id: 112 Debug - mask matches: 1 Debug - where result shape: (1,), values: [229] Debug - scene_id: 48, view_id: 135 Debug - mask matches: 0 Debug - where result shape: (0,), values: [] 0:00:00.912023 - Expected exactly one match, got 0 matches for scene_id=48, view_id=135