Skip to content

Commit

Permalink
fix export bug
Browse files Browse the repository at this point in the history
  • Loading branch information
JSabadin committed Jan 16, 2025
1 parent bcd40b8 commit 04a6ab6
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions luxonis_train/nodes/heads/fomo_head.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,18 +89,12 @@ def _apply_nms_if_needed(self, heatmap: Tensor) -> Tensor:
if not self.use_nms:
return heatmap

Check warning on line 90 in luxonis_train/nodes/heads/fomo_head.py

View check run for this annotation

Codecov / codecov/patch

luxonis_train/nodes/heads/fomo_head.py#L89-L90

Added lines #L89 - L90 were not covered by tests

return (
F.max_pool2d(
heatmap.unsqueeze(0).unsqueeze(
0
), # Add dummy batch/channel dimensions
kernel_size=3,
stride=1,
padding=1,
)
.squeeze(0)
.squeeze(0)
) # Remove dummy dimensions
return F.max_pool2d(

Check warning on line 92 in luxonis_train/nodes/heads/fomo_head.py

View check run for this annotation

Codecov / codecov/patch

luxonis_train/nodes/heads/fomo_head.py#L92

Added line #L92 was not covered by tests
heatmap,
kernel_size=3,
stride=1,
padding=1,
)

def _heatmap_to_kpts(self, heatmap: Tensor) -> List[Tensor]:
"""Convert heatmap to keypoint pairs using local-max NMS so that
Expand Down

0 comments on commit 04a6ab6

Please sign in to comment.