Unverified Commit fc5d477a authored by Gopi Krishna Erabati's avatar Gopi Krishna Erabati Committed by GitHub
Browse files

[Fix] Convert rt_mat to torch.Tensor in Coord transform for compatibility (#709)

* converted rt_mat from ndarray to tensor to make it further compatible

* changed if condition of rt_mat to be consistent with code
parent a1e04538
...@@ -243,6 +243,8 @@ class Coord3DMode(IntEnum): ...@@ -243,6 +243,8 @@ class Coord3DMode(IntEnum):
f'Conversion from Coord3DMode {src} to {dst} ' f'Conversion from Coord3DMode {src} to {dst} '
'is not supported yet') 'is not supported yet')
if not isinstance(rt_mat, torch.Tensor):
rt_mat = arr.new_tensor(rt_mat)
if rt_mat.size(1) == 4: if rt_mat.size(1) == 4:
extended_xyz = torch.cat( extended_xyz = torch.cat(
[arr[:, :3], arr.new_ones(arr.size(0), 1)], dim=-1) [arr[:, :3], arr.new_ones(arr.size(0), 1)], dim=-1)
......
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