Open
Description
🐛 Describe the bug
boxes = torch.tensor([[ 2748, 618, 2830, 659],
[ 2690, 642, 2749, 681],
[ 2690, 639, 2746, 681]])
score = torch.tensor([1,1,0.5])
iou = torchvision.ops.box_iou(boxes, boxes)
index1 = torchvision.ops.nms(boxes, socre, iou_threshold=0)
index2 = torchvision.ops.nms(boxes, socre, iou_threshold=0.1)
(index1==index2).all()
when set iou_threshold=0, then index return is wrong:
i set boxes
([[ 2748, 618, 2830, 659],
[ 2690, 642, 2749, 681],
[ 2690, 639, 2746, 681]])
from ops.box_iou:
([[1.0000, 0.0030, 0.0000],
[0.0030, 1.0000, 0.8846],
[0.0000, 0.8846, 1.0000]] is normal
but when run nms with score [1,1,0.5]
get result:
tensor([0, 2])
while set iou_threshold=0.1,it return:
tensor([0, 1]) is correct
Versions
torch==2.4.1
torchvision==0.19.1
CUDA==12.1
Metadata
Metadata
Assignees
Labels
No labels
Activity