Skip to content

Fix(argo2): Restore compatibility with modern kornia versions (>=0.7.0) #1722

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions pcdet/datasets/argo2/argo2_utils/so3.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from math import pi as PI


@torch.jit.script
# ── kornia wrapper: TorchScript removed ────────────────────────────────
def quat_to_mat(quat_wxyz: Tensor) -> Tensor:
"""Convert scalar first quaternion to rotation matrix.

Expand All @@ -16,9 +16,7 @@ def quat_to_mat(quat_wxyz: Tensor) -> Tensor:
Returns:
(...,3,3) 3D rotation matrices.
"""
return C.quaternion_to_rotation_matrix(
quat_wxyz, order=C.QuaternionCoeffOrder.WXYZ
)
return C.quaternion_to_rotation_matrix(quat_wxyz)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The decorator @torch.jit.script of this function should be removed.



# @torch.jit.script
Expand All @@ -31,9 +29,7 @@ def mat_to_quat(mat: Tensor) -> Tensor:
Returns:
(...,4) Scalar first quaternions.
"""
return C.rotation_matrix_to_quaternion(
mat, order=C.QuaternionCoeffOrder.WXYZ
)
return C.rotation_matrix_to_quaternion(mat)


@torch.jit.script
Expand Down