Normalization helper function.
(x: np.ndarray)
| 26 | import torch |
| 27 | |
| 28 | def normalize(x: np.ndarray) -> np.ndarray: |
| 29 | """Normalization helper function.""" |
| 30 | return x / np.linalg.norm(x) |
| 31 | |
| 32 | def pad_poses(p: np.ndarray) -> np.ndarray: |
| 33 | """Pad [..., 3, 4] pose matrices with a homogeneous bottom row [0,0,0,1].""" |
no outgoing calls
no test coverage detected