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

example script list index error #14

Closed
caisilus opened this issue Oct 3, 2021 · 4 comments
Closed

example script list index error #14

caisilus opened this issue Oct 3, 2021 · 4 comments

Comments

@caisilus
Copy link

caisilus commented Oct 3, 2021

I was trying to run the example script, but ran into an error:

Traceback (most recent call last):
File "test_monorec.py", line 41, in <module>
batch, depth = dataset.__getitem__(index)
File "../data_loader/kitti_odometry_dataset.py", line 252, in __getitem__
keyframe_pose = torch.tensor(dataset.poses[index + self._offset], dtype=torch.float32)
IndexError: list index out of range

I found out that dataset poses for sequence 07 is an empty list. In this code below in kitti_odometry_dataset.py string constant is "poses_dvso". However, examples poses dir has name "poses_dso".

if self.use_dso_poses:
    for dataset in self._datasets:
          dataset.pose_path = self.dataset_dir / "poses_dvso"
          dataset._load_poses()

It seems that changing the constant to "poses_dso" fixes the error.

@nynyg
Copy link
Collaborator

nynyg commented Oct 4, 2021

Hi @caisilus, thanks for pointing it out!
Actually, I just did a fix on that right before you posting the issue: f648ed7.

Could you please check if it works for you?

@caisilus
Copy link
Author

caisilus commented Oct 5, 2021

Hi @caisilus, thanks for pointing it out! Actually, I just did a fix on that right before you posting the issue: f648ed7.

Could you please check if it works for you?

Hello @Yelen719, thank you for the answer!
It seems that the problem is still relevant. In the example/data/kitti folder, there is only a folder named "poses_dso", and no folder for the path "example/data/kitti/poses_dvso"
In f648ed7 you changed string constant to the value "poses_dvso" that doesn't match the name of the folder (poses_dso). Should I download any dvso poses or the existing folder should be renamed to "poses_dvso"?

@caisilus caisilus closed this as completed Oct 5, 2021
@caisilus caisilus reopened this Oct 5, 2021
@nynyg
Copy link
Collaborator

nynyg commented Oct 7, 2021

Sorry for the mistake.

The folder example/data/kitt/poses_dso should be renamed to example/data/kitt/poses_dvso in this case.
I've pushed the fix. Please let us know if you face any other issues.

Best,
Nan

@caisilus
Copy link
Author

caisilus commented Oct 8, 2021

Thanks, that helps!

@caisilus caisilus closed this as completed Oct 8, 2021
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

2 participants