Skip to content

[Rotation] Add 6D rotation representation per Zhou et al 2019#368

Open
fagg wants to merge 1 commit into
dfki-ric:developfrom
fagg:fagg/zhou-6d-rot
Open

[Rotation] Add 6D rotation representation per Zhou et al 2019#368
fagg wants to merge 1 commit into
dfki-ric:developfrom
fagg:fagg/zhou-6d-rot

Conversation

@fagg

@fagg fagg commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Adds two new functions to pytransform3d.rotations for converting between rotation matrices and continuous 6D rotation representation introduced by Zhou et al (CVPR 2019).

  • rotation_6d_from_matrix - encode a rotation matrix as a 6D vector (its first two columns stacked)
  • matrix_from_rotation_6d - decode a 6D vector back into a rotation matrix via Gram-Schmidt orthonormalization

Most parameterizations of rotation (quaternion, axis-angle, Euler angles) are discontinuous as functions on SO(3). For classical geometry, this largely doesn't matter. However, the discontiuity is problematic for machine learning. Zhou et al showed that any representation of SO(3) with fewer than 5 dimensions is necessarily discontinuous - and proposed a continuous 6D representation that avoids this. It has become the defacto standard target for learned rotation estimation in pose estimation and other computer vision tasks. This PR makes this representation directly available in pytransform3d.

All of the core functionality already existed, this merely wraps it. A proper test suite has been added to ensure correctness;

@AlexanderFabisch
AlexanderFabisch self-requested a review July 10, 2026 07:09
@AlexanderFabisch

Copy link
Copy Markdown
Member

Hi @fagg ,

thank you for this contribution. I only have two open points:

  1. Representation name: not sure how much you thought about it yet. Do you think rotation_6d is the best name for this? Which name is used in the paper? Is it intuitive? Is there maybe a better name? We already have matrix_from_two_vectors, where two_vectors is the same representation, but arranged in a different way. We should clearly distinguish both. I don't have any better idea at the moment, but I'd like to at least have a brief discussion about this.

  2. Extension of the user guide: it is not strictly necessary to add the representation everywhere, but it could be added to

What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants