ignacio-rocco / sparse-ncnet

Implementation of Sparse-NCNet: "Efficient Neighbourhood Consensus Networks via Submanifold Sparse Convolutions"
MIT License
154 stars 19 forks source link

Dimension error when evaluate on inloc dataset. #2

Open PANCHEN-AMA opened 4 years ago

PANCHEN-AMA commented 4 years ago

Hello! I'm going to try your method on InLoc dataset. When I ran the eval/eval_inloc_extract.py. I got this error.

Traceback (most recent call last): File "/media/pc/E68247168246EB1F/sparse-ncnet/eval/eval_inloc_extract.py", line 167, in <module> args File "/media/pc/E68247168246EB1F/sparse-ncnet/lib/relocalize.py", line 187, in eval_model_reloc corr4d = corr_and_add(feature_A, feature_B, k = model.k, Npts=None) File "/media/pc/E68247168246EB1F/sparse-ncnet/lib/sparse.py", line 147, in corr_and_add scorr = ME.MinkowskiUnion()(scorr,scorr2) File "/home/pc/.pyenv/versions/anaconda3-5.3.1/envs/sncnet/lib/python3.6/sitepackages/MinkowskiEngine/MinkowskiUnion.py", line 100, in __init__ assert dimension > 0, f"dimension must be a positive integer, {dimension}" AssertionError: dimension must be a positive integer, -1

Could you provide some ideas about how to solve it? Thank you very much!

ignacio-rocco commented 4 years ago

It seems some tensor is empty. Maybe you can set a breakpoint and debug with import pdb; pdb.set_trace()?

PANCHEN-AMA commented 4 years ago

Thank you for your quick reply. I checked the shape of scorr and scorr2 after transfering to sparseTensor. They are both 300000*1 Tensor. They are not empty. But MinkowskiUnion()(scorr, scorr2) is failed due to the above reason. Maybe they didn't satisfy the dimension they are supposed to be?