Bug Report: Inconsistent Depth Representation in GaussianAdapter Leading to Distorted Gaussians
Summary
Issues #236 and #100 report distortion in Gaussian representations produced by GaussianAdapter. After investigation, the root cause appears to be inconsistent handling of depth representations (z-depth vs. ray distance), along with a potentially misbehaving depth_offset.
Observations
-
Mismatch in Depth Representation
GaussianAdapter.forward takes output.depth as input.
- This depth is z-depth (camera coordinate), but later computations treat it as ray distance when deriving Gaussian means.
- This inconsistency leads to incorrect spatial positioning.
-
Incorrect Use of depth_offset
depth_offset = raw_gaussians[..., -1] is directly added to gs_depths.
- Evidence suggests
depth_offset is likely defined in ray distance space, causing further inconsistency when combined with z-depth.
-
Empirical Validation
Several fixes were tested:
- Converting
depth_offset into z-depth offset before adding → still incorrect
- Converting
output.depth to ray distance before adding depth_offset → still incorrect
These results suggest:
- The issue is not only representation mismatch
depth_offset itself is likely poorly learned or unstable, contributing significantly to the distortion
Proposed Fix
-
Use z-depth for unprojection
- Compute Gaussian means via z-depth-based unprojection, ensuring consistency with the original depth definition.
-
Disable depth_offset
- Given its unstable behavior and lack of reliable contribution, removing or disabling
depth_offset improves correctness.
Additional Notes
- The problem likely stems from mixed assumptions about depth parameterization during training vs. inference.
- A more robust solution may require revisiting how
depth_offset is supervised or parameterized.
Expected Outcome
Applying the above fixes should eliminate the observed Gaussian distortion and produce geometrically consistent Gaussian means.
Please let me know if further experiments or ablations are needed.
Bug Report: Inconsistent Depth Representation in
GaussianAdapterLeading to Distorted GaussiansSummary
Issues #236 and #100 report distortion in Gaussian representations produced by
GaussianAdapter. After investigation, the root cause appears to be inconsistent handling of depth representations (z-depth vs. ray distance), along with a potentially misbehavingdepth_offset.Observations
Mismatch in Depth Representation
GaussianAdapter.forwardtakesoutput.depthas input.Incorrect Use of
depth_offsetdepth_offset = raw_gaussians[..., -1]is directly added togs_depths.depth_offsetis likely defined in ray distance space, causing further inconsistency when combined with z-depth.Empirical Validation
Several fixes were tested:
depth_offsetinto z-depth offset before adding → still incorrectoutput.depthto ray distance before addingdepth_offset→ still incorrectThese results suggest:
depth_offsetitself is likely poorly learned or unstable, contributing significantly to the distortionProposed Fix
Use z-depth for unprojection
Disable
depth_offsetdepth_offsetimproves correctness.Additional Notes
depth_offsetis supervised or parameterized.Expected Outcome
Applying the above fixes should eliminate the observed Gaussian distortion and produce geometrically consistent Gaussian means.
Please let me know if further experiments or ablations are needed.