SkillAgentSearch skills...

Pyceres

Factor graphs with Ceres in Python

Install / Use

/learn @cvg/Pyceres
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

pyceres

This repository provides minimal Python bindings for the Ceres Solver and the implementation of factor graphs for bundle adjustment and pose graph optimization.

Installation

Wheels for Python 9/10/11/12/13/14 on Linux, macOS 10+ (both Intel and Apple Silicon), and Windows can be installed using pip:

pip install pyceres

To build from source, follow the following steps:

  1. Install the Ceres Solver following the official instructions.
  2. Clone the repository and build the package:
git clone https://github.com/cvg/pyceres.git
cd pyceres
python -m pip install .

Alternatively, you can build the Docker image:

docker build -t pyceres -f Dockerfile .

Compatibility with pycolmap

pyceres Version | Corresponding pycolmap Version(s) -- | -- 2.6 | >= 3.12.6 2.5 | 3.12.0 - 3.12.5 2.4 | 3.11.0 2.3 | 3.10.0

Factor graph optimization

Factors may be defined in Python (see examples/test_python_cost.py) or in C++ with associated Python bindings. PyCOLMAP provides the following cost functions in pycolmap.cost_functions:

  • reprojection error for different camera models, with fixed or variable pose and 3D points
  • reprojection error for multi-camera rigs, with fixed or variable rig extrinsics
  • error of absolute and relative poses
  • Sampson error for epipolar geometry

See examples/ to use these factors.

Credits

Pyceres was inspired by the work of Nikolaus Mitchell for ceres_python_bindings and is maintained by Philipp Lindenberger, Paul-Edouard Sarlin, and Shaohui Liu.

View on GitHub
GitHub Stars355
CategoryDevelopment
Updated2d ago
Forks49

Languages

C++

Security Score

95/100

Audited on Apr 5, 2026

No findings