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:
- Install the Ceres Solver following the official instructions.
- 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
Built Distributions
Hashes for pyceres-2.3-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11f954480fdd94193a603cc3001535cd8003b0ad45fb427879d680bea8a19320 |
|
MD5 | 3c0288d7baeaf92be428244143e59f69 |
|
BLAKE2b-256 | 522856aa58f1b2cf5c6c6d3c422cb69cd04e8f8f6e5868e74de432e7dffff789 |
Hashes for pyceres-2.3-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b06708c76f5e3d9f4501f6dc269814e02df27b4b837aa8a4b9f9049922632b1 |
|
MD5 | 45e2c065552eebc6a6975669a557dbf5 |
|
BLAKE2b-256 | 2894a39e341fe6cbc8abbdc52fa6d3b9d2b8b9b96d51f1aebe60006f5b376c07 |
Hashes for pyceres-2.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c277852f00f9ff0a0d2b9910046896b0de4ff8584c56c8e13f43dd4a2af275a |
|
MD5 | 57c4051feff2b436cffe4bf58644ede2 |
|
BLAKE2b-256 | 7816aa8724a09d81aae5e6884081a6625ee6c39f9346aa06aa996aa7175aff5c |
Hashes for pyceres-2.3-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5fdb31c19c6b9c80f5564f78dcb96a4c691d7031d5233380e9910f05c03e4c41 |
|
MD5 | e2a81252f86f62575157cc79feb66e0d |
|
BLAKE2b-256 | 47f5c8a97de838a0ce503cf368328e8a39ccf564c462abe7219b23fa0959a476 |
Hashes for pyceres-2.3-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95deb890c2d5344767a1d4480f11c67b0dc66c01267266f0e787003ceeab9453 |
|
MD5 | eabb59a91d2c7ef922fff5c347a6da31 |
|
BLAKE2b-256 | 6812055c5647010fc6413a80ea2e06643334aca2e84d7f4d0a1bb2e7085398ad |
Hashes for pyceres-2.3-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8670491f631850b1b7edfa23c48255e3b869d8494b66a5c590bcb3e4d7bcab9a |
|
MD5 | 01d7d2c0d83cb6252687e6a7a59dec39 |
|
BLAKE2b-256 | b866cb7a91e6e7b268c0284b6bd88c8a4223cd6c1cc78ea3d30b86165b6b0165 |
Hashes for pyceres-2.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e22d4fa25a89aaedf148760bb2e8f335b631d1652247a2464cefc7663ca3f98 |
|
MD5 | 6eb4a2932d3f3622e71036d64fb7f407 |
|
BLAKE2b-256 | 98001d2208fb6cbd43e6320dea58426152232b83123a66df2a38ee9a280e3039 |
Hashes for pyceres-2.3-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b792c93f989cec46e645879fb0be9fe2e5005f45ae7eebf42af27676fc36ec7 |
|
MD5 | ebe9c3f854de221dd45afb7846826258 |
|
BLAKE2b-256 | 7fbc3e32777cab3a01cd13a5a0681563230b1f6471644edb90b53a71d7a8dce2 |
Hashes for pyceres-2.3-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4cf628aa5726b0e85c2815eec136c101198dd90b4e63709897581fb667fc62a |
|
MD5 | b8cb96c03b50ef8ee710bb9f68a26851 |
|
BLAKE2b-256 | 1c0aa60083908bd01f3f0a5b1b82fbbec276c9d9f70e13c0d21b38e33b6613ed |
Hashes for pyceres-2.3-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d9ab030d0455d231c5214bc8f2730e13fd1fa23ed9bd30e10ac5c8f670d678c |
|
MD5 | 08f9c82705d263473f0604d8dbaedbd5 |
|
BLAKE2b-256 | 86f181d0a1c931eaf6ae65832f9ccf2a1b197eb560a91430d516d3ea2b260d42 |
Hashes for pyceres-2.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 488e58a0a6cef0e082befdb28c4f628efaa046e3ef9448e4ddab67d342d18bb2 |
|
MD5 | 054094890b9a8be8d86d9fecc5468799 |
|
BLAKE2b-256 | a656ad07b6ec434b62978c0e9e4e880ad7f58a584d92b073bbaabee0f13ba707 |
Hashes for pyceres-2.3-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fdf61e88591eec5e6ef239b03964d07f4ddc33b97dd6cda634b4f93b47db20e2 |
|
MD5 | fc7de1872ada91e17aeca33f4cb73caa |
|
BLAKE2b-256 | 63345af940d357ae98057866ea9dad28df8bbe5edfe0f96a4adb7be28a3ecf30 |
Hashes for pyceres-2.3-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25c07706dd3939895687f2cd8c189dba38c6735aca5de04adbacf8f682b6a4aa |
|
MD5 | 1bc503238e5d4b877e0fbe58a6397215 |
|
BLAKE2b-256 | 9f7f0b3e1b7407eafc5028c773818366d1430e1ba341d018ec7dd0dcf39f6be1 |
Hashes for pyceres-2.3-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4de23f52665d8e4b65fd97a0fba6f01a641bfa2e927e1e4827e169d6f9510fb |
|
MD5 | 8f3fe0327bc3b3bdea3cd9517bc91edc |
|
BLAKE2b-256 | 382e426a4282f3d7265ff0e73abafc337672161ff828b2fff4b4cb96f2f595fd |
Hashes for pyceres-2.3-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 834a505b2211f9ffea97c39f424d4433301d7b46f38b7b3cf398ae953f168f2d |
|
MD5 | bc77d4fd232a4767d046d1af83b07031 |
|
BLAKE2b-256 | 5952a705790b7d95eac9bb0d2f7d68f9068ad94def24d7207f065bb529814ca6 |
Hashes for pyceres-2.3-cp39-cp39-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 013974ad3630637ae7eb234dd4701b731c9c03da88965891e1f32c8b28275e55 |
|
MD5 | 19b0675c39540e2300a17751b160bce2 |
|
BLAKE2b-256 | e56996d00457f412662077e602268957eb932f734e9d475d483edc6d0914b43a |
Hashes for pyceres-2.3-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99bcf94654e5c07978042546a261c385ebfc696d930b97a2369ea21999cf99a4 |
|
MD5 | 229e29f377ee81b6b68216652ca2e0cc |
|
BLAKE2b-256 | 7334081c15e06fb35f0fdb8b09822f38a98805b8d96a9de3f2bc8938d02de555 |
Hashes for pyceres-2.3-cp38-cp38-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 670827941c6144c7abe386e6585284c6460fbd96e744bad3a57e8408aacf5cc8 |
|
MD5 | 4865601ca7b66cb05222915b3907ac50 |
|
BLAKE2b-256 | 79a2db9e6b1bb16540442d0f31a403860b88177cb22540c1ddcf3aa0182c8111 |
Hashes for pyceres-2.3-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94a8edd1c41646128780238d014afe3f158f30cca7ff13895ca400a616f6bf25 |
|
MD5 | 433cb85b052b3857a79bc3620da2cdee |
|
BLAKE2b-256 | 4e5eebc311b02cfc05e4b0bea3a3bc46d89bce66a03cc763e7a90bf0ef638137 |
Hashes for pyceres-2.3-cp38-cp38-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67d5fef67475caf57219d8e8b639bc1ec9783b88465fa201306236ef9075b26e |
|
MD5 | b5d9366c26a6452eb1111e9f9124b46d |
|
BLAKE2b-256 | dcf7a8f7209c9f32df14909246e27173af5f46cd2e3ec6b2b0678259a1ad4196 |