Skip to content

TypeError: absolute_pose_estimation(): incompatible function arguments. The following argument types are supported: #445

Open
@boyagesmile

Description

@boyagesmile

when I try to test on Inloc dataset, I got the error:


[2024/12/12 15:23:17 hloc INFO] Starting localization...
  0%|          | 0/356 [00:01<?, ?it/s]
Traceback (most recent call last):
  File "/home/wby/anaconda3/envs/hloc/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/wby/anaconda3/envs/hloc/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/wby/project/work/Hierarchical-Localization/hloc/pipelines/Inloc/pipeline_test.py", line 72, in <module>
    run(args)
  File "/home/wby/project/work/Hierarchical-Localization/hloc/pipelines/Inloc/pipeline_test.py", line 39, in run
    localize_inloc.main(
  File "/home/wby/project/work/Hierarchical-Localization/hloc/localize_inloc.py", line 154, in main
    ret, mkpq, mkpr, mkp3d, indices, num_matches = pose_from_cluster(
  File "/home/wby/project/work/Hierarchical-Localization/hloc/localize_inloc.py", line 128, in pose_from_cluster
    ret = pycolmap.absolute_pose_estimation(all_mkpq, all_mkp3d, cfg, 48.00)
TypeError: absolute_pose_estimation(): incompatible function arguments. The following argument types are supported:
    1. (points2D: numpy.ndarray[numpy.float64[m, 2]], points3D: numpy.ndarray[numpy.float64[m, 3]], camera: pycolmap.Camera, estimation_options: pycolmap.AbsolutePoseEstimationOptions = <pycolmap.AbsolutePoseEstimationOptions object at 0x7f69cdae3730>, refinement_options: pycolmap.AbsolutePoseRefinementOptions = <pycolmap.AbsolutePoseRefinementOptions object at 0x7f69cdabcbf0>, return_covariance: bool = False) -> object

Invoked with: array([[1617.5,  537.5],
       [1643.5,  533.5],
       [2895.5,  895.5],
       ...,
       [2513.5,  605.5],
       [1203.5,  763.5],
       [2561.5,  219.5]], dtype=float32), array([[ 8.30148391,  0.94299119,  0.41160987],
       [ 8.27194511,  0.94324595,  0.4089625 ],
       [ 7.92149068,  0.20867883,  0.21974685],
       ...,
       [ 8.94232926, -1.11408334,  0.9626295 ],
       [ 7.93394443, -1.11480393,  0.38032383],
       [ 8.76774296, -1.10659471,  0.95334084]]), {'model': 'SIMPLE_PINHOLE', 'width': 3024, 'height': 4032, 'params': [3136.0, 1512.0, 2016.0]}, 48.0

Process finished with exit code 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions