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

Support MCMC Strategy in Splatfacto #3436

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yufengzh
Copy link
Contributor

This PR adds the MCMC strategy for Splatfacto. To use, specify the following in the CLI argument:

ns-train splatfacto --pipeline.model.strategy=mcmc

@abrahamezzeddine
Copy link

abrahamezzeddine commented Sep 24, 2024

Hello,

I just tried this and it seems to work. I am however wondering about the huge splats being created and large splats going straight through the model, which creates the illusion of hue artifacts inside the area of interest. See image below;

image

Is that an inherent problem with mcmc in general? Another example with depth map to show how huge splats are just "going through" the model

image

They are several magnitudes larger than sparse cloud itself.

@kerrj
Copy link
Collaborator

kerrj commented Oct 1, 2024

Thanks for the PR! I believe this is missing the opacity + scale regularization in the original MCMC paper, do you think you could add those? that might be a reason for these large gaussians during training

@yufengzh
Copy link
Contributor Author

yufengzh commented Oct 2, 2024

Does gsplat have those regularization terms implemented or not yet?

@CameronFraser
Copy link
Contributor

CameronFraser commented Oct 3, 2024

@yufengzh they are not part of gsplat, there is an example here for how to implement: https://github.com/nerfstudio-project/gsplat/blob/main/examples/simple_trainer.py#L661

  # regularizations
  if cfg.opacity_reg > 0.0:
      loss = (
          loss
          + cfg.opacity_reg
          * torch.abs(torch.sigmoid(self.splats["opacities"])).mean()
      )
  if cfg.scale_reg > 0.0:
      loss = (
          loss
          + cfg.scale_reg * torch.abs(torch.exp(self.splats["scales"])).mean()
      )

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