Skip to main content

Visualize COLMAP sparse reconstruction output using Rerun

Project description

COLMAP Rerun Visualizer

PyPI Version License

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

https://github.com/user-attachments/assets/590b9902-6213-4545-985a-af478ab6d576

Features

  • Interactive 3D visualization of COLMAP reconstructions
  • Support for both filtered and unfiltered point clouds
  • 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]"

Quick Start

Example Dataset

We provide sample reconstruction data to help you get started:

  1. Download the sample data from Google Drive
  2. Unzip the downloaded file to get the following directory structure:
sample_data/dense/
├── images/               # Input images (JPG/PNG format)
├── sparse/               # COLMAP sparse reconstruction
│   ├── cameras.bin       # Camera intrinsic parameters
│   ├── images.bin        # Camera extrinsic parameters (poses)
│   └── points3D.bin      # Reconstructed 3D point cloud
└── stereo/
    └── depth_maps/       # Depth maps (optional)
  1. Visualize the reconstruction:

Using CLI

The CLI provides several options for visualizing COLMAP reconstructions:

Basic Usage

Visualize dense reconstruction (automatically finds sparse model and images):

viz-colmap --dense_model sample_data/dense

Advanced Options

Visualize sparse reconstruction with custom paths:

viz-colmap --sparse_model sample_data/sparse --images_path sample_data/images

Resize images for better performance:

viz-colmap --dense_model sample_data/dense --resize 640 480

Show unfiltered point cloud (includes noisy data):

viz-colmap --dense_model sample_data/dense --unfiltered

CLI Arguments

Argument Description Required
--dense_model Path to dense reconstruction folder (contains sparse/ and images/) No
--sparse_model Path to sparse reconstruction folder (contains cameras.bin, images.bin, points3D.bin) Required if no dense_model
--images_path Path to folder containing input images Required if no dense_model
--resize W H Resize images to width W and height H for better performance No
--unfiltered Show unfiltered point cloud (includes noisy data) No

Or using Python API:

from pathlib import Path
from colmap_rerun import visualize_reconstruction
from colmap_rerun.core.read_write_model import read_model

# Setting data root
data_root = Path("sample_data/dense")

# Load reconstruction
cameras, images, points3D = read_model(data_root / "sparse")

# Visualize
visualize_reconstruction(
    cameras=cameras,
    images=images,
    points3D=points3D,
    images_root=Path(data_root / "images"),
    depths_root=Path(data_root / "stereo/depth_maps"),  # optional
)

Documentation

Full documentation is available at docs/.

Contributing

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

Development Setup

  1. Install development dependencies:
pip install -e ".[dev]"
  1. Run tests:
pytest
  1. Format code:
black .

Code of Conduct

This project adheres to the Contributor Covenant code of conduct.

Acknowledgements

  • This project uses Rerun for visualization
  • Inspired by COLMAP's 3D reconstruction capabilities

License

MIT - See LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

colmap_rerun-1.0.2.tar.gz (14.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

colmap_rerun-1.0.2-py3-none-any.whl (14.5 kB view details)

Uploaded Python 3

File details

Details for the file colmap_rerun-1.0.2.tar.gz.

File metadata

  • Download URL: colmap_rerun-1.0.2.tar.gz
  • Upload date:
  • Size: 14.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for colmap_rerun-1.0.2.tar.gz
Algorithm Hash digest
SHA256 57b005769b0af11b547c9dc7dd64a169540fe874209d39a00d34faec7073613b
MD5 0123f77710f3c9fbc204155f634ce259
BLAKE2b-256 14795cd37b73a339df63f87477e43d00334068a43b7de619a1fe8c7a3a585bf8

See more details on using hashes here.

Provenance

The following attestation bundles were made for colmap_rerun-1.0.2.tar.gz:

Publisher: publish.yml on Vincentqyw/colmap-rerun

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file colmap_rerun-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: colmap_rerun-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 14.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for colmap_rerun-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f955b34d488d710a97d28006f06c4888c0fe139c97f9a71dfa58f2d1f5a90c15
MD5 4c9f06b49443a4076ba1794ca1682f54
BLAKE2b-256 bbe1a7d8ec73c419c2b54b5a281faaa937b28bb2d9779f4a3abd2a217c4248f8

See more details on using hashes here.

Provenance

The following attestation bundles were made for colmap_rerun-1.0.2-py3-none-any.whl:

Publisher: publish.yml on Vincentqyw/colmap-rerun

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page