-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
Hi, thank you for open-sourcing this amazing library!
The torch version of utils3d.transform_points seems to be broken, due to a typo that slices instead of adding a unit dimension (as in the numpy version, which works correctly).
Steps to reproduce:
import numpy as np
import torch
import utils3d
T = np.random.randn(3, 4)
P = np.random.randn(90, 3)
print(utils3d.transform_points(P, T).shape)
# raises error
print(utils3d.transform_points(torch.from_numpy(P), torch.from_numpy(T)).shape)
# larger inputs to trigger the einsum-based path
T = np.random.randn(8, 4, 1, 1, 3, 4)
P = np.random.randn(8, 4, 60, 90, 3)
print(utils3d.transform_points(P, T).shape)
# raises error
print(utils3d.transform_points(torch.from_numpy(P), torch.from_numpy(T)).shape)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels