pytorchse3
Install
pip install pytorchse3
How to use
import torch
from pytorchse3.se3 import se3_exp_map, se3_log_map
Here are two transformation matrices for which PyTorch3D recovers the
wrong log map (see this
issue).
T = torch.Tensor(
[
[
[-0.7384057045, 0.3333132863, -0.5862244964, 0.0000000000],
[0.3520625532, -0.5508944392, -0.7566816807, 0.0000000000],
[-0.5751599669, -0.7651259303, 0.2894364297, 0.0000000000],
[-0.1840534210, -0.1836946011, 0.9952554703, 1.0000000000],
],
[
[-0.7400283217, 0.5210028887, -0.4253400862, 0.0000000000],
[0.5329059958, 0.0683888718, -0.8434065580, 0.0000000000],
[-0.4103286564, -0.8508108258, -0.3282552958, 0.0000000000],
[-0.1197679043, 0.1799146235, 0.5538908839, 1.0000000000],
],
],
).transpose(-1, -2)
pytorchse3 computes the correct log map.
log_T_vee = se3_log_map(T)
log_T_vee
tensor([[ 1.1319, 1.4831, -2.5131, -0.8503, -0.1170, 0.7346],
[ 1.1288, 2.2886, -1.8147, -0.8812, 0.0367, -0.1004]])
Exponentiating the log map recovers the original transformation matrix with 1e-4 absolute error.
eq_T = se3_exp_map(log_T_vee)
assert torch.allclose(T, eq_T, atol=1e-4)
T - eq_T
tensor([[[-9.2983e-06, -2.3842e-07, 1.1504e-05, 2.9802e-08],
[-5.1558e-06, 8.5235e-06, -8.6427e-06, -2.9802e-08],
[ 8.6427e-06, -6.4373e-06, 4.4703e-07, 0.0000e+00],
[ 0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00]],
[[ 8.0466e-06, 1.6212e-05, 6.0201e-06, -3.7253e-08],
[ 4.5896e-06, 8.6352e-06, 3.3975e-06, 2.9802e-08],
[-8.5831e-06, 1.0610e-05, -1.6809e-05, 0.0000e+00],
[ 0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00]]])
References
pytorchse3implements log/exp maps defined in Section 2 and 3 of Ethan Eade’s tutorial- Our numerically stable
so3_log_mapis a PyTorch port ofpytransform3d - Taylor expansions for some coefficients in
se3_log_mapare taken fromH2-Mapping
Metadata
Release files for pytorchse3 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pytorchse3-0.0.3.tar.gz | 6.7 kB | Without provenance | Details for pytorchse3-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pytorchse3-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for pytorchse3-0.0.3-py3-none-any.whl |
Total release size: 13.4 kB
Release files / pytorchse3-0.0.3.tar.gz
| Download URL | pytorchse3-0.0.3.tar.gz |
|---|---|
| Size | 6.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ecda68926ea06ab746172db588d0ed7bd87793c25346ce7a52c8a6631302d87b
|
|
BLAKE2b-256 checksum How to use checksums |
0cfdaf35bf585b82124c31ae8aa2fea4c20ed5e0e113d985156d9fa60bc04ce8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Release files / pytorchse3-0.0.3-py3-none-any.whl
| Download URL | pytorchse3-0.0.3-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
07cdca16dcdf3561d1be2fe9f586262d21f84c3291b02a097c630eec7e2fac78
|
|
BLAKE2b-256 checksum How to use checksums |
c50f3c7770978ece4c9947da3d60636d9d812cc470007eed69e5c4dc94741f58
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Security for pytorchse3 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.