Skip to content

Commit

Permalink
fix for rectangular images
Browse files Browse the repository at this point in the history
  • Loading branch information
kozlov721 committed Jan 23, 2025
1 parent 7b96ab8 commit b14a76c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions luxonis_train/nodes/heads/ghostfacenet_head.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,16 @@ def __init__(
"""
super().__init__(**kwargs)
self.embedding_size = embedding_size
image_size = self.original_in_shape[1]
_, H, W = self.original_in_shape

self.head = nn.Sequential(
ConvModule(
self.in_channels,
self.in_channels,
kernel_size=(image_size // 32)
if image_size % 32 == 0
else (image_size // 32 + 1),
kernel_size=(
H // 32 if H % 32 == 0 else H // 32 + 1,
W // 32 if W % 32 == 0 else W // 32 + 1,
),
groups=self.in_channels,
activation=False,
),
Expand Down

0 comments on commit b14a76c

Please sign in to comment.