Skip to content

Commit

Permalink
Merge 2bf94ff into 06b5688
Browse files Browse the repository at this point in the history
  • Loading branch information
DezeZhao authored Mar 17, 2023
2 parents 06b5688 + 2bf94ff commit 05a6036
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions projects/CenterFormer/centerformer/centerformer_backbone.py
Original file line number Diff line number Diff line change
Expand Up @@ -659,16 +659,17 @@ def get_targets_single(self,
for k in range(num_objs):
cls_id = task_classes[idx][k] - 1

width = task_boxes[idx][k][3]
length = task_boxes[idx][k][4]
width = width / voxel_size[0] / self.train_cfg[
# gt boxes [xyzlwhr]
length = task_boxes[idx][k][3]
width = task_boxes[idx][k][4]
length = length / voxel_size[0] / self.train_cfg[
'out_size_factor']
length = length / voxel_size[1] / self.train_cfg[
width = width / voxel_size[1] / self.train_cfg[
'out_size_factor']

if width > 0 and length > 0:
radius = gaussian_radius(
(length, width),
(width, length),
min_overlap=self.train_cfg['gaussian_overlap'])
radius = max(self.train_cfg['min_radius'], int(radius))

Expand Down Expand Up @@ -702,7 +703,7 @@ def get_targets_single(self,
rot = task_boxes[idx][k][6]
corner_keypoints = center_to_corner_box2d(
center.unsqueeze(0).cpu().numpy(),
torch.tensor([[width, length]],
torch.tensor([[length, width]],
dtype=torch.float32).numpy(),
angles=rot,
origin=0.5)
Expand Down

0 comments on commit 05a6036

Please sign in to comment.