Skip to content

Instantly share code, notes, and snippets.

@kwea123
Created April 26, 2020 10:07
Show Gist options
  • Star 16 You must be signed in to star a gist
  • Fork 7 You must be signed in to fork a gist
  • Save kwea123/f0e8f38ff2aa94495dbfe7ae9219f75c to your computer and use it in GitHub Desktop.
Save kwea123/f0e8f38ff2aa94495dbfe7ae9219f75c to your computer and use it in GitHub Desktop.
colmap_colab.ipynb
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gdhy9064
Copy link

If encountered the error as follow

/usr/local/include/ceres/product_manifold.h:260:10: error: ‘exclusive_scan’ is not a member of ‘std’
std::exclusive_scan(values.begin(), values.end(), result.begin(), 0);

it is because latest Ceres Solver 2.2 requires a fully C++17-compliant compiler, you can download the one with version 2.0 from here and build it colmap/colmap#1482.
I also encountered the following error

/usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libOpenGL.so: undefined reference to `_glapi_tls_Current'

I run !sudo apt-get install autoconf automake libtool and build libglvnd from https://github.com/NVIDIA/libglvnd, and it is solved.

@UncleTom111
Copy link

If encountered the error as follow

/usr/local/include/ceres/product_manifold.h:260:10: error: ‘exclusive_scan’ is not a member of ‘std’
std::exclusive_scan(values.begin(), values.end(), result.begin(), 0);

it is because latest Ceres Solver 2.2 requires a fully C++17-compliant compiler, you can download the one with version 2.0 from here and build it colmap/colmap#1482. I also encountered the following error

/usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libOpenGL.so: undefined reference to `_glapi_tls_Current'

I run !sudo apt-get install autoconf automake libtool and build libglvnd from https://github.com/NVIDIA/libglvnd, and it is solved.

Hi, can you show the whole command about how to download and build the Ceres Solver 2.0?
I tried the official installation tutorial, but somehow I still failed.

@gdhy9064
Copy link

@UncleTom111 The command I download and build Ceres Solver 2.0 is like below

!wget http://ceres-solver.org/ceres-solver-2.0.0.tar.gz
!tar -xvzf ceres-solver-2.0.0.tar.gz
%cd ceres-solver-2.0.0
%mkdir build
%cd build
!cmake .. -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF
!make
!sudo make install

@bigian98
Copy link

I had the same error of @imadgohar ; I updated the dependencies chunk with the latest colmap installation here and the Ceres-solver chunk with that one proposed from @gdhy9064 .
Now everything works.
@gdhy9064 thanks for your advices!

@hahaha-12345
Copy link

@kwea123
I follow your instructions step by step, but I always encounter this problem. May I ask how I could solve this problem?
problem

@gdhy9064
Copy link

@Bohan-Zhang-2017 Maybe you can use this version of pose_utils.py to see if it works or not, referring to #Fyusion/LLFF#60.

@hahaha-12345
Copy link

@Bohan-Zhang-2017 Maybe you can use this version of pose_utils.py to see if it works or not, referring to #Fyusion/LLFF#60.

Thank you for your reply! I have solved this problem.
When I execute the code of "360 inward facing scene", I encounter this problem. May I ask how I could solve this problem?
problem

@gdhy9064
Copy link

@Bohan-Zhang-2017 Maybe you can use this version of pose_utils.py to see if it works or not, referring to #Fyusion/LLFF#60.

Thank you for your reply! I have solved this problem. When I execute the code of "360 inward facing scene", I encounter this problem. May I ask how I could solve this problem? problem

If you use pose_utils.py I provided, it will generate a file named view_imgs.txt, just use the images listed in it as your dataset.

@hahaha-12345
Copy link

hahaha-12345 commented Jun 26, 2022

@Bohan-Zhang-2017 Maybe you can use this version of pose_utils.py to see if it works or not, referring to #Fyusion/LLFF#60.

Thank you for your reply! I have solved this problem. When I execute the code of "360 inward facing scene", I encounter this problem. May I ask how I could solve this problem? problem

If you use pose_utils.py I provided, it will generate a file named view_imgs.txt, just use the images listed in it as your dataset.

@kwea123
Thank you for your reply!
According to your suggestion, I got a result. But the result is not good. May I ask how I could solve this problem? (I also uploaded the view_imgs.txt file generated according to your program)
exp
view_imgs-txt

@gdhy9064
Copy link

gdhy9064 commented Jun 26, 2022

@Bohan-Zhang-2017 Maybe you can use this version of pose_utils.py to see if it works or not, referring to #Fyusion/LLFF#60.

Thank you for your reply! I have solved this problem. When I execute the code of "360 inward facing scene", I encounter this problem. May I ask how I could solve this problem? problem

If you use pose_utils.py I provided, it will generate a file named view_imgs.txt, just use the images listed in it as your dataset.

@kwea123 Thank you for your reply! According to your suggestion, I got a result. But the result is not good. May I ask how I could solve this problem? (I also uploaded the view_imgs.txt file generated according to your program) exp
view_imgs-txt

hhh, you seem to mistake me for the author. Maybe more training time would help? I'm not sure.

@hahaha-12345
Copy link

@Bohan-Zhang-2017 Maybe you can use this version of pose_utils.py to see if it works or not, referring to #Fyusion/LLFF#60.

Thank you for your reply! I have solved this problem. When I execute the code of "360 inward facing scene", I encounter this problem. May I ask how I could solve this problem? problem

If you use pose_utils.py I provided, it will generate a file named view_imgs.txt, just use the images listed in it as your dataset.

@kwea123 Thank you for your reply! According to your suggestion, I got a result. But the result is not good. May I ask how I could solve this problem? (I also uploaded the view_imgs.txt file generated according to your program) exp

    [
      
    ](https://user-images.githubusercontent.com/50520115/175796481-edb68deb-69a7-447d-a2d4-f515732162e4.gif)
    
        ![exp](https://user-images.githubusercontent.com/50520115/175796481-edb68deb-69a7-447d-a2d4-f515732162e4.gif)
      
    
      
        
          
        
        
          
          
        
      
      [
        
          
        
      ](https://user-images.githubusercontent.com/50520115/175796481-edb68deb-69a7-447d-a2d4-f515732162e4.gif)
view_imgs-txt

hhh, you seem to mistake me for the author. Maybe more training time would help? I'm not sure.

@gdhy9064
Thank you for helping me sincerely!

@imadgohar
Copy link

imadgohar commented Oct 11, 2022 via email

@LuisRosas29
Copy link

LuisRosas29 commented Nov 20, 2022

Hello.
Does anyone know how to fix this error? The code worked fine (with the CERES SOLVER 2.0 modifications and the extra library). But just this week, it started showing this error, does anyone know what it is due to?
error

@Ikhadija-5
Copy link

@kwea123 while installing the colmap I am getting this error, what I am missing here, exactly same steps I am following. @zjz123-eng Your problem is occuring bcs colmap is not installed correctly which I am trying here. Without it's installation I am facing same same error. Anyone else solved this problem? If yes, Please share your method. Thanks ![Capture](https://user-images.githubusercontent.com/45845910/169109323-1133d083-cd3b-4e84-9579-66b6fd52c6

If encountered the error as follow

/usr/local/include/ceres/product_manifold.h:260:10: error: ‘exclusive_scan’ is not a member of ‘std’
std::exclusive_scan(values.begin(), values.end(), result.begin(), 0);

it is because latest Ceres Solver 2.2 requires a fully C++17-compliant compiler, you can download the one with version 2.0 from here and build it colmap/colmap#1482. I also encountered the following error

/usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libOpenGL.so: undefined reference to `_glapi_tls_Current'

I run !sudo apt-get install autoconf automake libtool and build libglvnd from https://github.com/NVIDIA/libglvnd, and it is solved.

Hello, thank you for sharing, could you kindly share the code that you fixed which is working for you, I have tried all suggestions and I am still getting errors, I want to generate poses for a school project I am working on. I will really appreciate this. Thank you

@soyams
Copy link

soyams commented Nov 25, 2022

Hello. Does anyone know how to fix this error? The code worked fine (with the CERES SOLVER 2.0 modifications and the extra library). But just this week, it started showing this error, does anyone know what it is due to? error

i got similar error...have you find solution??

@LuisRosas29
Copy link

LuisRosas29 commented Dec 2, 2022

@Bohan-Zhang-2017 Maybe you can use this version of pose_utils.py to see if it works or not, referring to #Fyusion/LLFF#60.

Thank you for your reply! I have solved this problem. When I execute the code of "360 inward facing scene", I encounter this problem. May I ask how I could solve this problem? problem

If you use pose_utils.py I provided, it will generate a file named view_imgs.txt, just use the images listed in it as your dataset.

@kwea123 Thank you for your reply! According to your suggestion, I got a result. But the result is not good. May I ask how I could solve this problem? (I also uploaded the view_imgs.txt file generated according to your program) exp exp view_imgs-txt

Hello @Bohan-Zhang-2017
Did you solve the problem of the failed result of the synthetic images?
I have the same error, and I would like to know if you managed to solve it

Cube3

@Ikhadija-5
Copy link

Ikhadija-5 commented Dec 12, 2022

@kwea123
I follow your instructions step by step, but I always encounter this problem. May I ask how I could solve this problem?
problem

Hello, I am facing but I get this error too, can someone help me figure it out?

Screen Shot 2022-12-12 at 11 34 26

Thank you

@yatin9136
Copy link

@gdhy9064 @zjz123-eng @imadgohar @bigian98 @Bohan-Zhang-2017
can any one help me in this error

Need to run COLMAP
[option_manager.cc:795] Check failed: ExistsDir(*image_path)
ERROR: Invalid options provided.
Traceback (most recent call last):
File "imgs2poses.py", line 18, in
gen_poses(args.scenedir, args.match_type)
File "/home/yaten/ceres-solver/build/colmap/build/LLFF/llff/poses/pose_utils.py", line 268, in gen_poses
run_colmap(basedir, match_type)
File "/home/yaten/ceres-solver/build/colmap/build/LLFF/llff/poses/colmap_wrapper.py", line 35, in run_colmap
feat_output = ( subprocess.check_output(feature_extractor_args, universal_newlines=True) )
File "/usr/lib/python3.8/subprocess.py", line 415, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.8/subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['colmap', 'feature_extractor', '--database_path', '/home/yaten/data/database.db', '--image_path', '/home/yaten/data/images', '--ImageReader.single_camera', '1']' returned non-zero exit status 1.

@rockywind
Copy link

Hi,
I met the error below!

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
qt.qpa.screen: QXcbConnection: Could not connect to display 
Could not connect to any X display.
Traceback (most recent call last):
  File "imgs2poses.py", line 18, in <module>
    gen_poses(args.scenedir, args.match_type)
  File "/defaultShare/SHFP12/02_bevdet/nerf_pl/LLFF/llff/poses/pose_utils.py", line 268, in gen_poses
    run_colmap(basedir, match_type)
  File "/defaultShare/SHFP12/02_bevdet/nerf_pl/LLFF/llff/poses/colmap_wrapper.py", line 35, in run_colmap
    feat_output = ( subprocess.check_output(feature_extractor_args, universal_newlines=True) )
  File "/opt/conda/lib/python3.7/subprocess.py", line 411, in check_output
    **kwargs).stdout
  File "/opt/conda/lib/python3.7/subprocess.py", line 512, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['colmap', 'feature_extractor', '--database_path', '/SHFP12/02_bevdet/LargeScaleNeRFPytorch/data/front_800w/20220103-00-00-01/database.db', '--image_path', '/SHFP12/02_bevdet/LargeScaleNeRFPytorch/data/front_800w/20220103-00-00-01/images', '--ImageReader.single_camera', '1']' returned non-zero exit status 1.

@romygt
Copy link

romygt commented Jan 16, 2023

Si rencontré l'erreur comme suit

/usr/local/include/ceres/product_manifold.h:260:10 : erreur : 'exclusive_scan' n'est pas membre de 'std'
std ::exclusive_scan(values.begin(), values.end(), result.begin (), 0);

c'est parce que le dernier Ceres Solver 2.2 nécessite un compilateur entièrement compatible C++ 17, vous pouvez télécharger celui avec la version 2.0 à partir d' ici et le construire colmap/colmap#1482 . J'ai également rencontré l'erreur suivante

/usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libOpenGL.so: undefined reference to `_glapi_tls_Current'

Je lance !sudo apt-get install autoconf automake libtoolet construis libglvnd à partir de https://github.com/NVIDIA/libglvnd , et c'est résolu.

Salut, pouvez-vous montrer toute la commande sur la façon de télécharger et de construire le Ceres Solver 2.0 ? J'ai essayé le tutoriel d'installation officiel, mais j'ai quand même échoué.

If encountered the error as follow

/usr/local/include/ceres/product_manifold.h:260:10: error: ‘exclusive_scan’ is not a member of ‘std’
std::exclusive_scan(values.begin(), values.end(), result.begin(), 0);

it is because latest Ceres Solver 2.2 requires a fully C++17-compliant compiler, you can download the one with version 2.0 from here and build it colmap/colmap#1482. I also encountered the following error

/usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libOpenGL.so: undefined reference to `_glapi_tls_Current'

I run !sudo apt-get install autoconf automake libtool and build libglvnd from https://github.com/NVIDIA/libglvnd, and it is solved.

hello, can you show me the instructions to build libglvnd

@smallpeachofchangan
Copy link

Hello, I had some problems in the last run COLMAP step, could you help me? image

Hello, I had the same problem, Have you solved the problem? May I ask how it was solved?

@Rim-ZAMZAMI
Copy link

same error here 'FileNotFoundError: [Errno 2] No such file or directory: 'colmap''

@smallpeachofchangan
Copy link

Hello!Help!
The results are very vague. Does anyone else have the same problem?

@smallpeachofchangan
Copy link

@Bohan-Zhang-2017 Maybe you can use this version of pose_utils.py to see if it works or not, referring to #Fyusion/LLFF#60.

Thank you for your reply! I have solved this problem. When I execute the code of "360 inward facing scene", I encounter this problem. May I ask how I could solve this problem? problem

If you use pose_utils.py I provided, it will generate a file named view_imgs.txt, just use the images listed in it as your dataset.

@kwea123 Thank you for your reply! According to your suggestion, I got a result. But the result is not good. May I ask how I could solve this problem? (I also uploaded the view_imgs.txt file generated according to your program) exp

    [
      
    
        ![exp](https://user-images.githubusercontent.com/50520115/175796481-edb68deb-69a7-447d-a2d4-f515732162e4.gif)
      ](https://user-images.githubusercontent.com/50520115/175796481-edb68deb-69a7-447d-a2d4-f515732162e4.gif)
    
    
      
        
          
        
        
          
          
        
      
      [
        
          
        
      ](https://user-images.githubusercontent.com/50520115/175796481-edb68deb-69a7-447d-a2d4-f515732162e4.gif)
    [
      
    ](https://user-images.githubusercontent.com/50520115/175796481-edb68deb-69a7-447d-a2d4-f515732162e4.gif)
    
        ![exp](https://user-images.githubusercontent.com/50520115/175796481-edb68deb-69a7-447d-a2d4-f515732162e4.gif)
      
    
      
        
          
        
        
          
          
        
      
      [
        
          
        
      ](https://user-images.githubusercontent.com/50520115/175796481-edb68deb-69a7-447d-a2d4-f515732162e4.gif)
view_imgs-txt

hhh, you seem to mistake me for the author. Maybe more training time would help? I'm not sure.

@gdhy9064 Thank you for helping me sincerely!

Have you solved the problem? I would like to ask you how to do it. I have the same problem, the picture is fuzzy and strange.

@Rim-ZAMZAMI
Copy link

@smallpeachofchangan can you help with this error
165893515-ec160f3d-9113-4543-9976-f07358732ae6

@sukikotori
Copy link

@kwea123
I have these questions. How should I solve them? thank

error: pathspec 'dev' did not match any file(s) known to git
[210/210] Linking CXX executable src/colmap/exe/colmap
FAILED: src/colmap/exe/colmap

@AvishkarArjan
Copy link

Hello, I had some problems in the last run COLMAP step, could you help me? image

Hi I'm having the same problem, did you find a soln ? Do tell

@AvishkarArjan
Copy link

Hi I'm having the same problem, did you find a soln ? Do tell

Hi I'm having the same problem, did you find a soln ? Do tell

@AvishkarArjan
Copy link

Hello, I had some problems in the last run COLMAP step, could you help me? image

Hello, I had the same problem, Have you solved the problem? May I ask how it was solved?

Hi I'm having the same problem, did you find a soln ? Do tell

@BernardonsDD3
Copy link

Hello! I've got this error.:
CMake Warning at cmake/CMakeHelper.cmake:103 (add_executable):
Cannot generate a safe runtime search path for target colmap_main because
files in some directories may conflict with libraries in implicit
directories:

runtime library [libtbb.so.12] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /usr/local/lib

Some of these libraries may not be found correctly.
Call Stack (most recent call first):
src/colmap/exe/CMakeLists.txt:67 (COLMAP_ADD_EXECUTABLE)

CMake Error in src/colmap/math/CMakeLists.txt:
Imported target "metis" includes non-existent path

"/content/ceres-solver/build/colmap/build/colmap/METIS_INCLUDE_DIRS-NOTFOUND"

in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:

  • The path was deleted, renamed, or moved to another location.

  • An install or uninstall procedure did not complete successfully.

  • The installation package was faulty and references files it does not
    provide.

-- Generating done (0.2s)
CMake Generate step failed. Build files cannot be regenerated correctly.

Do you guys know how to fix it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment