naver / dust3r

DUSt3R: Geometric 3D Vision Made Easy
https://dust3r.europe.naverlabs.com/
Other
4.65k stars 515 forks source link

demo.py does not output any scene in GUI when using scene_graph_type = "pairs" in demo.py #69

Closed bhuvanjhamb closed 2 months ago

bhuvanjhamb commented 3 months ago

I am attempting to use using scene_graph_type = "pairs" in demo.py. In doing so, the GUI gets stuck and does not output any scene. After investigation, it seems like this while loop gets stuck in an infinite loop.

I believe happens because each vertex is only one 1 edge in "pairs" setting, hence the while loop in this function never terminates. This can be mitigated by updating the loop counter here as follows:

# for i in range(0, len(imgs), 2):
#     pairs.append((imgs[i], imgs[i + 1]))

for i in range(0, len(imgs)-1, 1):
    pairs.append((imgs[i], imgs[i + 1]))

I am not sure is this is an bug or intended behavior, but let me know if you require a PR.

yocabon commented 3 months ago

Hi, Thanks for the issue. Yes, it seems bugged. I don't see any benefit over the "swin" strategy with winsize=1; so if it's ok, I'll just remove it.