Skip to content

Commit

Permalink
πŸ› [Fix] wrong filter_duplicates argument
Browse files Browse the repository at this point in the history
The filter_duplicates() function should receive the topk_targets instead of the iou_mat as its first argument.
  • Loading branch information
Adamusen authored Nov 7, 2024
1 parent 959b9b0 commit dd53dfb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion yolo/utils/bounding_box_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ def __call__(self, target: Tensor, predict: Tuple[Tensor]) -> Tuple[Tensor, Tens
topk_targets, topk_mask = self.filter_topk(target_matrix, topk=self.topk)

# delete one anchor pred assign to mutliple gts
unique_indices, valid_mask, topk_mask = self.filter_duplicates(iou_mat, topk_mask)
unique_indices, valid_mask, topk_mask = self.filter_duplicates(topk_targets, topk_mask)

align_bbox = torch.gather(target_bbox, 1, unique_indices.repeat(1, 1, 4))
align_cls = torch.gather(target_cls, 1, unique_indices).squeeze(-1)
Expand Down

0 comments on commit dd53dfb

Please sign in to comment.