Skip to content

Commit

Permalink
Fixing the image_dir if using skip_image_processing (nerfstudio-proje…
Browse files Browse the repository at this point in the history
…ct#2111)

Co-authored-by: khoa <[email protected]>
Co-authored-by: Matthew Tancik <[email protected]>
  • Loading branch information
3 people authored Jun 21, 2023
1 parent ccb8a25 commit b747db6
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,15 @@ def _run_colmap(self, mask_path: Optional[Path] = None):
if self.refine_pixsfm:
assert sfm_tool == "hloc", "refine_pixsfm only works with sfm_tool hloc"

# set the image_dir if didn't copy
if self.skip_image_processing:
image_dir = self.data
else:
image_dir = self.image_dir

if sfm_tool == "colmap":
colmap_utils.run_colmap(
image_dir=self.image_dir,
image_dir=image_dir,
colmap_dir=self.absolute_colmap_path,
camera_model=CAMERA_MODELS[self.camera_type],
camera_mask_path=mask_path,
Expand All @@ -208,7 +214,7 @@ def _run_colmap(self, mask_path: Optional[Path] = None):
assert matcher_type is not None
assert matcher_type != "NN" # Only used for colmap.
hloc_utils.run_hloc(
image_dir=self.image_dir,
image_dir=image_dir,
colmap_dir=self.absolute_colmap_path,
camera_model=CAMERA_MODELS[self.camera_type],
verbose=self.verbose,
Expand Down

0 comments on commit b747db6

Please sign in to comment.