mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-12-22 23:30:35 +08:00
avoid deprecated raysamplers
Summary: Migrate away from NDCGridRaysampler and GridRaysampler to their more flexible replacements. Reviewed By: patricklabatut Differential Revision: D33281584 fbshipit-source-id: 65f8702e700a32d38f7cd6bda3924bb1707a0633
This commit is contained in:
committed by
Facebook GitHub Bot
parent
3eb4233844
commit
67778caee8
@@ -12,13 +12,13 @@ from common_testing import TestCaseMixin
|
||||
from pytorch3d.renderer import (
|
||||
BlendParams,
|
||||
EmissionAbsorptionRaymarcher,
|
||||
GridRaysampler,
|
||||
ImplicitRenderer,
|
||||
Materials,
|
||||
MeshRasterizer,
|
||||
MeshRenderer,
|
||||
MonteCarloRaysampler,
|
||||
NDCGridRaysampler,
|
||||
MultinomialRaysampler,
|
||||
NDCMultinomialRaysampler,
|
||||
PointLights,
|
||||
RasterizationSettings,
|
||||
RayBundle,
|
||||
@@ -142,7 +142,7 @@ class TestRenderImplicit(TestCaseMixin, unittest.TestCase):
|
||||
|
||||
# init a trivial renderer
|
||||
renderer = ImplicitRenderer(
|
||||
raysampler=NDCGridRaysampler(
|
||||
raysampler=NDCMultinomialRaysampler(
|
||||
image_width=100,
|
||||
image_height=100,
|
||||
n_pts_per_ray=10,
|
||||
@@ -180,7 +180,7 @@ class TestRenderImplicit(TestCaseMixin, unittest.TestCase):
|
||||
sphere_centroid.requires_grad = True
|
||||
|
||||
# init the grid raysampler with the ndc grid
|
||||
raysampler = NDCGridRaysampler(
|
||||
raysampler = NDCMultinomialRaysampler(
|
||||
image_width=image_size[1],
|
||||
image_height=image_size[0],
|
||||
n_pts_per_ray=256,
|
||||
@@ -355,7 +355,7 @@ class TestRenderImplicit(TestCaseMixin, unittest.TestCase):
|
||||
cameras = init_cameras(n_frames, image_size=image_size)
|
||||
|
||||
# init the grid raysampler
|
||||
raysampler = GridRaysampler(
|
||||
raysampler = MultinomialRaysampler(
|
||||
min_x=0.5,
|
||||
max_x=image_size[1] - 0.5,
|
||||
min_y=0.5,
|
||||
|
||||
Reference in New Issue
Block a user