kwea123 / nerf_pl

NeRF (Neural Radiance Fields) and NeRF in the Wild using pytorch-lightning
https://www.youtube.com/playlist?list=PLDV2CyUo4q-K02pNEyDr7DYpTQuka3mbV
MIT License
2.74k stars 483 forks source link

Install Ceres-solver failed #126

Closed CozmoxJC closed 2 years ago

CozmoxJC commented 2 years ago

When I try to get my own data's camera poses (poses_bounds.npy file) by colmap_colab.ipynb, I can't install Ceres-solver :

... [ 57%] Building CXX object internal/ceres/CMakeFiles/ceres.dir/schur_templates.cc.o [ 58%] Building CXX object internal/ceres/CMakeFiles/ceres.dir/scratch_evaluate_preparer.cc.o [ 59%] Building CXX object internal/ceres/CMakeFiles/ceres.dir/single_linkage_clustering.cc.o In file included from /content/ceres-solver/internal/ceres/single_linkage_clustering.cc:37:0: /content/ceres-solver/internal/ceres/graph_algorithms.h:260:6: error: ‘unique_ptr’ in namespace ‘std’ does not name a template type std::unique_ptr<WeightedGraph<Vertex>> Degree2MaximumSpanningForest( ^~~~~~~~~~ internal/ceres/CMakeFiles/ceres.dir/build.make:1232: recipe for target 'internal/ceres/CMakeFiles/ceres.dir/single_linkage_clustering.cc.o' failed make[2]: *** [internal/ceres/CMakeFiles/ceres.dir/single_linkage_clustering.cc.o] Error 1 CMakeFiles/Makefile2:122: recipe for target 'internal/ceres/CMakeFiles/ceres.dir/all' failed make[1]: *** [internal/ceres/CMakeFiles/ceres.dir/all] Error 2 Makefile:140: recipe for target 'all' failed make: *** [all] Error 2 [ 1%] Building CXX object internal/ceres/CMakeFiles/ceres.dir/single_linkage_clustering.cc.o In file included from /content/ceres-solver/internal/ceres/single_linkage_clustering.cc:37:0: /content/ceres-solver/internal/ceres/graph_algorithms.h:260:6: error: ‘unique_ptr’ in namespace ‘std’ does not name a template type std::unique_ptr<WeightedGraph<Vertex>> Degree2MaximumSpanningForest( ^~~~~~~~~~ internal/ceres/CMakeFiles/ceres.dir/build.make:1232: recipe for target 'internal/ceres/CMakeFiles/ceres.dir/single_linkage_clustering.cc.o' failed make[2]: *** [internal/ceres/CMakeFiles/ceres.dir/single_linkage_clustering.cc.o] Error 1 CMakeFiles/Makefile2:122: recipe for target 'internal/ceres/CMakeFiles/ceres.dir/all' failed make[1]: *** [internal/ceres/CMakeFiles/ceres.dir/all] Error 2 Makefile:140: recipe for target 'all' failed make: *** [all] Error 2

The weird part is I tried out this notebook before few times and didn't meet this kind of error, but it just somehow happened now. Do you have any suggestions on how to fix this problem?

On the other hand, I'm able to run COLMAP GUI to get camera poses : hsgg

I suppose we need these file : image to get poses_bounds.npy file, but how do we do that ? or maybe it doesn't work like that?

@kwea123 sorry for bothering you

CozmoxJC commented 2 years ago

Never mind... It works again ...

bishengderen commented 2 years ago

Never mind... It works again ...

I also encountered this problem. Why can I work again? Can I just run it again?

CozmoxJC commented 2 years ago

Never mind... It works again ...

I also encountered this problem. Why can I work again? Can I just run it again?

I just wait for a while, reopened colmap_colab.ipynb later on and run it again, it just work again somehow.

tcwhalen commented 2 years ago

I ran into the same issues with both ceres-solver and colmap. I reverted to git commits for both repos back to around when this notebook was created, and that allowed them both to install on colab. Here's the commit hashes that worked for me.

ceres-solver: change the git checkout line to

!git checkout ab4ed32cda004befd29a0b4b02f1d907e0c4dab7

colmap: change the git checkout line to

!git checkout 699f8a25cd72419f77e27a1c39b69398244f44bd