loicland / superpoint_graph

Large-scale Point Cloud Semantic Segmentation with Superpoint Graphs
MIT License
758 stars 214 forks source link

How to control the number of superpoints in a room? #277

Closed MEIXuYan closed 1 year ago

MEIXuYan commented 1 year ago

Hello,

Thank you for sharing the code. Could please show me how to control the number of superpoints in a room in both supervised and unsupervised partion?

ardianumam commented 1 year ago

Up! I also wonder how to adjust the number of superpoints in the method.

Thanks.

loicland commented 1 year ago

You can simply change --reg_strength: higher values will yield fewer superpoints.

With supervised partitions, you have more options:

--CP_cutoff determine the minimum size of a Superpoint

--spatial_emb determines the weight of the spatial extent of superpoints : high value -> superpoint mostly determined by position, low value: mostly by geometry/color.

ardianumam commented 1 year ago

@loicland : Thanks for your reply :) The --CP_cutoff and --spatial_emb are understandable to me. For reg_strength, could you elaborate more on how this value can impact the number of superpoints? I know, in this code, it will be used in the cut-pursuit algorithm. But I still don't know intuitively how this hyperparameter will impact to the superpoints number in the cut-pursuit algorithm. Thanks!

loicland commented 1 year ago

Cut pursuit approximates a signal on a graph with simple (short) contour. To do so, we penalize a fidelity loss with the weight of the cut between constant component multiplied by reg_strength. To simplify, this reg_strength expresses how much approximation error is allowed per unit of contour (cut edges). In our case, since the graph signal approximated is a set of geometric/radiometric features , it rules the tradeoff between the simplicity of their geometry and the length of their shapes.

Small reg_strength: the contour penalty is not very important, will yield many small superpoint with very simple geometry.

Large reg_strength: the contour penalty dominates, will yield few superpoint with very simple contours but potentially complex geometry.

In practice, the relationship between reg_strength and the number of superpoints is complicated and depends on many things (point density, sensor precision, what kind of shapes you are using, etc.). The easiest way would be to try a few values on a sample scene until the smallest objects of interest are in their own superpoint.

MEIXuYan commented 1 year ago

@loicland Thank you for your reply. I have read the ssp papar and found the regularization strength definition(Supplementary Material A.1) in the GPMP equation, thank you for your explanation again. But I am still confusing about how the --spatial_emb can influence the number of superpoints? In my understanding the supervised LPE generate the main feature for cut pursuit algorithm.

loicland commented 1 year ago

Hi!

We are releasing a new version of SuperPoint Graph called SuperPoint Transformer (SPT).

https://github.com/drprojects/superpoint_transformer

It is better in any way:

✨ SPT in numbers ✨
📊 SOTA results: 76.0 mIoU S3DIS 6-Fold, 63.5 mIoU on KITTI-360 Val, 79.6 mIoU on DALES
🦋 212k parameters only!
⚡ Trains on S3DIS in 3h on 1 GPU
Preprocessing is x7 faster than SPG!
🚀 Easy install (no more boost!)

If you are interested in lightweight, high-performance 3D deep learning, you should check it out. In the meantime, we will finally retire SPG and stop maintaining this repo.