We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9024472 commit 8b350ceCopy full SHA for 8b350ce
torchvision/models/detection/roi_heads.py
@@ -698,7 +698,8 @@ def postprocess_detections(
698
labels = labels.view(1, -1).expand_as(scores)
699
700
# remove predictions with the background label
701
- boxes = boxes[:, 1:]
+ boxes = boxes.reshape(-1, num_classes, 4)
702
+ boxes = boxes[..., 1:, :]
703
scores = scores[:, 1:]
704
labels = labels[:, 1:]
705
0 commit comments