Unverified Commit afa4479c authored by Deze's avatar Deze Committed by GitHub
Browse files

[Fix]: CenterFormer, exchange width and length according to coordinates(xyz)...

[Fix]: CenterFormer, exchange width and length according to coordinates(xyz) and dimensions(lwh) correspondence (#2360) (#2362)
parent ef13e5a2
......@@ -659,16 +659,17 @@ class DeformableDecoderRPN(BaseDecoderRPN):
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))
......@@ -702,7 +703,7 @@ class DeformableDecoderRPN(BaseDecoderRPN):
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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment