Fix another instance of the same bug

This commit is contained in:
Louis Maddox 2023-04-06 11:12:04 +01:00 committed by ericmintun
parent 6325eb8512
commit b028d54358

View File

@ -357,7 +357,7 @@ class SamAutomaticMaskGenerator:
keep_by_nms = batched_nms( keep_by_nms = batched_nms(
boxes.float(), boxes.float(),
torch.as_tensor(scores), torch.as_tensor(scores),
torch.zeros(len(boxes)), # categories torch.zeros_like(boxes[:,0]), # categories
iou_threshold=nms_thresh, iou_threshold=nms_thresh,
) )