Commit 4db9fc11 authored by David Novotny's avatar David Novotny Committed by Facebook GitHub Bot
Browse files

Allow setting bin_size for render_point_clouds_pytorch3d

Summary: This is required to suppress a huge stdout full of warnings about overflown bins.

Reviewed By: bottler

Differential Revision: D35359824

fbshipit-source-id: 39214b1bdcb4a5d5debf8ed498b2ca81fa43d210
parent 3b8a33e9
......@@ -74,6 +74,7 @@ def render_point_cloud_pytorch3d(
topk: int = 10,
eps: float = 1e-2,
bg_color=None,
bin_size: Optional[int] = None,
**kwargs
):
......@@ -86,13 +87,18 @@ def render_point_cloud_pytorch3d(
camera_trivial.R[:] = torch.eye(3)
camera_trivial.T *= 0.0
bin_size = (
bin_size
if bin_size is not None
else (64 if int(max(render_size)) > 1024 else None)
)
rasterizer = PointsRasterizer(
cameras=camera_trivial,
raster_settings=PointsRasterizationSettings(
image_size=render_size,
radius=point_radius,
points_per_pixel=topk,
bin_size=64 if int(max(render_size)) > 1024 else None,
bin_size=bin_size,
),
)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment