Open
Description
Thanks for adding save_ply
(#234 #427).
However, there is a bug in save_ply
: the invalid_mask
calculation where np.isnan(opacities).any(axis=0)
marks the entire mask as True, causing all data points to be invalid. This happens because opacities
has shape (N,), and using axis=0
makes the any()
function return a single boolean value instead of row-wise filtering.
Steps to Reproduce:
- Run the code with an opacities array containing some NaN values.
- Observe that
invalid_mask
becomes completely True, invalidating all rows. This means no points will be saved.
Suggested Fix:
Replace
np.isnan(opacities).any(axis=0) | np.isinf(opacities).any(axis=0)
with
np.isnan(opacities) | np.isinf(opacities)
.
Version: Commit 1a1e0cc
Thanks for the great repo! Let me know if I can help with a fix.
Metadata
Metadata
Assignees
Labels
No labels