Skip to content

Commit

Permalink
MAX_AUTO_RESOLUTION is ensured in auto downscale (nerfstudio-project#…
Browse files Browse the repository at this point in the history
…2788)

Co-authored-by: Jianbo Ye <[email protected]>
  • Loading branch information
2 people authored and ArpegorPSGH committed Jun 22, 2024
1 parent 1cba664 commit f659bc2
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 f659bc2

Please sign in to comment.