Skip to content

Conversation

couperle
Copy link
Contributor

@couperle couperle commented Jul 4, 2025

High resolution imagery can cause OOM during training. The colmap dataparser exposes a downscaling option to mitigate this, but the resulting lack of visual fidelity in the training data may not be desirable. I propose an alternative option: tile the images.

For example, with a tiling factor of 2, each image is split (down the middle in each dimension) into 4 tiles of roughly equal size:

frame_00001

frame_00001_0 frame_00001_1
frame_00001_2 frame_00001_3

The resulting training requires less GPU memory and runs faster over the same number of iterations. On the nerfstudio poster dataset, there is a noticeable improvement in the quality of the asset:

poster_defaultposter_tiling

Default training:

ns-train splatfacto --pipeline.datamanager.cache_images_type=uint8 --viewer.quit-on-train-completion=True --data=data/nerfstudio/poster --output_dir=train --experiment_name=default_pre --max-num-iterations=30000 --timestamp=20200404_000000 --logging.local-writer.max-log-size=0 colmap --orientation_method=none --auto_scale_poses=False --center_method=none --assume_colmap_world_coordinate_convention=False --colmap_path=colmap/sparse/0 --max_2D_matches_per_3D_point=0 --eval-mode=fraction --train-split-fraction=1

Tiling training:

ns-train splatfacto --pipeline.datamanager.cache_images_type=uint8 --viewer.quit-on-train-completion=True --data=data/nerfstudio/poster --output_dir=train --experiment_name=default_pre --max-num-iterations=30000 --timestamp=20200404_000000 --logging.local-writer.max-log-size=0 colmap --orientation_method=none --auto_scale_poses=False --center_method=none --assume_colmap_world_coordinate_convention=False --colmap_path=colmap/sparse/0 --max_2D_matches_per_3D_point=0 --eval-mode=fraction --train-split-fraction=1 --downscale_factor=1 --tiling_factor=2

Exporting assets:

ns-export gaussian-splat --load-config train/default_pre/splatfacto/20200404_000000/config.yml --output-dir output

I also rendered the asset trained with tiling using the original non-tiled cameras to check for artifacts at the seams; there are none.

The default behavior of the colmap dataparser does not change.

@f-dy
Copy link
Contributor

f-dy commented Jul 8, 2025

I reviewed this PR. Improvement is clearly visible and measurable.

@couperle couperle changed the title Add tiling option to ColmapDataParser Add image tiling option to ColmapDataParser to use less memory Jul 8, 2025
Copy link
Collaborator

@brentyi brentyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good to me as well. Thank you @couperle @f-dy!

@brentyi brentyi merged commit 50e0e3c into nerfstudio-project:main Jul 29, 2025
3 checks passed
@seppestaes
Copy link

The comparison on the nerfstudio poster dataset, is it "downscale vs tiling", or rather "no downscale vs tiling"

@couperle
Copy link
Contributor Author

couperle commented Sep 2, 2025

The comparison on the nerfstudio poster dataset, is it "downscale vs tiling", or rather "no downscale vs tiling"

downscale vs tiling

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants