@@ -89,7 +89,7 @@ def __init__(
89
89
max_depth: The maximum depth of a ray-point.
90
90
n_rays_per_image: If given, this amount of rays are sampled from the grid.
91
91
unit_directions: whether to normalize direction vectors in ray bundle.
92
- stratified_sampling: if set , performs stratified random sampling
92
+ stratified_sampling: if True , performs stratified random sampling
93
93
along the ray; otherwise takes ray points at deterministic offsets.
94
94
"""
95
95
super ().__init__ ()
@@ -136,9 +136,8 @@ def forward(
136
136
max_depth: The maximum depth of a ray-point.
137
137
n_rays_per_image: If given, this amount of rays are sampled from the grid.
138
138
n_pts_per_ray: The number of points sampled along each ray.
139
- stratified_sampling: if set, performs stratified sampling in n_pts_per_ray
140
- bins for each ray; otherwise takes n_pts_per_ray deterministic points
141
- on each ray with uniform offsets.
139
+ stratified_sampling: if set, overrides stratified_sampling provided
140
+ in __init__.
142
141
Returns:
143
142
A named tuple RayBundle with the following fields:
144
143
origins: A tensor of shape
@@ -296,7 +295,7 @@ def __init__(
296
295
min_depth: The minimum depth of each ray-point.
297
296
max_depth: The maximum depth of each ray-point.
298
297
unit_directions: whether to normalize direction vectors in ray bundle.
299
- stratified_sampling: if set , performs stratified sampling in n_pts_per_ray
298
+ stratified_sampling: if True , performs stratified sampling in n_pts_per_ray
300
299
bins for each ray; otherwise takes n_pts_per_ray deterministic points
301
300
on each ray with uniform offsets.
302
301
"""
@@ -322,9 +321,9 @@ def forward(
322
321
"""
323
322
Args:
324
323
cameras: A batch of `batch_size` cameras from which the rays are emitted.
325
- stratified_sampling: if set, performs stratified sampling in n_pts_per_ray
326
- bins for each ray; otherwise takes n_pts_per_ray deterministic points
327
- on each ray with uniform offsets.
324
+ stratified_sampling: if set, overrides stratified_sampling provided
325
+ in __init__.
326
+
328
327
Returns:
329
328
A named tuple RayBundle with the following fields:
330
329
origins: A tensor of shape
@@ -514,7 +513,7 @@ def _xy_to_ray_bundle(
514
513
max_depth: The maximum depth of each ray-point.
515
514
n_pts_per_ray: The number of points sampled along each ray.
516
515
unit_directions: whether to normalize direction vectors in ray bundle.
517
- stratified_sampling: if set , performs stratified sampling in n_pts_per_ray
516
+ stratified_sampling: if True , performs stratified sampling in n_pts_per_ray
518
517
bins for each ray; otherwise takes n_pts_per_ray deterministic points
519
518
on each ray with uniform offsets.
520
519
"""
@@ -583,7 +582,7 @@ def _jiggle_within_stratas(bin_centers: torch.Tensor) -> torch.Tensor:
583
582
584
583
More specifically, it replaces each point's value `z`
585
584
with a sample from a uniform random distribution on
586
- `[z - delta_− , z + delta_+]`, where `delta_− ` is half of the difference
585
+ `[z - delta_- , z + delta_+]`, where `delta_- ` is half of the difference
587
586
between `z` and the previous point, and `delta_+` is half of the difference
588
587
between the next point and `z`. For the first and last items, the
589
588
corresponding boundary deltas are assumed zero.
0 commit comments