Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
nerfacc
Commits
9f0468ad
Unverified
Commit
9f0468ad
authored
Sep 18, 2022
by
Matthew Tancik
Committed by
GitHub
Sep 18, 2022
Browse files
Minor type fixes (#24)
parent
93c059ea
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
nerfacc/utils.py
nerfacc/utils.py
+1
-1
nerfacc/volumetric_rendering.py
nerfacc/volumetric_rendering.py
+2
-1
No files found.
nerfacc/utils.py
View file @
9f0468ad
...
...
@@ -47,7 +47,7 @@ def volumetric_marching(
render_step_size
:
float
=
1e-3
,
near_plane
:
float
=
0.0
,
stratified
:
bool
=
False
,
)
->
Tuple
[
torch
.
Tensor
,
torch
.
Tensor
,
torch
.
Tensor
,
torch
.
Tensor
,
torch
.
Tensor
]:
)
->
Tuple
[
torch
.
Tensor
,
torch
.
Tensor
,
torch
.
Tensor
]:
"""Volumetric marching with occupancy test.
Note: this function is not differentiable to inputs.
...
...
nerfacc/volumetric_rendering.py
View file @
9f0468ad
...
...
@@ -69,10 +69,10 @@ def volumetric_rendering_pipeline(
rays_d
=
rays_d
.
contiguous
()
scene_aabb
=
scene_aabb
.
contiguous
()
scene_occ_binary
=
scene_occ_binary
.
contiguous
()
render_bkgd
=
render_bkgd
.
contiguous
()
with
torch
.
no_grad
():
# Ray marching and occupancy check.
assert
scene_resolution
is
not
None
packed_info
,
frustum_starts
,
frustum_ends
=
volumetric_marching
(
rays_o
,
rays_d
,
...
...
@@ -126,6 +126,7 @@ def volumetric_rendering_pipeline(
# )
if
render_bkgd
is
not
None
:
render_bkgd
=
render_bkgd
.
contiguous
()
colors
=
colors
+
render_bkgd
*
(
1.0
-
opacities
)
return
colors
,
opacities
,
n_marching_samples
,
n_rendering_samples
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment