Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about demo/run.py show_box = true #31

Closed
axxx-xxxa opened this issue May 7, 2024 · 2 comments
Closed

Question about demo/run.py show_box = true #31

axxx-xxxa opened this issue May 7, 2024 · 2 comments

Comments

@axxx-xxxa
Copy link

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.

@flymin
Copy link
Member

flymin commented May 22, 2024

Yes, it seems there are some bugs here. However, it does not affect the major functionality, and I do not have time to fix them.

PR is welcome. Thanks.

flymin added a commit that referenced this issue Jun 1, 2024
@flymin
Copy link
Member

flymin commented Jun 1, 2024

I have solved the issue when show_box=false. However, it is unclear what causes the first case in your issue. Please provide more context like the command version of bevfusion.

I will close it for now. If you have any follow-ups, please feel free to re-open.

@flymin flymin closed this as completed Jun 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants