Skip to content

Commit

Permalink
Fix dataparser filename bug (nerfstudio-project#1013)
Browse files Browse the repository at this point in the history
  • Loading branch information
tancik committed Jan 20, 2023
1 parent 6c2d346 commit b597484
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nerfstudio/data/dataparsers/nerfstudio_dataparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def _get_fname(self, filepath: PurePath, downsample_folder_prefix="images_") ->
while True:
if (max_res / 2 ** (df)) < MAX_AUTO_RESOLUTION:
break
if not (self.config.data / downsample_folder_prefix + f"{2**(df+1)}" / filepath.name).exists():
if not (self.config.data / f"{downsample_folder_prefix}{2**(df+1)}" / filepath.name).exists():
break
df += 1

Expand All @@ -218,5 +218,5 @@ def _get_fname(self, filepath: PurePath, downsample_folder_prefix="images_") ->
self.downscale_factor = self.config.downscale_factor

if self.downscale_factor > 1:
return self.config.data / downsample_folder_prefix + f"{self.downscale_factor}" / filepath.name
return self.config.data / f"{downsample_folder_prefix}{self.downscale_factor}" / filepath.name
return self.config.data / filepath

0 comments on commit b597484

Please sign in to comment.