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
6c0ae579
Commit
6c0ae579
authored
2 years ago
by
Thomas Müller-Höhne
Browse files
Options
Downloads
Patches
Plain Diff
Add `--overwrite` option to silence colmap2nerf.py warnings
parent
6c06f0bc
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/colmap2nerf.py
+3
-2
3 additions, 2 deletions
scripts/colmap2nerf.py
with
3 additions
and
2 deletions
scripts/colmap2nerf.py
+
3
−
2
View file @
6c0ae579
...
...
@@ -42,6 +42,7 @@ def parse_args():
parser
.
add_argument
(
"
--keep_colmap_coords
"
,
action
=
"
store_true
"
,
help
=
"
Keep transforms.json in COLMAP
'
s original frame of reference (this will avoid reorienting and repositioning the scene for preview and rendering).
"
)
parser
.
add_argument
(
"
--out
"
,
default
=
"
transforms.json
"
,
help
=
"
Output path.
"
)
parser
.
add_argument
(
"
--vocab_path
"
,
default
=
""
,
help
=
"
Vocabulary tree path.
"
)
parser
.
add_argument
(
"
--overwrite
"
,
action
=
"
store_true
"
,
help
=
"
Do not ask for confirmation for overwriting existing images and COLMAP data.
"
)
args
=
parser
.
parse_args
()
return
args
...
...
@@ -74,7 +75,7 @@ def run_ffmpeg(args):
video
=
"
\"
"
+
args
.
video_in
+
"
\"
"
fps
=
float
(
args
.
video_fps
)
or
1.0
print
(
f
"
running ffmpeg with input video file=
{
video
}
, output image folder=
{
images
}
, fps=
{
fps
}
.
"
)
if
(
input
(
f
"
warning! folder
'
{
images
}
'
will be deleted/replaced. continue? (Y/n)
"
).
lower
().
strip
()
+
"
y
"
)[:
1
]
!=
"
y
"
:
if
not
args
.
overwrite
and
(
input
(
f
"
warning! folder
'
{
images
}
'
will be deleted/replaced. continue? (Y/n)
"
).
lower
().
strip
()
+
"
y
"
)[:
1
]
!=
"
y
"
:
sys
.
exit
(
1
)
try
:
# Passing Images' Path Without Double Quotes
...
...
@@ -114,7 +115,7 @@ def run_colmap(args):
text
=
args
.
text
sparse
=
db_noext
+
"
_sparse
"
print
(
f
"
running colmap with:
\n\t
db=
{
db
}
\n\t
images=
{
images
}
\n\t
sparse=
{
sparse
}
\n\t
text=
{
text
}
"
)
if
(
input
(
f
"
warning! folders
'
{
sparse
}
'
and
'
{
text
}
'
will be deleted/replaced. continue? (Y/n)
"
).
lower
().
strip
()
+
"
y
"
)[:
1
]
!=
"
y
"
:
if
not
args
.
overwrite
and
(
input
(
f
"
warning! folders
'
{
sparse
}
'
and
'
{
text
}
'
will be deleted/replaced. continue? (Y/n)
"
).
lower
().
strip
()
+
"
y
"
)[:
1
]
!=
"
y
"
:
sys
.
exit
(
1
)
if
os
.
path
.
exists
(
db
):
os
.
remove
(
db
)
...
...
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