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

Test_shape failed with torchsparse 1.2 #35

Closed
bingting1022 opened this issue Apr 5, 2022 · 5 comments
Closed

Test_shape failed with torchsparse 1.2 #35

bingting1022 opened this issue Apr 5, 2022 · 5 comments

Comments

@bingting1022
Copy link

Good work! I manged to get the shape using Test_shape.py but when using test_shape.py, I faced this error:
processing (0000)-th image... LeReS/test_images/5.jpg
Traceback (most recent call last):
File "LeReS/tools/test_shape.py", line 123, in
shift, focal_length, depth_scaleinv = reconstruct3D_from_depth(rgb, pred_depth_ori,
File "LeReS/tools/test_shape.py", line 76, in reconstruct3D_from_depth
shift_1 = refine_shift(pred_depth_norm, shift_model, predicted_focal_1, cam_u0, cam_v0)
File "/home/adelai_ws/AdelaiDepth/LeReS/lib/test_utils.py", line 124, in refine_shift
shift = refine_shift_one_step(depth_wshift_tmp, model, focal, u0, v0)
File "/home/adelai_ws/AdelaiDepth/LeReS/lib/test_utils.py", line 108, in refine_shift_one_step
outputs = model(inputs)
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/home/trainer/adelai_ws/AdelaiDepth/LeReS/lib/spvcnn_classsification.py", line 148, in forward
x2 = self.stage2(x1)
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/container.py", line 141, in forward
input = module(input)
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/home/trainer/adelai_ws/AdelaiDepth/LeReS/lib/spvcnn_classsification.py", line 23, in forward
out = self.net(x)
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/container.py", line 141, in forward
input = module(input)
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/torchsparse/nn/modules/conv.py", line 72, in forward
return conv3d(inputs,
File "/usr/local/lib/python3.8/dist-packages/torchsparse/nn/functional/conv.py", line 118, in conv3d
idx_query = list(convert_neighbor_map_gpu(idx_query))
File "/usr/local/lib/python3.8/dist-packages/torchsparse/nn/functional/convert_neighbor_map.py", line 9, in forward
idx_batch, idx_point = torch.where(neighbor_map != -1)
ValueError: not enough values to unpack (expected 2, got 1)

@jgallegov
Copy link

Same error here...

File "/home/azken/workspace/3D_ROOM_RECONSTRUCTION/AdelaiDepth/venv/lib/python3.7/site-packages/torchsparse/nn/functional/convert_neighbor_map.py", line 21, in forward
neighbor_map.int(), idx_batch.int(), idx_point.int())

@yukiumi13
Copy link

#9 (comment) works.

@YvanYin
Copy link
Contributor

YvanYin commented Jun 2, 2022

@YangLI-aftermath thx.

@YvanYin YvanYin closed this as completed Jun 2, 2022
@YvanYin
Copy link
Contributor

YvanYin commented Jun 8, 2022

Please check the version of GCC. We used GCC 7.0.

@kamzero
Copy link

kamzero commented Oct 28, 2022

It is an error with torchsparse 1.2.0
this comment works

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

5 participants