adnappp / Sfm-python

三维重建算法Structure from Motion(Sfm)的python实现
211 stars 68 forks source link

运行报错 #10

Open yolic66 opened 8 months ago

yolic66 commented 8 months ago

Traceback (most recent call last): File "c:\Users\74773\Desktop\Sfm-python-master\Sfm-python-master\revise_v2.py", line 329, in main() File "c:\Users\74773\Desktop\Sfm-python-master\Sfm-python-master\revise_v2.py", line 286, in main key_points_for_all, descriptor_for_all, colors_for_all = extract_features(img_names) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "c:\Users\74773\Desktop\Sfm-python-master\Sfm-python-master\revise_v2.py", line 46, in extract_features return np.array(key_points_for_all), np.array(descriptor_for_all), np.array(colors_for_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (14,) + inhomogeneous part.

Arrogant-Q commented 3 months ago

因为SIFT检测出来的两个图像特征数量不一样,导致最后转为numpy数组的时候,每个list中的两个元素长度不一样

ddjiayou commented 3 months ago

请问怎样解决呢

zhaosiyuan1098 commented 2 months ago

我遇到了一模一样的问题,请问目前有什么解决方法吗?

pyre001 commented 1 month ago

将numpy库降级成1.23.0版本可解决该问题