Interactive 3D visualization of COLMAP sparse/dense reconstruction output using Rerun's visualization capabilities.
colmap-rerun-demo.mp4
- Interactive 3D visualization of COLMAP reconstructions
- Dataset-specific visualization presets
- Resolution scaling for performance optimization
- Python API and CLI interface
pip install colmap-rerun
git clone https://github.com/vincentqyw/colmap_rerun.git
cd colmap_rerun
pip install -e .
For development:
pip install -e ".[dev]"
Download sample reconstruction data:
- Get sample data from Google Drive
- Unzip to get directory structure:
sample_data/dense/
├── images/ # Input images
├── sparse/ # COLMAP sparse reconstruction
│ ├── cameras.bin # Camera intrinsics
│ ├── images.bin # Camera poses
│ └── points3D.bin # 3D point cloud
└── stereo/
└── depth_maps/ # Depth maps (optional)
The demo script accepts the same arguments as the CLI interface (see below for full options):
Basic usage:
python demo.py --dense_model sample_data/dense
Advanced options:
python demo.py --dense_model sample_data/dense --resize 640 480 --unfiltered
from pathlib import Path
from colmap_rerun import visualize_reconstruction
from colmap_rerun.core.read_write_model import read_model
data_root = Path("sample_data/dense")
cameras, images, points3D = read_model(data_root / "sparse")
visualize_reconstruction(
cameras=cameras,
images=images,
points3D=points3D,
images_root=Path(data_root / "images"),
depths_root=Path(data_root / "stereo/depth_maps"), # optional
)
After installing with pip install -e .
:
viz-colmap --dense_model sample_data/dense
Argument | Description | Required |
---|---|---|
--dense_model |
Path to dense reconstruction folder | No |
--sparse_model |
Path to sparse reconstruction folder | Yes* |
--images_path |
Path to input images folder | Yes* |
--resize W H |
Resize images to width W and height H | No |
--unfiltered |
Show unfiltered point cloud (with noise) | No |
*Required if not using dense_model
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
- Rerun team for visualization framework
- Based on structure_from_motion example
- COLMAP team for 3D reconstruction work
MIT - See LICENSE for details.