Skip to content

Commit

Permalink
MAX_AUTO_RESOLUTION is ensured in auto downscale (#2788)
Browse files Browse the repository at this point in the history
Co-authored-by: Jianbo Ye <[email protected]>
  • Loading branch information
jb-ye and Jianbo Ye authored Jan 18, 2024
1 parent a8d5dc9 commit da57d3f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nerfstudio/data/dataparsers/colmap_dataparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ def get_fname(parent: Path, filepath: Path) -> Path:
max_res = max(h, w)
df = 0
while True:
if (max_res / 2 ** (df)) < MAX_AUTO_RESOLUTION:
if (max_res / 2 ** (df)) <= MAX_AUTO_RESOLUTION:
break
df += 1

Expand Down
2 changes: 1 addition & 1 deletion nerfstudio/data/dataparsers/nerfstudio_dataparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ def _get_fname(self, filepath: Path, data_dir: Path, downsample_folder_prefix="i
max_res = max(h, w)
df = 0
while True:
if (max_res / 2 ** (df)) < MAX_AUTO_RESOLUTION:
if (max_res / 2 ** (df)) <= MAX_AUTO_RESOLUTION:
break
if not (data_dir / f"{downsample_folder_prefix}{2**(df+1)}" / filepath.name).exists():
break
Expand Down

0 comments on commit da57d3f

Please sign in to comment.