Skip to content

Vincentqyw/colmap-rerun

Repository files navigation

COLMAP Rerun Visualizer

PyPI Version License PyPI Downloads DeepWiki

Interactive 3D visualization of COLMAP sparse/dense reconstruction output using Rerun's visualization capabilities.

colmap-rerun-demo.mp4

Features

  • Interactive 3D visualization of COLMAP reconstructions
  • Dataset-specific visualization presets
  • Resolution scaling for performance optimization
  • Python API and CLI interface

Installation

From PyPI

pip install colmap-rerun

From Source

git clone https://github.com/vincentqyw/colmap_rerun.git
cd colmap_rerun
pip install -e .

For development:

pip install -e ".[dev]"

Getting Started

Download Example Dataset

Download sample reconstruction data:

  1. Get sample data from Google Drive
  2. 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)

Usage

Demo Script (Quick Start)

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

Python API

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
)

Command Line Interface

After installing with pip install -e .:

viz-colmap --dense_model sample_data/dense

CLI Options

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

Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

Acknowledgements

License

MIT - See LICENSE for details.

About

Simple tool to visualize COLMAP sparse/dense reconstruction using Rerun.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages