hustvl / VAD

[ICCV 2023] VAD: Vectorized Scene Representation for Efficient Autonomous Driving

Home Page:https://arxiv.org/abs/2303.12077

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Why my visualization result is different from the official demo video?

yt7589 opened this issue · comments

I had downloaded the pretrained weights. I tried to run the visualization code:

python tools/analysis_tools/visualization.py --result-path test/VAD_base_stage_2/Fri_Aug__4_10_18_26_2023/pts_bbox/results_nusc.pkl --save-path work/vis_results

It gave some warning like this one:

/mnt/10t/yantao/adev/p00/VAD/projects/mmdet3d_plugin/core/bbox/structures/nuscenes_box.py:262: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use `arr[tuple(seq)]` instead of `arr[seq]`. In the future this will be interpreted as an array index, `arr[np.array(seq)]`, which will result either in an error or a different result.
  fut_coords = fut_coords[[mode_idx]]

But it could generate vis.mp4 file in the destination folder. When I played the vis.mp4 it would display something like this one:
image

My question is how to generate the video like this one:
image

Hi,
When I executed the visulation script using the checkpoint provided by the author, an error occured,
Python command: python tools/analysis_tools/visualization.py --result-path test/VAD_base_stage_2/Sat_Sep__9_02_04_54_2023/pts_bbox/results_nusc.pkl --save-path vis_results
Error:
Exception has occurred: ValueError (note: full exception trace is shown but execution is paused at: _run_module_as_main)
all the input arrays must have same number of dimensions, but the array at index 0 has 2 dimension(s) and the array at index 1 has 3 dimension(s)
File "/workspace/projects/VAD/projects/mmdet3d_plugin/core/bbox/structures/nuscenes_box.py", line 268, in render_fut_trajs_grad_color
fut_coord = np.concatenate((self.center[np.newaxis, :2], fut_coord), axis=0)
File "/workspace/projects/VAD/tools/analysis_tools/visualization.py", line 567, in visualize_sample
box.render_fut_trajs_grad_color(axes, linewidth=1, mode_idx=mode_idx, fut_ts=6, cmap='autumn')
File "/workspace/projects/VAD/tools/analysis_tools/visualization.py", line 315, in lidiar_render
visualize_sample(nusc, sample_token, gt_annotations, pred_annotations,
File "/workspace/projects/VAD/tools/analysis_tools/visualization.py", line 719, in render_sample_data
lidiar_render(sample_toekn, pred_data, out_path=out_path,
File "/workspace/projects/VAD/tools/analysis_tools/visualization.py", line 747, in
render_sample_data(sample_token_list[id],
File "/opt/conda/envs/vad/lib/python3.8/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/opt/conda/envs/vad/lib/python3.8/runpy.py", line 192, in _run_module_as_main (Current frame)
return _run_code(code, main_globals, None,
ValueError: all the input arrays must have same number of dimensions, but the array at index 0 has 2 dimension(s) and the array at index 1 has 3 dimension(s)
Have you ever met this problem? If so could you give me some suggestions to solve this problem? Thank you very much!