@@ -175,7 +175,10 @@ Alternatively, you can also produce a dense model without a sparse model as::
175175Since the sparse point cloud is used to automatically select neighboring images
176176during the dense stereo stage, you have to manually specify the source images,
177177as described :ref: `here <faq-dense-manual-source >`. The dense stereo stage
178- now also requires a manual specification of the depth range::
178+ now also requires a manual specification of the depth range.
179+
180+ Finally, in this case, fusion will fail to successfully match points if min_num_pixels is
181+ left at the default (greater than 1). So also set that parameter, as below::
179182
180183 colmap patch_match_stereo \
181184 --workspace_path path/to/dense/workspace \
@@ -184,6 +187,7 @@ now also requires a manual specification of the depth range::
184187
185188 colmap stereo_fusion \
186189 --workspace_path path/to/dense/workspace \
190+ --StereoFusion.min_num_pixels 1 \
187191 --output_path path/to/dense/workspace/fused.ply
188192
189193
@@ -371,7 +375,7 @@ If you encounter the following error message::
371375or the following:
372376
373377 ERROR: Feature matching failed. This probably caused by insufficient GPU
374- memory. Consider reducing the maximum number of features.
378+ memory. Consider reducing the maximum number of features.
375379
376380during feature matching, your GPU runs out of memory. Try decreasing the option
377381``--FeatureMatching.max_num_matches `` until the error disappears. Note that this
@@ -387,6 +391,63 @@ required GPU memory will be around 400MB, which are only allocated if one of
387391your images actually has that many features.
388392
389393
394+ Speedup bundle adjustemnt
395+ -------------------------
396+
397+ The following describes practical ways to reduce bundle adjustment runtime.
398+
399+ - **Reduce the problem size **
400+
401+ Limit the number of correspondences so that BA solves a smaller problem:
402+
403+ - Reduce features by decreasing ``--SiftExtraction.max_image_size `` and/or
404+ ``--SiftExtraction.max_num_features ``.
405+ - Reduce matching pairs (and avoid ``exhaustive_matcher `` when possible) by
406+ decreasing ``--SequentialMatching.overlap ``,
407+ ``--SpatialMatching.max_num_neighbors ``, or ``--VocabTreeMatching.num_images ``.
408+ - Reduce matches by decreasing ``--FeatureMatching.max_num_matches ``.
409+ - Enable experimental landmark pruning to drop redundant 3D points using
410+ ``--Mapper.ba_global_ignore_redundant_points3D 1 ``.
411+
412+ - **Utilize GPU acceleration **
413+
414+ Enable GPU-based Ceres solvers for bundle adjustment by setting
415+ ``--Mapper.ba_use_gpu 1 `` for the ``mapper `` and ``--BundleAdjustmentCeres.use_gpu 1 ``
416+ for the standalone ``bundle_adjuster ``. Several parameters control when and which
417+ GPU solver is used:
418+
419+ - The GPU solver is activated only when the number of images exceeds
420+ ``--BundleAdjustmentCeres.min_num_images_gpu_solver ``.
421+ - Select between the direct dense, direct sparse, and iterative sparse GPU solvers
422+ using ``--BundleAdjustmentCeres.max_num_images_direct_dense_gpu_solver `` and
423+ ``--BundleAdjustmentCeres.max_num_images_direct_sparse_gpu_solver ``
424+
425+ .. Attention :: COLMAP's official CUDA-enabled binaries are not distributed with
426+ ceres[cuda] until Ceres 2.3 is officially released. To use the GPU solvers you
427+ must compile Ceres with the CUDA/cuDSS support and link that build to COLMAP.
428+
429+ **Note: ** Low GPU utilization for the Schur-based sparse solver (cuDSS) can occur
430+ when the Schur-complement matrix becomes less sparse (i.e., exhibits more fill-in).
431+ Typical causes include:
432+
433+ - High image covisibility
434+ - Shared camera intrinsics.
435+
436+ - **Additional practical tips **
437+
438+ - Improve initial conditions by tuning observation-filtering parameters so BA
439+ receives more inliers and fewer outliers, or by supplying accurate priors
440+ (e.g., intrinsics, poses).
441+ - Fix or restrict refinement of parameters when possible (e.g., hold intrinsics
442+ fixed if they are known) to reduce the number of optimized variables.
443+ - Reduce LM iterations or relax convergence tolerances to trade a small amount of
444+ accuracy for runtime: ``--Mapper.ba_global_max_num_iterations ``,
445+ ``--Mapper.ba_global_function_tolerance ``.
446+ - Reduce the frequency of expensive global BA passes with mapper options:
447+ ``--Mapper.ba_global_frames_freq ``, ``--Mapper.ba_global_points_freq ``,
448+ ``--Mapper.ba_global_frames_ratio `` and ``--Mapper.ba_global_points_ratio ``.
449+
450+
390451Trading off completeness and accuracy in dense reconstruction
391452-------------------------------------------------------------
392453
0 commit comments