Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 13, 2024
1 parent 6a929e2 commit 1515047
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions kornia/models/detector/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ def forward(self, boxes: Tensor, confidence_threshold: Optional[Tensor] = None)
filtered_boxes = []
filtered_boxes = cast(list[Tensor], filtered_boxes)
for i in range(boxes.shape[0]):
box = boxes[i][
(boxes[i, :, 1] > confidence_threshold).unsqueeze(-1).expand_as(boxes[i])
]
box = boxes[i][(boxes[i, :, 1] > confidence_threshold).unsqueeze(-1).expand_as(boxes[i])]
filtered_boxes.append(box.view(-1, boxes.shape[-1]))

return filtered_boxes
Expand Down

0 comments on commit 1515047

Please sign in to comment.