gaussian-splatting
gaussian-splatting copied to clipboard
On filtering gaussians by size
trafficstars
Hi GS community,
I'm trying to filter gaussians by size to get rid of the giant gaussians that tend to get in my scene during the training. To get a rough first try at solving my problem I tried this :
def filter_GS_by_size(self):
magnitudes = torch.norm(self._scaling, dim=1)
threshold = torch.quantile(magnitudes, 0.95)
valid_points_mask = magnitudes < threshold
return valid_points_mask
And then adding this mask to the pruning algorithm in densify_and_prune() :
...
self.valid_size_mask = self.filter_GS_by_size()
prune_mask = torch.logical_or(prune_mask, ~self.valid_size_mask)
self.prune_points(prune_mask)
However it is not working the way I was picturing it. Those big gaussians are not suppressed in the process and the parts of the scene that were well learnt before are now pruned as well in a weird fashion.
Has anyone succeeded in filtering the gaussians ?
Best,
Hugo