Repository navigation
fix: resample training images in FlexibleDataManager - #19
Merged
Merged
Conversation
FlexibleDataManagerConfig forces train_num_images_to_sample_from=1 but inherited train_num_times_to_repeat_images=-1 from VanillaDataManagerConfig, so CacheDataloader cached a single training image at startup and never rotated to another. Methods built on this config (geo-neus, geo-volsdf, geo-unisurf) overfit one view by default. Default train_num_times_to_repeat_images to 0 so a new single image is resampled every iteration, and turn the "without resampling" dataloader message into a warning so the same footgun is loud for any other config hitting it. Closes #18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
FlexibleDataManagerConfigforcestrain_num_images_to_sample_from=1but inheritstrain_num_times_to_repeat_images=-1fromVanillaDataManagerConfig. InCacheDataloaderthat combination caches one randomly chosen training image at startup and never resamples another, so any method on this config trains against a single view. Affected methods:geo-neus,geo-volsdf,geo-unisurf.Closes: #18
Changes
FlexibleDataManagerConfig.train_num_times_to_repeat_imagesto0, so a new single image is resampled every iteration instead of caching one forever.train_num_images_to_sample_fromis pinned to 1 (each batch is one reference image plus its source views inFlexibleDataManager.next_train).CacheDataloader"without resampling" message into a warning, so the same footgun is loud for any other config that setsnum_times_to_repeat_images=-1with a subset of images.tests/data/test_dataloaders.pycovering the resampling behaviour and the corrected config default.Type of Change
Testing
sdf-dev-test(required)Ran on the changed files (full
sdf-dev-testblocked locally by thetinycudannGPU build):uv run --no-sync ruff format --check+ruff check— passuv run --no-sync pyright sdfstudio/...— 0 errorsuv run --no-sync pytest tests/data/test_dataloaders.py— 3 passedChecklist