Global mapper slowdown on a 1,002-image THIN_PRISM_FISHEYE rig dataset compared with legacy COLMAP + GLOMAP
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 42/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- cpp
调研方向
Start with src/colmap/sfm/global_mapper.cc, especially IterativeRetriangulateAndRefine, and the linked GlobalMapperOptions in src/colmap/sfm/global_mapper.h. Profile refinement to separate Jacobian evaluation, Schur construction, ordering, factorization, transfers, and other costs; compare only matched optimization workloads against standalone GLOMAP. Done means identifying a reproducible source of the observed slowdown or documenting measurements that isolate the relevant costs; the issue provides no public dataset or recipe.
由索引模型根据 Issue 内容生成。
描述
Observation
I am evaluating COLMAP's integrated global_mapper as a replacement for my older workflow consisting of COLMAP feature extraction/matching followed by a separate CUDA-enabled GLOMAP executable.
On my 1,002-image dataset, the more comparable integrated configuration takes 22:10.83 instead of 15:56.14 for the SfM stages (+39.2%). The mapper alone takes 1,160.72 instead of 863.34 seconds (+34.4%). Much of the extra mapper time is in retriangulation/refinement.
This is an observed workflow slowdown, not yet a controlled or bisected COLMAP regression. My legacy executable is a local CUDA-enabled build, not a verified pristine upstream reference. Matching, optimization scope, threading, dependencies and execution environment are not fully identical.
I am withholding my private camera setup, initialization, variable-selection details and pipeline commands. The omission limits reproducibility; it must not be interpreted as use of identical settings or defaults.
This differs from my earlier closed issue #4437, which concerned extraction/matching in COLMAP 4.0.4. This report focuses on global-mapper refinement at commit 9fdaf93ba4bc71a704fffadc4ed7cf1d9cf55de8. CASPAR is disabled; BA uses Ceres.
Environment
- Ubuntu 24.04.4 LTS; NVIDIA RTX 3090 with 24 GB VRAM; 16 physical CPU cores / 32 logical CPUs; approximately 64 GB RAM.
- COLMAP
4.2.0.dev0, commit9fdaf93ba4bc71a704fffadc4ed7cf1d9cf55de8; not a claim about today's latest main. - Release build, CUDA toolkit 12.8, Ceres 2.3 with cuDSS support.
- Current runs: explicit
GlobalMapper.num_threads=8,OMP_NUM_THREADS=8,OPENBLAS_NUM_THREADS=1; GPU enabled for global positioning and BA. - I have not verified the effective historical thread count. The presence of 32 logical CPUs does not prove that the historical run used 32 solver threads.
Results on the 1,002-image dataset
These are single runs. SfM total sums extraction, optional setup, matching and mapping; copying, hashing and model inspection are excluded. Configuration A is the closer workflow comparison with the legacy run; configuration B has a different optimization contract. Configuration labels do not imply equivalent work.
| Workflow | Extraction | Matching | Mapper | SfM total | Registered images | Points | Mean point reprojection error |
|---|---|---|---|---|---|---|---|
| Legacy COLMAP + CUDA-GLOMAP | 27.46 s | 61.90 s | 863.34 s | 956.14 s | 1,002/1,002 | 360,048 | 0.471130 px |
| Integrated COLMAP, configuration A | 34.00 s | 132.21 s | 1,160.72 s | 1,330.83 s | 1,002/1,002 | 262,439 | 0.525971 px |
| Integrated COLMAP, configuration B | 37.08 s | 123.91 s | 1,533.16 s | 1,694.15 s | 1,002/1,002 | 274,655 | 0.498656 px |
The totals include 3.44 s of setup for the legacy run and 3.89 s for configuration A.
The point and observation sets differ. These mean errors are not a matched-observation accuracy comparison and do not establish degraded geometry. All reported BAs in the two completed integrated runs terminate with CONVERGENCE.
The two integrated profiles also have the following references on a separate 200-image dataset:
| Reference | Matching | Mapper | SfM total | Registered images | Points | Mean point reprojection error |
|---|---|---|---|---|---|---|
| Configuration A | 38.70 s | 165.56 s | 213.47 s | 200/200 | 88,297 | 0.514019 px |
| Configuration B | 34.99 s | 172.65 s | 216.24 s | 200/200 | 85,919 | 0.465205 px |
Where the mapper time goes
| Logged phase, 1,002 images | Legacy | Integrated A | Integrated B |
|---|---|---|---|
| Global positioning | 101.87 s | 175.41 s | 205.97 s |
| Regular iterative BA | 170.01 s | 191.21 s | 340.55 s |
| Retriangulation including refinement | 497.90 s | 764.95 s | 958.70 s |
Legacy timing excludes double-counting overlapping nested timers. Phase implementations and optimization scopes are not identical. In configuration A, retriangulation/refinement contributes approximately 267 seconds of additional time and accounts for 66% of mapper wall time.
At the tested commit, GlobalMapperOptions fixes SPARSE_SCHUR and disables automatic solver selection. I am not attributing this to a size-triggered dense-to-sparse switch.
The relevant upstream refinement code is IterativeRetriangulateAndRefine. I have not isolated the additional cost of its optimization scope from numerical-library or threading effects.
Diagnostic status at submission
A subsequent matching configuration took 61.91 s instead of 132.21 s. This indicates that the original matching timings should not be treated as equivalent-work performance measurements. Its 8-thread mapper completed with exit code 0 in 1,137.69 s; quality analysis and the paired 16-thread run were not complete at submission.
That diagnostic uses fresh features and --log_level 3, so it is not a clean A/B against the earlier table. The separate 8/16-thread comparison uses byte-identical copies of one prepared database, the same binary and logging, with OpenMP/BLAS settings fixed. I do not yet claim a thread-scaling result.
The diagnostic Ceres report confirms:
Sparse linear algebra library CUDA_SPARSE + AMD
Linear solver SPARSE_SCHUR SPARSE_SCHUR
Threads 8 8
Questions
- What profiling information beyond Ceres FullReport would best separate Jacobian evaluation, Schur construction, ordering, factorization, transfers and other costs in global-mapper refinement?
- Are there known performance issues at this commit, or recommended threading settings for GPU sparse BA?
- How should I establish a comparable optimization workload between standalone GLOMAP and the integrated global mapper before interpreting the difference as a regression?
I have retained raw logs and output models locally. I have not attached private images, databases or my detailed reconstruction recipe. This report establishes an observed slowdown in my workflow, not a minimal public reproducer or a proven quality-neutral fix.
- 主要语言
- C++
- 星标
- 12.9k
- 派生
- 2.2k
- 平均合并
- 1 天 9 小时
- 30 天内合并 PR
- 92
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
colmap/colmap 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 77/100
维护者通常 1 天内回复
-
FETCH_ONNX build links against a system ONNX Runtime instead of the downloaded one (find_package uses PATHS, not HINTS)可能已有人在做 @cola1917 于 9 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
Incorrect image-plane bounds for off-center cameras in visualize_model.py可能已有人在做 @wuyuze713 于 24 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 80/100
维护者通常 1 天内回复
-
Linking error未关闭
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 64/100
维护者通常 1 天内回复
相似的 Issue
-
`isValidState<FloatType>` cannot be instantiated: `isWithinLimits` is called without `<FloatType>`未关闭
难度 2/5 1-3 小时 新手友好度 72/100
tesseract-robotics/tesseract_planning#791 · 1 条评论 ·
-
bug javascript
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
sudara/melatonin_inspector#144 ·
-
enhancement third-party
难度 2/5 1-3 小时 新手友好度 78/100
pocoproject/poco#5656 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
uNetworking/uWebSockets#1964 ·