WHU-USI3DV / SGHR

[CVPR 2023] Robust Multiview Point Cloud Registration with Reliable Pose Graph Initialization and History Reweighting
190 stars 15 forks source link

Why training takes several hours, how to speed it up #14

Open ywang864 opened 5 months ago

ywang864 commented 5 months ago

Hi, thank you for your great work, I am trying to reproduce your result on my local machine, but why the training take so long, does it even use GPU? How can I speed up the training if possible, Thank you

Screenshot from 2024-04-11 15-15-19

HpWang-whu commented 5 months ago

Hi @ywang864,

The architecture of SGHR is just a single NetVLAD layer, thus the GPU requirement of training is small. However, SGHR requires a pair of point cloud as input and their corresponding overlap ratio for supervision. To create various overlapping cases, we sample and crop a pc pair in trainset in each iteration and recalculate its overlap ratio. Such a pre-process is time-consuming and requires strong CPU.

To speed up the training, you might prepare many pc pairs with various overlap ratios and just load them in training. The preparation can use various acceleration strategies but might need more storages.

Yours,

ywang864 commented 4 months ago

Thank you so much for your reply. I have a new question, In your visual.py, how could I modify the code to save each pcd in the after-stitched pcds. I am trying to save those pieces as pts files to manually load them to a visualization software and observe how well the registration performs.

HpWang-whu commented 4 months ago

The transformed point clouds are here as a list of numpy.array. You can just save and visualize them according to your needs. https://github.com/WHU-USI3DV/SGHR/blob/fdfb0811f1ca5e3df741b2ca8f9180c702c83c20/visual.py#L50