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
822d5199
Commit
822d5199
authored
Nov 12, 2022
by
Ruilong Li
Browse files
fix entry script
parent
bc62c5b6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
examples/train_ngp_nerf_proposal.py
examples/train_ngp_nerf_proposal.py
+6
-4
No files found.
examples/train_ngp_nerf_proposal.py
View file @
822d5199
...
...
@@ -18,7 +18,7 @@ from datasets.utils import Rays, namedtuple_map
from
radiance_fields.ngp
import
NGPradianceField
from
utils
import
set_random_seed
from
nerfacc
import
ContractionType
,
ray_marching
,
rendering
from
nerfacc
import
ContractionType
,
pack_info
,
ray_marching
,
rendering
from
nerfacc.cuda
import
ray_pdf_query
...
...
@@ -80,7 +80,7 @@ def render_image(
)
for
i
in
range
(
0
,
num_rays
,
chunk
):
chunk_rays
=
namedtuple_map
(
lambda
r
:
r
[
i
:
i
+
chunk
],
rays
)
packed_info
,
t_starts
,
t_ends
,
proposal_sample_list
=
ray_marching
(
ray_indices
,
t_starts
,
t_ends
,
proposal_sample_list
=
ray_marching
(
chunk_rays
.
origins
,
chunk_rays
.
viewdirs
,
scene_aabb
=
scene_aabb
,
...
...
@@ -95,13 +95,15 @@ def render_image(
alpha_thre
=
alpha_thre
,
)
rgb
,
opacity
,
depth
,
weights
=
rendering
(
rgb_sigma_fn
,
packed_info
,
t_starts
,
t_ends
,
ray_indices
=
ray_indices
,
n_rays
=
len
(
chunk_rays
.
origins
),
rgb_sigma_fn
=
rgb_sigma_fn
,
render_bkgd
=
render_bkgd
,
)
if
radiance_field
.
training
:
packed_info
=
pack_info
(
ray_indices
,
n_rays
=
len
(
chunk_rays
.
origins
))
proposal_sample_list
.
append
(
(
packed_info
,
t_starts
,
t_ends
,
weights
)
)
...
...
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