Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
instant-ngp-tomography
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Thomas Pickles
instant-ngp-tomography
Commits
8f58bcaf
Commit
8f58bcaf
authored
2 years ago
by
Thomas Müller
Browse files
Options
Downloads
Patches
Plain Diff
Infer mode from snapshot when possible
parent
e0c16864
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
scripts/run.py
+3
-11
3 additions, 11 deletions
scripts/run.py
scripts/scenes.py
+12
-0
12 additions, 0 deletions
scripts/scenes.py
with
15 additions
and
11 deletions
scripts/run.py
+
3
−
11
View file @
8f58bcaf
...
...
@@ -71,17 +71,9 @@ def parse_args():
if
__name__
==
"
__main__
"
:
args
=
parse_args
()
if
args
.
mode
==
""
:
if
args
.
scene
in
scenes_sdf
:
args
.
mode
=
"
sdf
"
elif
args
.
scene
in
scenes_nerf
:
args
.
mode
=
"
nerf
"
elif
args
.
scene
in
scenes_image
:
args
.
mode
=
"
image
"
elif
args
.
scene
in
scenes_volume
:
args
.
mode
=
"
volume
"
else
:
raise
ValueError
(
"
Must specify either a valid
'
--mode
'
or
'
--scene
'
argument.
"
)
args
.
mode
=
args
.
mode
or
mode_from_scene
(
args
.
scene
)
or
mode_from_scene
(
args
.
load_snapshot
)
if
not
args
.
mode
:
raise
ValueError
(
"
Must specify either a valid
'
--mode
'
or
'
--scene
'
argument.
"
)
if
args
.
mode
==
"
sdf
"
:
mode
=
ngp
.
TestbedMode
.
Sdf
...
...
This diff is collapsed.
Click to expand it.
scripts/scenes.py
+
12
−
0
View file @
8f58bcaf
...
...
@@ -230,3 +230,15 @@ def default_snapshot_filename(scene):
if
scene
[
"
dataset
"
]:
filename
=
f
"
{
os
.
path
.
splitext
(
scene
[
'
dataset
'
])[
0
]
}
_
{
filename
}
"
return
os
.
path
.
join
(
scene
[
"
data_dir
"
],
filename
)
def
mode_from_scene
(
scene
):
if
scene
in
scenes_sdf
:
return
"
sdf
"
elif
scene
in
scenes_nerf
:
return
"
nerf
"
elif
scene
in
scenes_image
:
return
"
image
"
elif
scene
in
scenes_volume
:
return
"
volume
"
else
:
return
""
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment