mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-12-21 23:00:34 +08:00
coarse rasterization bug fix
Summary: Fix a bug which resulted in a rendering artifacts if the image size was not a multiple of 16. Fix: Revert coarse rasterization to original implementation and only update fine rasterization to reverse the ordering of Y and X axis. This is much simpler than the previous approach! Additional changes: - updated mesh rendering end-end tests to check outputs from both naive and coarse to fine rasterization. - added pointcloud rendering end-end tests Reviewed By: gkioxari Differential Revision: D21102725 fbshipit-source-id: 2e7e1b013dd6dd12b3a00b79eb8167deddb2e89a
This commit is contained in:
committed by
Facebook GitHub Bot
parent
1e4749602d
commit
9ef1ee8455
@@ -19,12 +19,28 @@ class PointFragments(NamedTuple):
|
||||
|
||||
|
||||
# Class to store the point rasterization params with defaults
|
||||
class PointsRasterizationSettings(NamedTuple):
|
||||
image_size: int = 256
|
||||
radius: float = 0.01
|
||||
points_per_pixel: int = 8
|
||||
bin_size: Optional[int] = None
|
||||
max_points_per_bin: Optional[int] = None
|
||||
class PointsRasterizationSettings:
|
||||
__slots__ = [
|
||||
"image_size",
|
||||
"radius",
|
||||
"points_per_pixel",
|
||||
"bin_size",
|
||||
"max_points_per_bin",
|
||||
]
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
image_size: int = 256,
|
||||
radius: float = 0.01,
|
||||
points_per_pixel: int = 8,
|
||||
bin_size: Optional[int] = None,
|
||||
max_points_per_bin: Optional[int] = None,
|
||||
):
|
||||
self.image_size = image_size
|
||||
self.radius = radius
|
||||
self.points_per_pixel = points_per_pixel
|
||||
self.bin_size = bin_size
|
||||
self.max_points_per_bin = max_points_per_bin
|
||||
|
||||
|
||||
class PointsRasterizer(nn.Module):
|
||||
|
||||
Reference in New Issue
Block a user