vye16 / slahmr

MIT License
459 stars 50 forks source link

Enhance stability by explicitly specifying keyword arguments in get_slam_command call #53

Closed Jinnkunn closed 7 months ago

Jinnkunn commented 7 months ago

The get_slam_command function is defined with the parameters shot_idx=None, start=0, end=-1 following the required parameters args, seq. i.e., get_slam_command(args, seq, shot_idx=None, start=0, end=-1):

The original call to get_slam_command(args, seq, start, end) on line 204 treats start and end as the third and fourth positional arguments. However, according to the function definition, the third positional argument is expected to be shot_idx, not start.

Utilizing the original code syntax get_slam_command(args, seq, start, end) leads to errors with specific datasets, such as 3dpw. Specifically, the get_command function, located on line 158 of launch_slam.py, passes start=-1 and end=-1. Consequently, on line 55 of run_slam.py, this results in a call to return [os.path.join(img_dir, name) for name in image_list[-1:-1:stride]], which will cause errors for the following code.