Skip to content

Input masks to suppress background/uncertain regions during splat optimization - #240

Closed
patriciogonzalezvivo wants to merge 2 commits into
WebODM:mainfrom
patriciogonzalezvivo:main
Closed

Input masks to suppress background/uncertain regions during splat optimization#240
patriciogonzalezvivo wants to merge 2 commits into
WebODM:mainfrom
patriciogonzalezvivo:main

Conversation

@patriciogonzalezvivo

Copy link
Copy Markdown

This PR adds support for loading optional masks to the input pipeline in order to ignore unwanted regions during training. When --masks <FILES> are provided, the training routine uses them to weight or exclude those pixels from the splatting process, leading to cleaner reconstructions and less bleed-through from background or occluded areas.

Disclosure: this PR was made with the assistance of Claude Sonnet 4.6

What changed:

  • Added mask-aware input handling for image data
  • Propagated masks through the training/optimization path
  • Adjusted the loss/weighting logic so masked regions contribute less or nothing to the splat fit
  • Refined the masking behavior to reduce edge leakage around masked boundaries

How to use it:

opensplat \
  --images image_001.png image_002.png image_003.png \
  --masks mask_001.png mask_002.png mask_003.png

Test

Inputs:

Screenshot 2026-07-28 at 7 52 41鈥疉M Screenshot 2026-07-28 at 7 52 28鈥疉M

Outputs:

https://superspl.at/scene/5b21b509

@pierotofy

Copy link
Copy Markdown
Member

Approach is no good unfortunately. See #225 where current efforts are underway for a proper masking method.

@pierotofy pierotofy closed this Jul 28, 2026
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.

2 participants