Skip to content

Commit

Permalink
Switch to diffdrr's wrapper of pytorch3d
Browse files Browse the repository at this point in the history
  • Loading branch information
eigenvivek committed Jan 24, 2024
1 parent 5d247c0 commit 66e5bfd
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
3 changes: 2 additions & 1 deletion diffpose/calibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@
from typing import Optional

from beartype import beartype
from diffdrr.utils import Transform3d
from diffdrr.utils import convert as convert_so3
from diffdrr.utils import se3_exp_map, se3_log_map
from jaxtyping import Float, jaxtyped
from pytorch3d.transforms import Transform3d, se3_exp_map, se3_log_map

# %% ../notebooks/api/02_calibration.ipynb 7
@beartype
Expand Down
6 changes: 3 additions & 3 deletions diffpose/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ def __init__(self, patch_size=None):
# %% ../notebooks/api/04_metrics.ipynb 9
import torch
from beartype import beartype
from diffdrr.utils import convert
from jaxtyping import Float, jaxtyped
from pytorch3d.transforms import (
from diffdrr.utils import (
convert,
so3_log_map,
so3_relative_angle,
so3_rotation_angle,
standardize_quaternion,
)
from jaxtyping import Float, jaxtyped

from .calibration import RigidTransform

Expand Down
2 changes: 0 additions & 2 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@ name: diffpose
channels:
- conda-forge
- pytorch
- pytorch3d
- nvidia
dependencies:
- pip
- pytorch
- torchvision
- pytorch3d
- pip:
- diffdrr>=0.3.8
- h5py
Expand Down
5 changes: 3 additions & 2 deletions notebooks/api/02_calibration.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,10 @@
"from typing import Optional\n",
"\n",
"from beartype import beartype\n",
"from diffdrr.utils import Transform3d\n",
"from diffdrr.utils import convert as convert_so3\n",
"from jaxtyping import Float, jaxtyped\n",
"from pytorch3d.transforms import Transform3d, se3_exp_map, se3_log_map"
"from diffdrr.utils import se3_exp_map, se3_log_map\n",
"from jaxtyping import Float, jaxtyped"
]
},
{
Expand Down
6 changes: 3 additions & 3 deletions notebooks/api/04_metrics.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,14 @@
"#| export\n",
"import torch\n",
"from beartype import beartype\n",
"from diffdrr.utils import convert\n",
"from jaxtyping import Float, jaxtyped\n",
"from pytorch3d.transforms import (\n",
"from diffdrr.utils import (\n",
" convert,\n",
" so3_log_map,\n",
" so3_relative_angle,\n",
" so3_rotation_angle,\n",
" standardize_quaternion,\n",
")\n",
"from jaxtyping import Float, jaxtyped\n",
"\n",
"from diffpose.calibration import RigidTransform"
]
Expand Down
2 changes: 1 addition & 1 deletion settings.ini
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ status = 3
user = eigenvivek

### Optional ###
requirements = diffdrr h5py scikit-image seaborn torch torchvision pytorch3d timm pytorch-transformers torchmetrics tqdm beartype jaxtyping
requirements = diffdrr h5py scikit-image seaborn torch torchvision timm pytorch-transformers torchmetrics tqdm beartype jaxtyping
dev_requirements = jupyterlab_code_formatter black flake8 isort nbdev ipykernel jupyter-server-proxy
optional_requirements = submitit

0 comments on commit 66e5bfd

Please sign in to comment.