princeton-vl / DROID-SLAM

BSD 3-Clause "New" or "Revised" License
1.66k stars 273 forks source link

Errors in inference #13

Open jinyummiao opened 2 years ago

jinyummiao commented 2 years ago

Hi! Thanks for sharing your remarkable work! I have compiled successfully following your guides, but it throws errors when i run the demo on ETH3D and EuRoC dataset. The error log is shown as below:

 Traceback (most recent call last):
  File "demo.py", line 119, in <module>
    traj_est = droid.terminate(image_stream(args.imagedir, args.calib, args.stride))
  File "/home/jinyu/Documents/DROID-SLAM/droid_slam/droid.py", line 81, in terminate
    self.backend(7)
  File "/home/jinyu/anaconda3/envs/droidenv/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 28, in decorate_context
    return func(*args, **kwargs)
  File "/home/jinyu/Documents/DROID-SLAM/droid_slam/droid_backend.py", line 33, in __call__
    graph.add_proximity_factors(rad=self.backend_radius, 
  File "/home/jinyu/Documents/DROID-SLAM/droid_slam/factor_graph.py", line 368, in add_proximity_factors
    ii, jj = torch.as_tensor(es, device=self.device).unbind(dim=-1)
ValueError: not enough values to unpack (expected 2, got 0)

Can you give some advice on how to solve the problem? Sincerely looking forward to your reply!

jinyummiao commented 2 years ago

Some information may be helpful: The open3d window does not show any thing during running, self.video.counter.value in _factorgraphy.py line 307 is 1 when the error is thrown.

jinyummiao commented 2 years ago

The network loaded pretrained weights outputs some nan values and it may cause the problem. Could you tell me which version of python and pytorch did you use? Thx.

xingruiyang commented 2 years ago

Hi @Jinyu-M , I am met with the same error, have you solved it ?

xingruiyang commented 2 years ago

Hi @Jinyu-M , I am met with the same error, have you solved it ?

Never mind, in my case, the reconstruction is outside of the viewing window and I have to navigate manually to view it.

LambdaNuller commented 2 years ago

maybe your data path is error, I met with the same error and ran successfully after checking data path

xhangHU commented 2 years ago

maybe your data path is error, I met with the same error and ran successfully after checking data path

How did you specifically solve this problem, I'm also having this problem now, and I've checked my paths and there's no problem.

YznMur commented 2 years ago

Hi @jinyummiao @xhangHU I have the same problem here, have you managed to fix this ??

realXiaohan commented 2 years ago

@ @ @YznMur @xingruiy @xhangHU Hi, I met the same problem while testing with my self-trained weights. Did you guys have any idea on how to solve this problem?

YznMur commented 2 years ago

@realXiaohan maybe your data path is wrong, check it

AshwinP-97 commented 1 year ago

check tartan.txt file in data readers.All the file paths that are used for evaluation are provided. an additional directory or folder is added to each of the dataset directories.Also downloading tartanair dataset using azure results in zip files.The files once unzipped and the directory in tartan.txt were corrected the error was solved.

Hypothesis-Z commented 7 months ago

In my case it is because droid.filterx.MEAN and droid.filterx.STDV are incorrectly initialized to zeros when visualization process starts. Looks like a CUDA related issue.

XF522 commented 2 months ago

As motioned above, maybe the wrong path cause the issue. To be more specific, when you download the euroc dataset and extract it directly, the path will be /datasets/EuRoC/mav0/...... . However, according to the tools/evaluate_euroc.sh, the path should be /datasets/EuRoC/MH_01_easy/mav0/...... . So I solved it by creating a new folder named 'MH_01_easy' and move the folder 'mav0' into it. Hope that these will be helpful.