GradientSpaces / LoopSplat

[3DV 2025] LoopSplat: Loop Closure by Registering 3D Gaussian Splats
https://loopsplat.github.io/
MIT License
264 stars 12 forks source link

Failed to converge #3

Closed yaorz97 closed 2 months ago

yaorz97 commented 3 months ago

Thank you for your excellent work! When I try to reproduce the results on ScanNet, an error occurs. Can you tell me how to fix it?

notConverge

Zhu-Liyuan commented 2 months ago

Thank you for trying our code. This is the first time I have encountered this, which never happens on my machine. It seems that the averaging produced some unexpected values.

You can add this in solver.py

    try:
        R_w = roma.special_procrustes(M)
    except Exception as e:
        print(f"Error in roma.special_procrustes: {e}")
        return {
            'successful': False,
            "pred_tsfm": torch.eye(4).cuda(),
            "gt_tsfm": torch.eye(4).cuda(),
            "overlap": init_overlap.item()
        }

You can pull the updated code and try again.

Zhu-Liyuan commented 2 months ago

Closing this issue. Feel free to ask again if you have any problems.

yaorz97 commented 2 months ago

Thanks for your prompt reply! I will try it again and compare the results with those reported in the paper.

Zhu-Liyuan commented 2 months ago

Sounds good. Did you meet this bug at the beginning of the run or just on a single scene?

yaorz97 commented 2 months ago

We encountered this bug in scenes 54 and 59, but successfully handled scene 106.

unique1i commented 2 months ago

Hi @yaorz97, to double check, are the frames with inf values in poses filtered out? There are inf values in scene 0054 and 0059.

yaorz97 commented 2 months ago

Yes, I have processed the frames by scripts/scannet_preprocess.ipynb, and the valid frames were selected. The gt_pose.txt file of scene 54 was saved and you can check it. gt_pose.txt