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

Possible fix for 'RuntimeError: boxes should have 4 elements in dimension 1, got 5' in test_utils.py #18

Open
pythonista-blitz opened this issue Feb 22, 2023 · 0 comments

Comments

@pythonista-blitz
Copy link

When I ran 'test.py', I encountered an error which read
# RuntimeError: boxes should have 4 elements in dimension 1, got 5.

The problem was caused by the following line in test_utils.py, line 46:
keep = nms(torch.tensor(dets_j), torch.tensor(scores_j), torch.tensor(cfg.TEST.NMS)).

I believe the issue may be resolved by changing the line to:
keep = nms(torch.tensor(boxes_j), torch.tensor(scores_j), torch.tensor(cfg.TEST.NMS))

Although I'm aware that I should submit a pull request, I have already made several changes to the code.

Thank you very much for your helpful code.

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

1 participant