mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-08-03 04:12:48 +08:00
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
This commit is contained in:
parent
3b8a33e9c5
commit
4db9fc11d2
@ -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,
|
||||
),
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user