SceneContraction maps to range [-2, 2], not [-1, 1]. (#1872)

This commit is contained in:
Daniel Crispell authored and GitHub committed 2023-05-04 10:04:30 -07:00
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:
+2 -2
View File
@@ -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))