pytorch3d/tests
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
..
benchmarks Convert directory fbcode/vision to use the Ruff Formatter 2024-11-26 02:38:20 -08:00
data Support reading uv and uv map for ply format if texture_uv exists in ply file (#1100) 2023-11-14 07:44:14 -08:00
implicitron In FrameDataBuilder, set all path even if we don’t load blobs 2025-02-06 09:41:44 -08:00
pulsar Convert directory fbcode/vision to use the Ruff Formatter 2024-11-26 02:38:20 -08:00
__init__.py Update license for company name 2022-01-04 11:43:38 -08:00
common_camera_utils.py Add utils to approximate the conical frustums as multivariate gaussians. 2023-07-06 01:55:41 -07:00
common_testing.py Make OpenGL optional in tests 2024-02-13 07:43:42 -08:00
test_acos_linear_extrapolation.py Remove pytorch3d's wrappers for eigh, solve, lstsq, qr 2022-08-31 13:04:07 -07:00
test_ball_query.py move targets 2022-05-25 06:16:03 -07:00
test_blending.py Convert directory fbcode/vision to use the Ruff Formatter 2024-11-26 02:38:20 -08:00
test_build.py test fixes and lints 2024-11-20 09:15:51 -08:00
test_camera_conversions.py move targets 2022-05-25 06:16:03 -07:00
test_camera_pixels.py move targets 2022-05-25 06:16:03 -07:00
test_camera_utils.py move targets 2022-05-25 06:16:03 -07:00
test_cameras.py Convert directory fbcode/vision to use the Ruff Formatter 2024-11-26 02:38:20 -08:00
test_cameras_alignment.py move targets 2022-05-25 06:16:03 -07:00
test_chamfer.py Add "max" point reduction for chamfer distance 2024-08-02 10:46:07 -07:00
test_checkerboard.py Adding a Checkerboard mesh utility to Pytorch3d 2022-09-22 12:51:37 -07:00
test_common_linear_with_repeat.py move targets 2022-05-25 06:16:03 -07:00
test_common_testing.py move targets 2022-05-25 06:16:03 -07:00
test_common_workaround.py move targets 2022-05-25 06:16:03 -07:00
test_compositing.py Convert directory fbcode/vision to use the Ruff Formatter 2024-11-26 02:38:20 -08:00
test_cubify.py Support color in cubify 2024-02-16 08:19:12 -08:00
test_face_areas_normals.py move targets 2022-05-25 06:16:03 -07:00
test_graph_conv.py move targets 2022-05-25 06:16:03 -07:00
test_harmonic_embedding.py Add integrated position encoding based on MIPNerf implementation. 2023-07-06 02:20:53 -07:00
test_interpolate_face_attributes.py move targets 2022-05-25 06:16:03 -07:00
test_io_gltf.py test fixes and lints 2024-11-20 09:15:51 -08:00
test_io_obj.py lint 2023-12-04 13:43:34 -08:00
test_io_off.py Fix OFF for new numpy errors 2024-11-06 11:13:59 -08:00
test_io_ply.py lint 2023-12-04 13:43:34 -08:00
test_iou_box3d.py Convert directory fbcode/vision to use the Ruff Formatter 2024-11-26 02:38:20 -08:00
test_knn.py move targets 2022-05-25 06:16:03 -07:00
test_laplacian_matrices.py move targets 2022-05-25 06:16:03 -07:00
test_lighting.py move targets 2022-05-25 06:16:03 -07:00
test_marching_cubes.py Convert directory fbcode/vision to use the Ruff Formatter 2024-11-26 02:38:20 -08:00
test_materials.py move targets 2022-05-25 06:16:03 -07:00
test_mesh_edge_loss.py move targets 2022-05-25 06:16:03 -07:00
test_mesh_filtering.py move targets 2022-05-25 06:16:03 -07:00
test_mesh_laplacian_smoothing.py Update license for company name 2022-01-04 11:43:38 -08:00
test_mesh_normal_consistency.py Update license for company name 2022-01-04 11:43:38 -08:00
test_mesh_rendering_utils.py Update license for company name 2022-01-04 11:43:38 -08:00
test_meshes.py Convert directory fbcode/vision to use the Ruff Formatter 2024-11-26 02:38:20 -08:00
test_opengl_utils.py Make OpenGL optional in tests 2024-02-13 07:43:42 -08:00
test_ops_utils.py move targets 2022-05-25 06:16:03 -07:00
test_packed_to_padded.py MC rasterize supports heterogeneous bundle; refactoring of bundle-to-padded 2022-11-07 13:43:31 -08:00
test_perspective_n_points.py Fix Pytorch3D PnP test 2022-07-14 09:50:39 -07:00
test_point_mesh_distance.py move targets 2022-05-25 06:16:03 -07:00
test_pointclouds.py Convert directory fbcode/vision to use the Ruff Formatter 2024-11-26 02:38:20 -08:00
test_points_alignment.py Convert directory fbcode/vision to use the Ruff Formatter 2024-11-26 02:38:20 -08:00
test_points_normals.py move targets 2022-05-25 06:16:03 -07:00
test_points_to_volumes.py Convert directory fbcode/vision to use the Ruff Formatter 2024-11-26 02:38:20 -08:00
test_r2n2.py Convert directory fbcode/vision to use the Ruff Formatter 2024-11-26 02:38:20 -08:00
test_rasterize_meshes.py Multithread CPU naive mesh rasterization 2022-10-06 06:42:58 -07:00
test_rasterize_points.py move targets 2022-05-25 06:16:03 -07:00
test_rasterize_rectangle_images.py Make OpenGL optional in tests 2024-02-13 07:43:42 -08:00
test_rasterizer.py Make OpenGL optional in tests 2024-02-13 07:43:42 -08:00
test_raymarching.py move targets 2022-05-25 06:16:03 -07:00
test_raysampling.py Convert directory fbcode/vision to use the Ruff Formatter 2024-11-26 02:38:20 -08:00
test_render_implicit.py Convert directory fbcode/vision to use the Ruff Formatter 2024-11-26 02:38:20 -08:00
test_render_meshes.py Convert directory fbcode/vision to use the Ruff Formatter 2024-11-26 02:38:20 -08:00
test_render_meshes_clipped.py Convert directory fbcode/vision to use the Ruff Formatter 2024-11-26 02:38:20 -08:00
test_render_multigpu.py Convert directory fbcode/vision to use the Ruff Formatter 2024-11-26 02:38:20 -08:00
test_render_points.py Convert directory fbcode/vision to use the Ruff Formatter 2024-11-26 02:38:20 -08:00
test_render_volumes.py Convert directory fbcode/vision to use the Ruff Formatter 2024-11-26 02:38:20 -08:00
test_rendering_utils.py Convert directory fbcode/vision to use the Ruff Formatter 2024-11-26 02:38:20 -08:00
test_rotation_conversions.py Increase performance for conversions including axis angles (#1948) 2025-02-07 07:37:42 -08:00
test_sample_farthest_points.py move targets 2022-05-25 06:16:03 -07:00
test_sample_pdf.py move targets 2022-05-25 06:16:03 -07:00
test_sample_points_from_meshes.py Convert directory fbcode/vision to use the Ruff Formatter 2024-11-26 02:38:20 -08:00
test_se3.py Remove pytorch3d's wrappers for eigh, solve, lstsq, qr 2022-08-31 13:04:07 -07:00
test_shader.py Add .to methods to the splatter and SplatterPhongShader. 2022-07-22 14:36:22 -07:00
test_shapenet_core.py Convert directory fbcode/vision to use the Ruff Formatter 2024-11-26 02:38:20 -08:00
test_so3.py Update so3 operations for numerical stability 2024-01-04 02:26:56 -08:00
test_splatter_blend.py Remove use of torch.tile to fix CI 2022-06-01 08:47:26 -07:00
test_struct_utils.py Convert directory fbcode/vision to use the Ruff Formatter 2024-11-26 02:38:20 -08:00
test_subdivide_meshes.py fix subdivide_meshes with empty mesh #1788 2024-11-06 11:40:26 -08:00
test_symeig3x3.py move targets 2022-05-25 06:16:03 -07:00
test_texturing.py TexturesUV multiple maps 2024-03-12 06:59:31 -07:00
test_transforms.py Convert directory fbcode/vision to use the Ruff Formatter 2024-11-26 02:38:20 -08:00
test_vert_align.py apply Black 2024 style in fbcode (4/16) 2024-03-02 17:31:19 -08:00
test_vis.py Fixes for RayBundle plotting 2023-01-25 01:56:36 -08:00
test_volumes.py Convert directory fbcode/vision to use the Ruff Formatter 2024-11-26 02:38:20 -08:00
weights.pt Initial commit 2020-01-23 11:53:46 -08:00