Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run.py finishes with errors. #9

Open
jedivova opened this issue Oct 29, 2024 · 5 comments
Open

run.py finishes with errors. #9

jedivova opened this issue Oct 29, 2024 · 5 comments

Comments

@jedivova
Copy link

jedivova commented Oct 29, 2024

Evaluation of the trajectory error is failing for Replica dataset.
Environment was builded using docker-compose.yml.

Here is the log:

root@713cf4ce749b:/workspace/Splat-SLAM# python run.py configs/Replica/room1.yaml
------------------------------
Start Splat-SLAM at 2024-10-29 14:36:22,
   scene: replica-room1,
   only_tracking: False,
   output: output/Replica/room1
------------------------------
[INFO] Load droid pretrained checkpoint from pretrained/droid.pth!
[MAPPER] Mapping Triggered!
[TRACKER] Tracking Triggered!
  0%|                                                                                                                                                             | 0/2000 [00:00<?, ?it/s]/opt/conda/lib/python3.10/site-packages/torchvision/transforms/functional.py:1603: UserWarning: The default value of the antialias parameter of all the resizing transforms (Resize(), RandomResizedCrop(), etc.) will change from None to True in v0.17, in order to be consistent across the PIL and Tensor backends. To suppress this warning, directly pass antialias=True (recommended, future default), antialias=None (current default, which means False for Tensors and True for PIL), or antialias=False (only works on Tensors - PIL will still use antialiasing). This also applies if you are using the inference transforms from the models weights: update the call to weights.transforms(antialias=True).
  warnings.warn(
[TRACKER] : 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▉| 1999/2000 [04:33<00:00,  7.30it/s]Done with Mapping and Tracking
[TRACKER] : 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2000/2000 [04:33<00:00,  7.30it/s]
[TRACKER] Tracking Done!
[MAPPER] 
Mapping Frame None ...
[MAPPER] Mapping Done!
[TRACKER] Final Global BA Triggered!
[TRACKER] Final Global BA Done!
[INFO] Saved final depth video: output/Replica/room1/video.npz
Process Process-3:
Traceback (most recent call last):
  File "/workspace/Splat-SLAM/src/slam.py", line 171, in terminate
    ate_statistics, global_scale, r_a, t_a = kf_traj_eval(
  File "/workspace/Splat-SLAM/src/utils/eval_traj.py", line 114, in kf_traj_eval
    r_a, t_a, s, traj_est, traj_ref = align_kf_traj(npz_path, stream,printer=printer)
  File "/workspace/Splat-SLAM/src/utils/eval_traj.py", line 46, in align_kf_traj
    r_a, t_a, s = traj_est.align(traj_ref, correct_scale=True)
  File "/opt/conda/lib/python3.10/site-packages/evo/core/trajectory.py", line 250, in align
    r_a, t_a, s = geometry.umeyama_alignment(self.positions_xyz.T,
  File "/opt/conda/lib/python3.10/site-packages/evo/core/geometry.py", line 70, in umeyama_alignment
    raise GeometryException("Degenerate covariance rank, "
evo.core.geometry.GeometryException: Degenerate covariance rank, Umeyama alignment is not possible

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/conda/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap
    self.run()
  File "/opt/conda/lib/python3.10/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/workspace/Splat-SLAM/src/slam.py", line 117, in mapping
    self.terminate()
  File "/workspace/Splat-SLAM/src/slam.py", line 176, in terminate
    self.printer.print(e,FontColor.ERROR)
  File "/workspace/Splat-SLAM/src/utils/Printer.py", line 63, in print
    msg = msg_prefix + msg + Style.RESET_ALL
TypeError: can only concatenate str (not "GeometryException") to str
------------------------------
Splat-SLAM finishes!
2024-10-29 14:41:08
------------------------------
[W CudaIPCTypes.cpp:15] Producer process has been terminated before all shared CUDA tensors released. See Note [Sharing CUDA tensors]

Also I have a question: How to view saved map?

@eriksandstroem
Copy link
Collaborator

The error you see happens when the alignment of the predicted and ground truth trajectories cannot be made. This usually happens when you evaluate on very few frames. Did you evaluate on all 2000 frames?

Regarding viewing the saved map, there will be a mesh constructed that you can view in meshlab. You can also save the Gaussian .ply file though as some works do, but then you need to use a gaussian viewer.

@jedivova
Copy link
Author

jedivova commented Nov 4, 2024

Did you evaluate on all 2000 frames?

I did not changed anything. Just builded docker container and tried room0-room2 and office0-office2 - it fails on everything I tried. May be some inconsistency in the docker image.

@eriksandstroem
Copy link
Collaborator

Hmmm.. did you try running without the docker container? I suppose not? Since people have not reported this error before, I suppose that it might be setup specific.

@MagicTZ
Copy link

MagicTZ commented Nov 16, 2024

I got the same issue and I didn't try docker

@eriksandstroem
Copy link
Collaborator

To debug this problem further, I would suggest to comment out the evaluation of the ATE and look at the trajectory, the renderings and the mesh if they look ok. If not, then there is something that makes the tracking diverge. If they look ok, then the problem is related to the alignment of the predicted and ground truth trajectories.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants