Unverified Commit c0d00904 authored by Wenhao Wu's avatar Wenhao Wu Committed by GitHub
Browse files

[Fix] Fix corner bug in different coordinates (#1212)

* fix corner bug in cam coord

* fix corner bugs in depth & lidar coord
parent b4240bd6
......@@ -124,9 +124,9 @@ class CameraInstance3DBoxes(BaseInstance3DBoxes):
v
down y
"""
# TODO: rotation_3d_in_axis function do not support
# empty tensor currently.
assert len(self.tensor) != 0
if self.tensor.numel() == 0:
return torch.empty([0, 8, 3], device=self.tensor.device)
dims = self.dims
corners_norm = torch.from_numpy(
np.stack(np.unravel_index(np.arange(8), [2] * 3), axis=1)).to(
......
......@@ -71,9 +71,9 @@ class DepthInstance3DBoxes(BaseInstance3DBoxes):
(x0, y0, z0) + ----------- + --------> right x
(x1, y0, z0)
"""
# TODO: rotation_3d_in_axis function do not support
# empty tensor currently.
assert len(self.tensor) != 0
if self.tensor.numel() == 0:
return torch.empty([0, 8, 3], device=self.tensor.device)
dims = self.dims
corners_norm = torch.from_numpy(
np.stack(np.unravel_index(np.arange(8), [2] * 3), axis=1)).to(
......
......@@ -69,9 +69,9 @@ class LiDARInstance3DBoxes(BaseInstance3DBoxes):
left y<-------- + ----------- + (x0, y1, z0)
(x0, y0, z0)
"""
# TODO: rotation_3d_in_axis function do not support
# empty tensor currently.
assert len(self.tensor) != 0
if self.tensor.numel() == 0:
return torch.empty([0, 8, 3], device=self.tensor.device)
dims = self.dims
corners_norm = torch.from_numpy(
np.stack(np.unravel_index(np.arange(8), [2] * 3), axis=1)).to(
......
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