-
Notifications
You must be signed in to change notification settings - Fork 413
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MeanAveragePrecision: Skip box conversion if no boxes are present (#1097
) * Skip box conversion if no boxes are present The `box_convert` function from torchvision expects the input to be a Tensor[N, 4], where N > 0. Should N == 0 and in_fmt != out_fmt, `unbind` will error out on the boxes tensor during the conversion process. The workaround is, therefore to skip the box conversion if boxes is an empty tensor. Co-authored-by: Jirka Borovec <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Jirka <[email protected]>
- Loading branch information
1 parent
203ab6b
commit d29919c
Showing
3 changed files
with
62 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters