mmdetection3d icon indicating copy to clipboard operation
mmdetection3d copied to clipboard

can't visualize fcos3d test result

Open isco-a opened this issue 1 year ago • 5 comments

When I use --show --show-dir to visualize the test results, I get the following error.

UnboundLocalError: local variable 'img_path' referenced before assignment

in mmdetection3d/mmdet3d/engine/hooks/visualization_hook.py", line 181, in after_test_iter out_file = osp.basename(img_path)

should i change or add something?

isco-a avatar Apr 19 '23 08:04 isco-a

@isco-a Hi, thanks for your feedback. The img_path keys are under one camera view key, such as 'CAM_FRONT', under the key images. You could modify it accordingly. We'll fix it soon.

JingweiZhang12 avatar Apr 21 '23 02:04 JingweiZhang12

@JingweiZhang12 thanks for your comments

i added img_path keys in PackDet3DInputs here: https://github.com/open-mmlab/mmdetection3d/blob/main/configs/fcos3d/fcos3d_r101-caffe-dcn_fpn_head-gn_8xb2-1x_nus-mono3d.py#L41

dict(type='Pack3DDetInputs', keys=['img','img_path']) like this but it has same error

When the smoke_dla34_dlaneck_gn-all_4xb8-6x_kitti-mono3d algorithm is executed, it works without problems.

The difference between smoke and fcos3d is that smoke has img_path in data_sample here: https://github.com/open-mmlab/mmdetection3d/blob/4ff136163ee4e6436e7f5c44f73c4a4932aa7657/mmdet3d/engine/hooks/visualization_hook.py#L148 , but fcos3d does not.

isco-a avatar Apr 21 '23 03:04 isco-a

Same here.

bbzh avatar Apr 23 '23 16:04 bbzh

same here but DETR3D in nuScenes dataset

ZitengXue avatar Sep 25 '23 14:09 ZitengXue

same here

WYHunstoppable avatar Dec 22 '23 13:12 WYHunstoppable