pierotofy / OpenSplat

Production-grade 3D gaussian splatting with CPU/GPU support for Windows, Mac and Linux 🚀
https://antimatter15.com/splat/?url=https://splat.uav4geo.com/banana.splat
GNU Affero General Public License v3.0
924 stars 87 forks source link

Remove floaters #57

Open pierotofy opened 8 months ago

pierotofy commented 8 months ago

There should be a way to reduce/filter floaters.

image

These significantly reduce the quality of visualization.

I thought about doing a nearest neighbor search from of the splat means compared to the points in the initial point cloud and filter any splat that is not within X units of an original point. But I don't know if this would work, as certain areas could have no initialization points. If there are better/proven methods I'd like to hear it.

pfxuan commented 8 months ago

This method can give some help. But it’s a little computation heavy.

pierotofy commented 8 months ago

Interesting, it's similar to this one from PDAL: https://pdal.io/en/2.7.0/stages/filters.outlier.html#statistical-method (which can be made to run fast).

pfxuan commented 8 months ago

Good idea. Open3D also has a few similar built-in functions: https://www.open3d.org/docs/latest/tutorial/Advanced/pointcloud_outlier_removal.html

pierotofy commented 8 months ago

I've tried to implement this method in https://github.com/pierotofy/OpenSplat/tree/filter, but although there's some reduction of noise, there's also an increase in other parts (at least in the train dataset) near the object of interest. The validation loss also seems to increase.

pfxuan commented 8 months ago

Perhaps removing floaters could be considered as a post-processing step after the 3DGS model gets fully trained. Additionally, I found enhancing the training code, improving camera pose, and removing blurry image could substantially minimize floating artifacts.