Skip to content

Commit

Permalink
New raysamplers
Browse files Browse the repository at this point in the history
Summary: New MultinomialRaysampler succeeds GridRaysampler bringing masking and subsampling. Correspondingly, NDCMultinomialRaysampler succeeds NDCGridRaysampler.

Reviewed By: nikhilaravi, shapovalov

Differential Revision: D33256897

fbshipit-source-id: cd80ec6f35b110d1d20a75c62f4e889ba8fa5d45
  • Loading branch information
bottler authored and facebook-github-bot committed Jan 24, 2022
1 parent 174738c commit 3eb4233
Show file tree
Hide file tree
Showing 7 changed files with 411 additions and 60 deletions.
2 changes: 1 addition & 1 deletion projects/nerf/nerf/implicit_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from typing import Tuple

import torch
from pytorch3d.renderer import RayBundle, ray_bundle_to_ray_points, HarmonicEmbedding
from pytorch3d.renderer import HarmonicEmbedding, RayBundle, ray_bundle_to_ray_points

from .linear_with_repeat import LinearWithRepeat

Expand Down
2 changes: 2 additions & 0 deletions pytorch3d/renderer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
HarmonicEmbedding,
ImplicitRenderer,
MonteCarloRaysampler,
MultinomialRaysampler,
NDCGridRaysampler,
NDCMultinomialRaysampler,
RayBundle,
VolumeRenderer,
VolumeSampler,
Expand Down
9 changes: 8 additions & 1 deletion pytorch3d/renderer/implicit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,19 @@

from .harmonic_embedding import HarmonicEmbedding
from .raymarching import AbsorptionOnlyRaymarcher, EmissionAbsorptionRaymarcher
from .raysampling import GridRaysampler, MonteCarloRaysampler, NDCGridRaysampler
from .raysampling import (
GridRaysampler,
MonteCarloRaysampler,
MultinomialRaysampler,
NDCGridRaysampler,
NDCMultinomialRaysampler,
)
from .renderer import ImplicitRenderer, VolumeRenderer, VolumeSampler
from .utils import (
RayBundle,
ray_bundle_to_ray_points,
ray_bundle_variables_to_ray_points,
)


__all__ = [k for k in globals().keys() if not k.startswith("_")]
Loading

0 comments on commit 3eb4233

Please sign in to comment.