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

Type Error with reconstruction object #105

Open
bdxuyidong opened this issue May 29, 2023 · 3 comments
Open

Type Error with reconstruction object #105

bdxuyidong opened this issue May 29, 2023 · 3 comments

Comments

@bdxuyidong
Copy link

Hi. Thanks for your work. I met some problems running the Demo at:
refined, sfm_outputs = sfm.reconstruction(ref_dir, images, sfm_pairs, features, matches, image_list=references)
The output is:
File /pixel-perfect-sfm/pixsfm/bundle_adjustment/main.py:133, in FeatureReferenceBundleAdjuster.refine(self, reconstruction, feature_set, problem_setup)
131 print(reconstruction)
132 #
--> 133 feature_view = features.FeatureView(
134 feature_set,
135 reconstruction
136 )
138 # Schedule reference computation (label for each point3D)
139 problem_labels = find_problem_labels(reconstruction,
140 self.conf.max_tracks_per_problem)

TypeError: FeatureView(): incompatible function arguments. The following argument types are supported:
1. (feature_set: pixsfm._pixsfm._features.FeatureSet_f16, reconstruction: colmap::Reconstruction) -> pixsfm._pixsfm._features.FeatureView_f16
2. (feature_set: pixsfm._pixsfm._features.FeatureSet_f16, graph: pixsfm._pixsfm._base.Graph) -> pixsfm._pixsfm._features.FeatureView_f16
3. (feature_set: pixsfm._pixsfm._features.FeatureSet_f16, graph: pixsfm._pixsfm._base.Graph, required_nodes: Set[int]) -> pixsfm._pixsfm._features.FeatureView_f16
4. (feature_set: pixsfm._pixsfm._features.FeatureSet_f16, image_names: Set[str]) -> pixsfm._pixsfm._features.FeatureView_f16
5. (feature_set: pixsfm._pixsfm._features.FeatureSet_f16, reconstruction: colmap::Reconstruction, point3D_ids: Set[int]) -> pixsfm._pixsfm._features.FeatureView_f16
6. (feature_set: pixsfm._pixsfm._features.FeatureSet_f64, reconstruction: colmap::Reconstruction) -> pixsfm._pixsfm._features.FeatureView_f64
7. (feature_set: pixsfm._pixsfm._features.FeatureSet_f64, graph: pixsfm._pixsfm._base.Graph) -> pixsfm._pixsfm._features.FeatureView_f64
8. (feature_set: pixsfm._pixsfm._features.FeatureSet_f64, graph: pixsfm._pixsfm._base.Graph, required_nodes: Set[int]) -> pixsfm._pixsfm._features.FeatureView_f64
9. (feature_set: pixsfm._pixsfm._features.FeatureSet_f64, image_names: Set[str]) -> pixsfm._pixsfm._features.FeatureView_f64
10. (feature_set: pixsfm._pixsfm._features.FeatureSet_f64, reconstruction: colmap::Reconstruction, point3D_ids: Set[int]) -> pixsfm._pixsfm._features.FeatureView_f64
11. (feature_set: pixsfm._pixsfm._features.FeatureSet_f32, reconstruction: colmap::Reconstruction) -> pixsfm._pixsfm._features.FeatureView_f32
12. (feature_set: pixsfm._pixsfm._features.FeatureSet_f32, graph: pixsfm._pixsfm._base.Graph) -> pixsfm._pixsfm._features.FeatureView_f32
13. (feature_set: pixsfm._pixsfm._features.FeatureSet_f32, graph: pixsfm._pixsfm._base.Graph, required_nodes: Set[int]) -> pixsfm._pixsfm._features.FeatureView_f32
14. (feature_set: pixsfm._pixsfm._features.FeatureSet_f32, image_names: Set[str]) -> pixsfm._pixsfm._features.FeatureView_f32
15. (feature_set: pixsfm._pixsfm._features.FeatureSet_f32, reconstruction: colmap::Reconstruction, point3D_ids: Set[int]) -> pixsfm._pixsfm._features.FeatureView_f32

Invoked with: ,

It seems that the object 'reconstruction' is the wrong type before enter into features.FeatureView(), I also output feature_set
and reconstruction, they are:
<pixsfm._pixsfm._features.FeatureSet_f16 object at 0x7f876e078870>
<Reconstruction 'num_reg_images=10, num_cameras=10, num_points3D=1852, num_observations=8071'>

By the way, I can run the raw reconstruction without refinement. Please help me with the problem, thank you.

@Phil26AT
Copy link
Collaborator

Phil26AT commented Jun 1, 2023

Hi again :) This seems to be a linking error between pycolmap and pixsfm. Did you check that also pycolmap is installed from source?

@awarebayes
Copy link

Got it also

@eleanorchienqr
Copy link

Is there corresponding solution towards this problem?

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

4 participants