Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Monodepth Regularization #2284

Merged
merged 28 commits into from
Aug 2, 2023
Merged

Monodepth Regularization #2284

merged 28 commits into from
Aug 2, 2023

Conversation

ethanweber
Copy link
Collaborator

@ethanweber ethanweber commented Aug 1, 2023

I created this PR to resolve the GitHub actions issues from PRs #2252 and #2066, which were duplicates. See PR #2066 for a detailed discussion and the contributions from @AdamRashid96.

This line change is particularly important because we call setup() with kwargs elsewhere. We rely on being able to change the default num_rays_per_batch in the test_train.py script, and the small value of 4 for testing was never actually passed through. I believe this lead to an out of memory issue and therefore GitHub actions failing with the non-descriptive error of Error: The operation was canceled.

This was referenced Aug 1, 2023
Copy link
Contributor

@AdamRashid96 AdamRashid96 left a comment

Choose a reason for hiding this comment

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

Thanks for finding that bug Ethan! I looked over the other changes you made and they all look good. I think it's finally ready to be merged into main.

tests/data/lego_test/train/depths.npy Outdated Show resolved Hide resolved
nerfstudio/models/nerfacto.py Show resolved Hide resolved
nerfstudio/models/nerfacto.py Show resolved Hide resolved
nerfstudio/data/pixel_samplers.py Outdated Show resolved Hide resolved
nerfstudio/data/datamanagers/base_datamanager.py Outdated Show resolved Hide resolved
@ethanweber
Copy link
Collaborator Author

LGTM!

@AdamRashid96 AdamRashid96 merged commit 71c6b9c into main Aug 2, 2023
4 checks passed
@AdamRashid96 AdamRashid96 deleted the monodepth_regularization branch August 2, 2023 01:52
mask: Optional[Tensor] = None,
device: Union[torch.device, str] = "cpu",
) -> Int[Tensor, "batch_size 3"]:
if mask:
Copy link

Choose a reason for hiding this comment

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

I think this should be: if mask is None. My transforms.json contains masks and as a result the code fails when maks tensor does not evaluate as a boolean expression.

Maybe it would be possible to add instructions to the NotImplementedError message on what needs to be adjusted in the configuration for the code to work with mask images (my case)? Naybe automatically fall back to the PixelSampler, if that's the solution?

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.

None yet

4 participants