Skip to main content

Factor graph optimization with Ceres, in Python

Project description

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 8/9/10/11/12 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 .

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 and Paul-Edouard Sarlin.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

pyceres-2.2-cp312-cp312-win_amd64.whl (7.3 MB view hashes)

Uploaded CPython 3.12 Windows x86-64

pyceres-2.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.9 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

pyceres-2.2-cp312-cp312-macosx_11_0_arm64.whl (1.6 MB view hashes)

Uploaded CPython 3.12 macOS 11.0+ ARM64

pyceres-2.2-cp312-cp312-macosx_10_9_x86_64.whl (2.0 MB view hashes)

Uploaded CPython 3.12 macOS 10.9+ x86-64

pyceres-2.2-cp311-cp311-win_amd64.whl (7.3 MB view hashes)

Uploaded CPython 3.11 Windows x86-64

pyceres-2.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.9 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

pyceres-2.2-cp311-cp311-macosx_11_0_arm64.whl (1.6 MB view hashes)

Uploaded CPython 3.11 macOS 11.0+ ARM64

pyceres-2.2-cp311-cp311-macosx_10_9_x86_64.whl (2.0 MB view hashes)

Uploaded CPython 3.11 macOS 10.9+ x86-64

pyceres-2.2-cp310-cp310-win_amd64.whl (7.3 MB view hashes)

Uploaded CPython 3.10 Windows x86-64

pyceres-2.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.9 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

pyceres-2.2-cp310-cp310-macosx_11_0_arm64.whl (1.6 MB view hashes)

Uploaded CPython 3.10 macOS 11.0+ ARM64

pyceres-2.2-cp310-cp310-macosx_10_9_x86_64.whl (2.0 MB view hashes)

Uploaded CPython 3.10 macOS 10.9+ x86-64

pyceres-2.2-cp39-cp39-win_amd64.whl (7.3 MB view hashes)

Uploaded CPython 3.9 Windows x86-64

pyceres-2.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.9 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

pyceres-2.2-cp39-cp39-macosx_11_0_arm64.whl (1.6 MB view hashes)

Uploaded CPython 3.9 macOS 11.0+ ARM64

pyceres-2.2-cp39-cp39-macosx_10_9_x86_64.whl (2.0 MB view hashes)

Uploaded CPython 3.9 macOS 10.9+ x86-64

pyceres-2.2-cp38-cp38-win_amd64.whl (7.3 MB view hashes)

Uploaded CPython 3.8 Windows x86-64

pyceres-2.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.9 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

pyceres-2.2-cp38-cp38-macosx_11_0_arm64.whl (1.6 MB view hashes)

Uploaded CPython 3.8 macOS 11.0+ ARM64

pyceres-2.2-cp38-cp38-macosx_10_9_x86_64.whl (2.0 MB view hashes)

Uploaded CPython 3.8 macOS 10.9+ x86-64

Supported by

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