UniAD icon indicating copy to clipboard operation
UniAD copied to clipboard

KeyError: 'occ'

Open YANG-Deep opened this issue 1 year ago • 2 comments

Thank you for your outstanding work! I have some questions about the visualization of occupancy map. I saved result[0]['occ'] into result.pkl during evaluation, and visualized the map with render_cfg.with_occ_map=True. However, when I run the code, I find:

  1. if 'topk_query_ins_segs' in outputs[k]['occ']:
     KeyError: 'occ'
    
  2. Also when I search something named ['topk_query_ins_segs'], I found this code only occurred in /visualize/run.py so I can not visualize the occupancy map correctly.

I would appreciate it if you could tell me what is wrong with my operation and how to visualize the occformer.

YANG-Deep avatar Oct 23 '24 03:10 YANG-Deep

Hello there, I found the same problem, and I was wondering if you have found the reason for and solution to visualizing the occ map?

Ep11phany avatar Nov 06 '24 06:11 Ep11phany

@YANG-Deep Because the code removed the occ results twice, to aviod this,

  1. firstly you need comment the pop_list for occ in uniad_e2e.py.
  2. then you should set "export ENABLE_PLOT_MODE=1" before you are running your eval. See this line.

https://github.com/OpenDriveLab/UniAD/blob/255fa27a15f7315c9ca63507c0daa7e1e0c79937/projects/mmdet3d_plugin/uniad/apis/test.py#L119

zhumorui avatar Mar 08 '25 06:03 zhumorui

@YANG-Deep Hello, I also encountered the second ['topk_query_ins_segs'] issue, and in run.py, at occ_map_cur = occ_map[occ_idx, :, ::-1], there's an "index is out of bounds" error because of the difference between the scene and the agent level. How did you fix it and visualize the occ map? Thanks!!!

pupu-chenyanyan avatar Nov 16 '25 07:11 pupu-chenyanyan