Add image tiling option to ColmapDataParser to use less memory #3685
+163
−12
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
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:
Default training:
Tiling training:
Exporting assets:
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.