MagicDrive
MagicDrive copied to clipboard
Question about demo/run.py show_box = true
When show_box = true in test_config.yaml
Error executing job with overrides: ['resume_from_checkpoint=/home/magicdrive-files/SDv1.5mv-rawbox_2023-09-07_18-39_224x400', '++runner.enable_xformers_memory_efficient_attention=false']
Traceback (most recent call last):
File "demo/run.py", line 69, in main
map_size=target_map_size)
File "./magicdrive/misc/test_utils.py", line 301, in run_one_batch
for bi in range(bs)
File "./magicdrive/misc/test_utils.py", line 301, in <listcomp>
for bi in range(bs)
File "./magicdrive/misc/test_utils.py", line 56, in draw_box_on_imgs
val_input['meta_data']['img_aug_matrix'][idx].data.numpy(),
File "./magicdrive/runner/box_visualizer.py", line 111, in show_box_on_views
img_out = np.asarray(Image.open(temp_path)) # ensure image is loaded
File "/opt/conda/envs/magicdrivepy37/lib/python3.7/site-packages/PIL/Image.py", line 3236, in open
fp = builtins.open(filename, "rb")
FileNotFoundError: [Errno 2] No such file or directory: '.tmp/tmprxi40ph_.png'
When show_box = false in test_config.yaml There is a problem with the loop iteration over gen_imgs_wb_list. This loop does not execute because there are no elements in gen_imgs_wb_list.
for map_img, ori_imgs, ori_imgs_wb, gen_imgs_list, gen_imgs_wb_list in zip(*return_tuples):
I deleted gen_imgs_wb_list in that line and commented code related to show_box=true, and the script("demo/run.py") can run correctly. So I think there is no problem with enviroment. I'm using the nuscenes v1.0 mini dataset, and I suspect this happened cuz not reading the files related to the 3D BOX labels in the groundtruth data.