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

error in box correlation process. #9

Open
Mollylulu opened this issue Oct 21, 2023 · 3 comments
Open

error in box correlation process. #9

Mollylulu opened this issue Oct 21, 2023 · 3 comments

Comments

@Mollylulu
Copy link

Hi there, thanks for sharing the code.

I've been trying to run the evaluation using the provided checkpoint, but encountered an error in the box correlation process. Here is the error message:

MV2D/mmdet3d_plugin/models/roi_heads/utils/box_correlation.py", line 353, in epipolar_in_box
    t_rois_xymax = t_points_xymax.max(1)[0]
RuntimeError: cannot perform reduction function max on tensor with no elements because the operation does not have an identity

I was wondering if you've come across this error during your testing, and if so, do you have any suggestions on how to resolve it?
Thanks in advance.

@wangzt-halo
Copy link
Collaborator

It seems like the first dimension of t_points_xymax is 0. I think you can add a dimension check before box_correlation if you encounter this issue.

@Mollylulu
Copy link
Author

Indeed, t_points_xymax is empty. I encountered this issue while using the provided checkpoint and code for evaluation. Have you come across this problem too, and if so, do you happen to know a solution?

@wangzt-halo
Copy link
Collaborator

wangzt-halo commented Nov 3, 2023

Indeed, t_points_xymax is empty. I encountered this issue while using the provided checkpoint and code for evaluation. Have you come across this problem too, and if so, do you happen to know a solution?

I haven't met this issue so far, but I think you can try to add the code below at Line 304 to see if it works.
If you encounter any problems, please let me know.

if not epipolar_in_rois.any():
    corr = rois.new_zeros((num_rois, 0), dtype=torch.int64)
    mask = rois.new_zeros((num_rois, 0), dtype=torch.bool)
    return corr, mask

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