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

BUFFER_SIZE not large enough #23

Closed
relh opened this issue Mar 15, 2023 · 2 comments
Closed

BUFFER_SIZE not large enough #23

relh opened this issue Mar 15, 2023 · 2 comments

Comments

@relh
Copy link

relh commented Mar 15, 2023

Traceback (most recent call last):                                                                                                                                                                                                                                                                                                                                                  
  File "/home/relh/DPVO/demo.py", line 90, in <module>                                                                                                                                                                                                                                                                                                                              
    pred_traj = run(cfg, args.network, args.imagedir, args.calib, args.stride, args.skip, args.viz, args.timeit, args.save_reconstruction)                                                                                                                                                                                                                                          
  File "/home/relh/anaconda3/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context                                                                                                                                                                                                                                                                
    return func(*args, **kwargs)                                                                                                                                                                                                                                                                                                                                                    
  File "/home/relh/DPVO/demo.py", line 51, in run                                                                                                                                                                                                                                                                                                                                   
    slam(t, image, intrinsics)                                                              
  File "/home/relh/DPVO/dpvo/dpvo.py", line 342, in __call__                                                                                                                              
    self.index_[self.n + 1] = self.n + 1                                                                                                                                                  
IndexError: index 2048 is out of bounds for dimension 0 with size 2048

I have an error from BUFFER_SIZE in the cfg not being large enough. Is the right way to address this to increase the buffer size or is it indicative of a different problem?

@relh relh changed the title BUFFER_SIZE not big enough BUFFER_SIZE not large enough Mar 15, 2023
@relh
Copy link
Author

relh commented Mar 16, 2023

For reference the paper mentions this:

We connect each patch to every frame within distance r
from the frame index the patch was extracted. This means
that when a new patch is added, we add edges between that
patch and the previous r keyframes. When a new frame is
added, we add edges between each patch extracted in the
last r keyframes with the new frame.

It seems unclear whether new patches are connected to the last r keyframes, or connected to keyframes within distance r of the current frame. Regardless my bug just seems to be related to having too long of a video and having a number of keyframes that exceeds the buffer size allocated.

@relh relh closed this as completed Mar 16, 2023
@lahavlipson
Copy link
Collaborator

It seems unclear whether new patches are connected to the last r keyframes, or connected to keyframes within distance r of the current frame.

Every incoming frame is treated as a keyframe, so in the case of DPVO these are the same

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