alex-bene 7a3c0cbc9d Increase performance for conversions including axis angles (#1948)
Summary:
This is an extension of https://github.com/facebookresearch/pytorch3d/issues/1544 with various speed, stability, and readability improvements. (I could not find a way to make a commit to the existing PR). This PR is still based on the [Rodrigues' rotation formula](https://en.wikipedia.org/wiki/Rotation_formalisms_in_three_dimensions#Rotation_matrix_%E2%86%94_Euler_axis/angle).

The motivation is the same; this change speeds up the conversions up to 10x, depending on the device, batch size, etc.

### Notes
- As the angles get very close to `π`, the existing implementation and the proposed one start to differ. However, (my understanding is that) this is not a problem as the axis can not be stably inferred from the rotation matrix in this case in general.
- bottler , I tried to follow similar conventions as existing functions to deal with weird angles, let me know if something needs to be changed to merge this.

Pull Request resolved: https://github.com/facebookresearch/pytorch3d/pull/1948

Reviewed By: MichaelRamamonjisoa

Differential Revision: D69193009

Pulled By: bottler

fbshipit-source-id: e5ed34b45b625114ec4419bb89e22a6aefad4eeb
2025-02-07 07:37:42 -08:00
..
2022-01-04 11:43:38 -08:00
2022-05-25 06:16:03 -07:00
2024-11-20 09:15:51 -08:00
2022-05-25 06:16:03 -07:00
2022-05-25 06:16:03 -07:00
2022-05-25 06:16:03 -07:00
2022-05-25 06:16:03 -07:00
2022-05-25 06:16:03 -07:00
2022-05-25 06:16:03 -07:00
2022-05-25 06:16:03 -07:00
2024-02-16 08:19:12 -08:00
2022-05-25 06:16:03 -07:00
2022-05-25 06:16:03 -07:00
2024-11-20 09:15:51 -08:00
2023-12-04 13:43:34 -08:00
2024-11-06 11:13:59 -08:00
2023-12-04 13:43:34 -08:00
2022-05-25 06:16:03 -07:00
2022-05-25 06:16:03 -07:00
2022-05-25 06:16:03 -07:00
2022-05-25 06:16:03 -07:00
2022-05-25 06:16:03 -07:00
2022-05-25 06:16:03 -07:00
2022-05-25 06:16:03 -07:00
2022-05-25 06:16:03 -07:00
2022-05-25 06:16:03 -07:00
2022-05-25 06:16:03 -07:00
2022-05-25 06:16:03 -07:00
2022-05-25 06:16:03 -07:00
2022-05-25 06:16:03 -07:00
2022-05-25 06:16:03 -07:00
2024-03-12 06:59:31 -07:00
2023-01-25 01:56:36 -08:00
2020-01-23 11:53:46 -08:00