mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-25 10:29:51 +08:00
More typing fixes (#1941)
* Fix more types * Fix tests * Minor cleaning * Address comments * Resolve linting errors * Re-ignore pymeshlab type * Add extra assert / error message to mipnerf model
This commit is contained in:
1 parent
8b9574bb5a
commit
814db32ec4
53 files changed
+386
-205
No files matched your search
@@ -14,6 +14,7 @@
|
||||
|
||||
"""Space distortions."""
|
||||
|
||||
import abc
|
||||
from typing import Optional, Union
|
||||
|
||||
import torch
|
||||
@@ -27,6 +28,7 @@ from nerfstudio.utils.math import Gaussians
|
||||
class SpatialDistortion(nn.Module):
|
||||
"""Apply spatial distortions"""
|
||||
|
||||
@abc.abstractmethod
|
||||
def forward(self, positions: Union[Float[Tensor, "*bs 3"], Gaussians]) -> Union[Float[Tensor, "*bs 3"], Gaussians]:
|
||||
"""
|
||||
Args:
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
|
||||
"""Space distortions which occur as a function of time."""
|
||||
|
||||
import abc
|
||||
from enum import Enum
|
||||
from typing import Any, Dict, Optional, Tuple
|
||||
|
||||
@@ -28,6 +29,7 @@ from nerfstudio.field_components.mlp import MLP
|
||||
class TemporalDistortion(nn.Module):
|
||||
"""Apply spatial distortions as a function of time"""
|
||||
|
||||
@abc.abstractmethod
|
||||
def forward(self, positions: Float[Tensor, "*bs 3"], times: Optional[Float[Tensor, "1"]]) -> Float[Tensor, "*bs 3"]:
|
||||
"""
|
||||
Args:
|
||||
|
||||
Reference in new issue
Block a user