naver / dust3r

DUSt3R: Geometric 3D Vision Made Easy

Home Page:https://dust3r.europe.naverlabs.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

python demo.py, click run found error

CUITCHENSIYU opened this issue · comments

Hello, may I know the reason behind this error?

python3 demo.py --weights checkpoints/DUSt3R_ViTLarge_BaseDecoder_512_dpt.pth

Traceback (most recent call last):
File "/home/csy/anaconda3/envs/mmlab/lib/python3.8/site-packages/gradio/queueing.py", line 495, in call_prediction
output = await route_utils.call_process_api(
File "/home/csy/anaconda3/envs/mmlab/lib/python3.8/site-packages/gradio/route_utils.py", line 232, in call_process_api
output = await app.get_blocks().process_api(
File "/home/csy/anaconda3/envs/mmlab/lib/python3.8/site-packages/gradio/blocks.py", line 1561, in process_api
result = await self.call_function(
File "/home/csy/anaconda3/envs/mmlab/lib/python3.8/site-packages/gradio/blocks.py", line 1179, in call_function
prediction = await anyio.to_thread.run_sync(
File "/home/csy/anaconda3/envs/mmlab/lib/python3.8/site-packages/anyio/to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/home/csy/anaconda3/envs/mmlab/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "/home/csy/anaconda3/envs/mmlab/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 867, in run
result = context.run(func, *args)
File "/home/csy/anaconda3/envs/mmlab/lib/python3.8/site-packages/gradio/utils.py", line 678, in wrapper
response = f(*args, **kwargs)
File "demo.py", line 142, in get_reconstructed_scene
scene = global_aligner(output, device=device, mode=mode, verbose=not silent)
File "/mnt/gpuserver-1-disk0-nfs/chensiyu/dust3r/dust3r/cloud_opt/init.py", line 29, in global_aligner
net = PairViewer(view1, view2, pred1, pred2, **optim_kw).to(device)
File "/mnt/gpuserver-1-disk0-nfs/chensiyu/dust3r/dust3r/cloud_opt/pair_viewer.py", line 25, in init
super().init(*args, **kwargs)
File "/mnt/gpuserver-1-disk0-nfs/chensiyu/dust3r/dust3r/cloud_opt/base_opt.py", line 42, in init
self._init_from_views(*args, **kwargs)
File "/mnt/gpuserver-1-disk0-nfs/chensiyu/dust3r/dust3r/cloud_opt/base_opt.py", line 69, in init_from_views
self.pred_i = NoGradParamDict({ij: pred1_pts[n] for n, ij in enumerate(self.str_edges)})
File "/mnt/gpuserver-1-disk0-nfs/chensiyu/dust3r/dust3r/cloud_opt/commons.py", line 30, in NoGradParamDict
return nn.ParameterDict(x).requires_grad
(False)
File "/home/csy/anaconda3/envs/mmlab/lib/python3.8/site-packages/torch/nn/modules/container.py", line 593, in init
self.update(parameters)
File "/home/csy/anaconda3/envs/mmlab/lib/python3.8/site-packages/torch/nn/modules/container.py", line 724, in update
self[key] = parameter
File "/home/csy/anaconda3/envs/mmlab/lib/python3.8/site-packages/torch/nn/modules/container.py", line 604, in setitem
self.register_parameter(key, parameter)
File "/home/csy/anaconda3/envs/mmlab/lib/python3.8/site-packages/torch/nn/modules/module.py", line 358, in register_parameter
raise TypeError("cannot assign '{}' object to parameter '{}' "

Hi, could you tell me a little more ?

How many images did you add ?
Do you get this error every time ? -> if yes What if you use more than 3 images, do you still get an error ?

from what I gather:
it crashed during the initialization of
PairViewer -> so 1 or 2 images
self.pred_i = NoGradParamDict({ij: pred1_pts[n] for n, ij in enumerate(self.str_edges)}) -> at this line in the parent class
str_edges was empty ?, it shouldn't be.