drprojects/superpoint_transformer

Speeding up the NAG generation

Closed this issue · 1 comments

Greetings,

Firstly, thank you so much for this awesome repo and papers! They are all very fantastic and exciting works!

I just wanna ask if there are some general tips of speeding up the NAG generation from the raw data, like what are the parameters in the config file I should pay attention to, or any other tricks?

Thank you!

Hi @ecustWallace thanks for your interest in the project !

As you can imagine, the parametrization for the preprocessing we use for the implemented datasets is the best we could find to strike a balance between computation speed and downstream performance. So trying to make it faster is in itself a little research project 😉

The parts that usually take the most time in the preprocessing are, in decreasing order:

  • CutPursuitPartition - hierarchical partition
  • RadiusHorizontalGraph - superpoint adjacency graph and associated edge features
  • KNN - nearest neighbor search

That being said, here are the parameters in the configs/datamodule/semantic/your_datamodule.yaml that impact the preprocessing speed the most. Up to you to play with those, see if it helps your downstream task, and to profile the preprocessing to check which part takes too long for you:

  • voxel - increase to reduce number of points in $P_0$
  • knn - reduce to save some KNN search time
  • knn_r - reduce to save some KNN search time
  • pcp_regularization - increase values to speed up CutPursuitPartition but with coarser partititon
  • pcp_spatial_weight - reduce values to speed up CutPursuitPartition but with coarser partititon
  • pcp_k_adjacency - reduce values to speed up CutPursuitPartition but with less regularized partition
  • pcp_cutoff - increase values to (maybe) speed up CutPursuitPartition a little but with coarser partititon
  • pcp_iterations - reduce values to speed up CutPursuitPartition but with potentially-not-converged partititon (wouldn't recommend)
  • graph_k_max - reduce to accelerate RadiusHorizontalGraph but with fewer edges per superpoint
  • graph_gap - reduce to accelerate RadiusHorizontalGraph but with fewer edges per superpoint

Again, up to you to investigate this on your specific use case !