mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-08-03 12:22:49 +08:00
Fix Pulsar backend batched radius handling.
Summary: This fixes a corner case for multi-radius handling for the pulsar backend. The additional dimensionality check ensures that the batched parsing for radiuses is only performed when appropriate. Reviewed By: bottler Differential Revision: D25387708 fbshipit-source-id: c486dcf327f812265b7ca8ca5ef5c6a31e6d4549
This commit is contained in:
parent
ebac66daeb
commit
caa3371376
@ -399,7 +399,11 @@ class PulsarPointsRenderer(nn.Module):
|
|||||||
raster_rad = self.rasterizer.raster_settings.radius
|
raster_rad = self.rasterizer.raster_settings.radius
|
||||||
if kwargs.get("radius_world", False):
|
if kwargs.get("radius_world", False):
|
||||||
return raster_rad
|
return raster_rad
|
||||||
if isinstance(raster_rad, torch.Tensor) and raster_rad.numel() > 1:
|
if (
|
||||||
|
isinstance(raster_rad, torch.Tensor)
|
||||||
|
and raster_rad.numel() > 1
|
||||||
|
and raster_rad.ndim > 1
|
||||||
|
):
|
||||||
# In this case it must be a batched torch tensor.
|
# In this case it must be a batched torch tensor.
|
||||||
raster_rad = raster_rad[cloud_idx]
|
raster_rad = raster_rad[cloud_idx]
|
||||||
if orthogonal_projection:
|
if orthogonal_projection:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user