Colmap on linux without display and with GPU
Hello everyone,
I am new to colmap. I installed it using "conda install -c conda-forge colmap". When the installation is done, I tried to run colmap automatic reconstructor. But it is giving an error : qt:qpa:plugin: could not connect to display. I cannot connect to the display as I am on the server and already having 2 GPU to run.
Can anyone tell me how to use colmap on linux server with gpu and without display?
Thanks.
You can call the individual stages manually as they can run without an attached display. See https://colmap.github.io/cli.html for examples.
Is there a special flag to force this behavior? Either during installation or running? I'm experiencing the same issue with a Linux server that I'm trying to run COLMAP on remotely.
I run the following (changing DATASET_PATH correctly):
$ conda install -c conda-forge colmap
$ DATASET_PATH=/path/to/project
$ colmap automatic_reconstructor \
--workspace_path $DATASET_PATH \
--image_path $DATASET_PATH/images
But I get the following error:
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
So I try and run the CLI step by step:
$ colmap feature_extractor \
--database_path $DATASET_PATH/database.db \
--image_path $DATASET_PATH/images
qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
Am I doing something wrong? Should I install via a different method?
I'm having the same issue and I also installed colmap using conda.
I solved the issue, as it were, by using The docker environment provided and running the gui locally to see the results.
I solved the issue, as it were, by using The docker environment provided and running the gui locally to see the results.
Could you please explain in detail how to solve it?
I couldn't get COLMAP to install with GUI support on a server. Instead, I'm using the docker environment provided in this repo to run COLMAP and output the dense reconstruction. So there's not many steps involved in the solution. The link here explains how to do it.
experiencing same problem as @marc-micatka
did you use the official image?
I try to build it myself, with CUDA enable, GUI must be enabled, then the xcb problem persists
if it make with GUI disabled, CUDA build fails :(
@DeoLeung have you tried the docker image linked? Are you able to run the automatic reconstruction via the image?
pulling the latest colmap/colmap:latest works :)
but the problem persists if I download the tar.gz from 3.7 tag and build it following the related Dockerfile
and it seems the tar shows colmap version 3.8, maybe sth wrong with the tag?
Using the colmap/colmap:latest Docker image works to run it headless on Linux, but it doesn't use the GPU.
I was to build and run without a GUI by making the following changes:
-
In CMakeLists.txt change this option to be "OFF" option(GUI_ENABLED "Whether to enable the graphical UI" OFF)
-
In colmap/src/feature/sift.cc remove the include guard on 39 and 41 to include GL/glew.h #if !defined(GUI_ENABLED) && !defined(CUDA_ENABLED)
This currently in a PR here: https://github.com/colmap/colmap/pull/1654
@mtwardowski would you please explain the second step in details? remove all from 39 to 41? Thank you!
I believe he meant to do comment lines 39 and 41. And also I would comment "endif" block. Result should look like this (I have commented lines 39, 41, 44, 45):
I did installation without GUI on Google Colab folowing comment from @mtwardowski and it worked for me. Also it is possible to set cmake variables in the command line directly without changing 'CMakeLists.txt:
!cmake -B build -GNinja -DGUI_ENABLED=OFF