mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-12-14 11:26:24 +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
@@ -8,7 +8,7 @@ import math
|
||||
from typing import List
|
||||
|
||||
import torch
|
||||
from pytorch3d.renderer import MonteCarloRaysampler, NDCGridRaysampler, RayBundle
|
||||
from pytorch3d.renderer import MonteCarloRaysampler, NDCMultinomialRaysampler, RayBundle
|
||||
from pytorch3d.renderer.cameras import CamerasBase
|
||||
from pytorch3d.renderer.implicit.sample_pdf import sample_pdf
|
||||
|
||||
@@ -150,7 +150,7 @@ class NeRFRaysampler(torch.nn.Module):
|
||||
self._stratified_test = stratified_test
|
||||
|
||||
# Initialize the grid ray sampler.
|
||||
self._grid_raysampler = NDCGridRaysampler(
|
||||
self._grid_raysampler = NDCMultinomialRaysampler(
|
||||
image_width=image_width,
|
||||
image_height=image_height,
|
||||
n_pts_per_ray=n_pts_per_ray,
|
||||
|
||||
Reference in New Issue
Block a user