mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-13 11:24:00 +08:00
SceneContraction maps to range [-2, 2], not [-1, 1]. (#1872)
This commit is contained in:
1 parent
68f2edcb05
commit
cf74119adc
2 files changed
+3
-3
No files matched your search
@@ -51,7 +51,7 @@ class SceneContraction(SpatialDistortion):
|
||||
\\end{cases}
|
||||
|
||||
If the order is not specified, we use the Frobenius norm, this will contract the space to a sphere of
|
||||
radius 1. If the order is L_inf (order=float("inf")), we will contract the space to a cube of side length 2.
|
||||
radius 2. If the order is L_inf (order=float("inf")), we will contract the space to a cube of side length 4.
|
||||
If using voxel based encodings such as the Hash encoder, we recommend using the L_inf norm.
|
||||
|
||||
Args:
|
||||
|
||||
@@ -257,8 +257,8 @@ class SDFField(Field):
|
||||
"""forward the geonetwork"""
|
||||
if self.use_grid_feature:
|
||||
positions = self.spatial_distortion(inputs)
|
||||
|
||||
positions = (positions + 1.0) / 2.0
|
||||
# map range [-2, 2] to [0, 1]
|
||||
positions = (positions + 2.0) / 4.0
|
||||
feature = self.encoding(positions)
|
||||
else:
|
||||
feature = torch.zeros_like(inputs[:, :1].repeat(1, self.encoding.n_output_dims))
|
||||
|
||||
Reference in new issue
Block a user