pixelsplat icon indicating copy to clipboard operation
pixelsplat copied to clipboard

Applying inverse sigmoid for opacities in export_ply

Open pschroeppel opened this issue 8 months ago • 0 comments

Hi,

in the original 3DGS repo, when saving Gaussians to a .ply file, the opacity is saved in its unactivated form (i.e. before applying a sigmoid function): https://github.com/graphdeco-inria/gaussian-splatting/blob/54c035f7834b564019656c3e3fcc3646292f727d/scene/gaussian_model.py#L246

Based on this, I would assume, that any 3DGS viewer that loads a .ply file, will apply a sigmoid to the loaded opacities. Hence it would make sense to apply an inverse sigmoid function ( https://github.com/graphdeco-inria/gaussian-splatting/blob/54c035f7834b564019656c3e3fcc3646292f727d/utils/general_utils.py#L18 ) to the opacities before storing them in https://github.com/dcharatan/pixelsplat/blob/59d420a409cd0f059366808a9f956001536b55f1/src/model/ply_export.py#L26 .

A small disclaimer: I didn't look into code of 3DGS viewers, to confirm that they apply a sigmoid on the loaded opacities. However, I've played a bit with NoPoSplat and there I saw clear artifacts when visualizing my exported .ply files, which disappeared when I applied the inverse sigmoid before exporting. When visualizing exported .ply files from pixelSplat, the improvement is a bit less obvious, but in my opinion it also looks better, with the inverse sigmoid:

  • Without applying inverse sigmoid on the opacities before exporting (visualized using https://antimatter15.com/splat/): Image

  • With applying inverse sigmoid on the opacities before exporting: Image

It would be great if you could confirm whether the inverse sigmoid indeed makes sense here and potentially update the code. Thanks and best, Philipp

pschroeppel avatar Apr 24 '25 18:04 pschroeppel