TQTQliu / MVSGaussian

[ECCV 2024] MVSGaussian: Fast Generalizable Gaussian Splatting Reconstruction from Multi-View Stereo
https://mvsgaussian.github.io/
MIT License
416 stars 21 forks source link

How can I execute the following statement about colmap correctly? #19

Closed ZhenyuSun-Walker closed 3 months ago

ZhenyuSun-Walker commented 3 months ago

Hello, I wonder what should I do in order to execute python lib/colmap/imgs2poses.py -s examples/scene1 correctly? Actually I have used several other commads of colmap to replace the command above, in order to avoid the error of no gui interfaces.

TQTQliu commented 3 months ago

Please refer to here, this might help you.

ZhenyuSun-Walker commented 3 months ago

Sorry,I didn't mean that. My problem is that when I directly run ·python lib/colmap/imgs2poses.py -s examples/scene1·,It will show that ·python lib/colmap/imgs2poses.py -s dataset/MVDiffusion_demo16 Need to run COLMAP 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. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

Aborted at 1722417347 (unix time) try "date -d @1722417347" if you are using GNU date PC: @ 0x7fc23dfc500b gsignal SIGABRT (@0x3ef0015844b) received by PID 1410123 (TID 0x7fc2397bf900) from PID 1410123; stack trace: @ 0x7fc23fbb3631 (unknown) @ 0x7fc23f0f6420 (unknown) @ 0x7fc23dfc500b gsignal @ 0x7fc23dfa4859 abort @ 0x7fc23e589aad QMessageLogger::fatal() @ 0x7fc23eb6b7ae QGuiApplicationPrivate::createPlatformIntegration() @ 0x7fc23eb6c708 QGuiApplicationPrivate::createEventDispatcher() @ 0x7fc23e790f55 QCoreApplicationPrivate::init() @ 0x7fc23eb6e543 QGuiApplicationPrivate::init() @ 0x7fc23f2783bd QApplicationPrivate::init() @ 0x55ef836f7602 RunFeatureExtractor() @ 0x55ef836e3eaf main @ 0x7fc23dfa6083 __libc_start_main @ 0x55ef836e7f6e _start Traceback (most recent call last): File "lib/colmap/imgs2poses.py", line 18, in gen_poses(args.scenedir, args.match_type) File "/home/sunzhenyu/Projects/MVSGaussian/lib/colmap/poses/pose_utils.py", line 268, in gen_poses run_colmap(basedir, match_type) File "/home/sunzhenyu/Projects/MVSGaussian/lib/colmap/poses/colmap_wrapper.py", line 35, in run_colmap feat_output = ( subprocess.check_output(feature_extractor_args, universal_newlines=True) ) File "/home/sunzhenyu/anaconda3/envs/mvsgs/lib/python3.7/subprocess.py", line 411, in check_output **kwargs).stdout File "/home/sunzhenyu/anaconda3/envs/mvsgs/lib/python3.7/subprocess.py", line 512, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['colmap', 'feature_extractor', '--database_path', 'dataset/MVDiffusion_demo16/database.db', '--image_path', 'dataset/MVDiffusion_demo16/images', '--ImageReader.single_camera', '1']' died with <Signals.SIGABRT: 6>.·

How can I solve the problem?

TQTQliu commented 3 months ago

The problem here is the same as yours. 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. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb. RyanPham19092002 solved the problem, but I don't know if he or she took the advice I offered.

ZhenyuSun-Walker commented 3 months ago

Thank you for your suggestions!However,it does not work for me. Would you mind telling me why you can normally run the command python lib/colmap/imgs2poses.py -s examples/scene1?

TQTQliu commented 3 months ago

Another option is to run colmap first for sparse reconstruction, please refer to https://colmap.github.io/cli.html#. After it, you can get the sparse folder, which includes 0/cameras.bin, 0/images.bin, 0/points3D.bin, and then place the above sparse folder in the examples/scene1 directory and run the same command:

python lib/colmap/imgs2poses.py -s examples/scene1

In this case, the imgs2poses.py script recognizes that sparse reconstruction results already exist, automatically skips the colmap reconstruction phase, and simply organizes the existing results to produce the required poses_bounds.npy.

See here for details.

ZhenyuSun-Walker commented 3 months ago

Actually, that is what I have done to avoid the contradictory. However,when I run colmap mapper --database_path examples/scene1/database.db --image_path examples/scene1/images --output_path examples/scene1/sparse to generate 0/cameras.bin, 0/images.bin, 0/points3D.bin, and then place the above sparse folder in the my own dataset folders, it always finishes with `Bundle adjustment report

Residuals : 1028

Parameters : 778 Iterations : 101 Time : 9.00131 [s] Initial cost : 0.388099 [px] Final cost : 0.377106 [px] Termination : No convergence

=> Filtered observations: 0 => Filtered images: 0 => No good initial image pair found.

Elapsed time: 0.594 [minutes]`

Although it is effective when coping with your dataset in the examples.

TQTQliu commented 3 months ago

The error may be due to low overlap of images, a similar error can be found here and here.

ZhenyuSun-Walker commented 3 months ago

Actually, once my dataset can be suitable for the colmap operation step by step in the terminal. But now, it does not work, and I really have no idea about why it happens.