Skip to content

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

Description

@pythonista-blitz

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions