Skip to main content

Important news

I am happy to announce that MAGSAC++ had been included in OpenCV. You can check the documentation at link. A comparison of OpenCV MAGSAC++ with the other robust estimators is at link thanks to Dmytro Mishkin.

OpenCV USAC Benchmark

The MAGSAC and MAGSAC++ algorithms for robust model fitting without using a single inlier-outlier threshold

The MAGSAC and MAGSAC++ algorithms proposed for robust model estimation without a single inlier-outlier threshold.

The MAGSAC paper is available at Link.

The MAGSAC++ available at Link.

Both methods are explained in the Latest developments in RANSAC presentation from CVPR tutorial RANSAC in 2020.

Experiments on homography, fundamental matrix, essential matrix, and 6D pose estimation are shown in the corresponding presentation from the tutorial RANSAC in 2020.

Tested on OpenCV 3.46 and 4.3. To run the executable with the examples, copy the "data" folder next to the executable or set the path in the main() function.

If you use the algorithm, please cite

@inproceedings{barath2019magsac,
	author = {Barath, Daniel and Matas, Jiri and Noskova, Jana},
	title = {{MAGSAC}: marginalizing sample consensus},
	booktitle = {Conference on Computer Vision and Pattern Recognition},
	year = {2019},
}

@inproceedings{barath2019magsacplusplus,
	author = {Barath, Daniel and Noskova, Jana and Ivashechkin, Maksym and Matas, Jiri},
	title = {{MAGSAC}++, a fast, reliable and accurate robust estimator},
	booktitle = {Conference on Computer Vision and Pattern Recognition},
	year = {2020},
}

Install from PyPI with pip

There are pre-compiled wheels for Windows and Linux for Python 3.8 - 3.11 that you can install with:

pip install pymagsac

Thanks to @akaszynski for his contributions.

Installation C++

To build and install C++-only MAGSAC/MAGSAC++, clone or download this repository and then build the project by CMAKE.

$ git clone https://github.com/danini/magsac --recursive
$ cd build
$ cmake ..
$ make

Install Python package and compile C++

python3 ./setup.py install

or

pip3 install -e .

Example project

To build the sample project showing examples of fundamental matrix, homography and essential matrix fitting, set variable CREATE_SAMPLE_PROJECT = ON when creating the project in CMAKE.

Next to the executable, copy the data folder and, also, create a results folder.

Jupyter Notebook example

The example for homography fitting is available at: notebook.

The example for fundamental matrix fitting is available at: notebook.

The example for essential matrix fitting is available at: notebook.

An example comparing different samplers on fundamental matrix estimation is available at: notebook.

Requirements

  • Eigen 3.0 or higher
  • CMake 2.8.12 or higher
  • OpenCV 3.0 or higher
  • A modern compiler with C++17 support
  • GFlags

Performance of MAGSAC++

MAGSAC++ is the state of the art according to "RANSAC in 2020" CVPR tutorial's experiments.

Performance of MAGSAC

MAGSAC is the state of the art according to the recent study Yin et.al."Image Matching across Wide Baselines: From Paper to Practice", 2020.

IMW-benchmark

IMW-Challenge

Metadata

Release files for pymagsac 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pymagsac 0.2.3
File Size Uploaded
pymagsac-0.2.3.tar.gz 3.4 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for pymagsac 0.2.3
File
pymagsac-0.2.3-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
pymagsac-0.2.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.17+ x86-64 Details
pymagsac-0.2.3-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
pymagsac-0.2.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ x86-64 Details
pymagsac-0.2.3-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
pymagsac-0.2.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details
pymagsac-0.2.3-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
pymagsac-0.2.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details
pymagsac-0.2.3-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
pymagsac-0.2.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details

Total release size: 48.7 MB

Release files / pymagsac-0.2.3.tar.gz

Download URL pymagsac-0.2.3.tar.gz
Size 3.4 MB
Tags Source
SHA-256 checksum
How to use checksums
e7e277f3a07b2d8e7eed689f5f3ef331ac15a92092e8b4d172b639ce28df7947
BLAKE2b-256 checksum
How to use checksums
f90aeb454aa8119c0d91433d23007fccd854947faee17a18939dd6bef1323e85
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 23, 2026.

Transparency log

Release files / pymagsac-0.2.3-cp314-cp314-win_amd64.whl

Download URL pymagsac-0.2.3-cp314-cp314-win_amd64.whl
Size 3.8 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
2a20f694bcea2d93fb9482964b233a14bb0916772adc9e624407b2be9c3ce8a9
BLAKE2b-256 checksum
How to use checksums
2aecd942902056aa3aaaa8ff05fc6e9de04c2bc4fc881325f53b4bbf485afc4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 23, 2026.

Transparency log

Release files / pymagsac-0.2.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL pymagsac-0.2.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 5.5 MB
Tags CPython 3.14 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
978dc81df6cee786bbcd4c225647e9535a1aaaf5e4a3957aaab335fd0fb3c86d
BLAKE2b-256 checksum
How to use checksums
1502bee063bdd88be5b84e35fc255b71a51c45f18cd66a2e69c2d99c040abad4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 23, 2026.

Transparency log

Release files / pymagsac-0.2.3-cp313-cp313-win_amd64.whl

Download URL pymagsac-0.2.3-cp313-cp313-win_amd64.whl
Size 3.6 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
50611631dc9283f4ce0d8257a39fa69afab70984f78b185248846d4959db7537
BLAKE2b-256 checksum
How to use checksums
4efb4e4b4e742235f79fe23c1dc7e4c068693ef3daf9f9940bde465f4c110af2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 23, 2026.

Transparency log

Release files / pymagsac-0.2.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL pymagsac-0.2.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 5.5 MB
Tags CPython 3.13 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
97450545421efdf7bcc852620a0f2917991805a21d221be7858e213fbbdd4017
BLAKE2b-256 checksum
How to use checksums
b3a7e1d71df8af2c050a3c1c3fac5a3eee9b631df65f884b38ebcb7c9ecc2cfe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 23, 2026.

Transparency log

Release files / pymagsac-0.2.3-cp312-cp312-win_amd64.whl

Download URL pymagsac-0.2.3-cp312-cp312-win_amd64.whl
Size 3.6 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
c0786a622fe80628e474f1a7ad5f1d9f39b7045a9546fb3944aa27f39e819b43
BLAKE2b-256 checksum
How to use checksums
888f0d6762ed62695da8de9c1ee31fbed2982e2721681dc837b43a575cc0daa5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 23, 2026.

Transparency log

Release files / pymagsac-0.2.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL pymagsac-0.2.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 5.5 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
bea97a54559b12c0180a7c57e950876ab61eaccf72a5efd731db22581fe6110e
BLAKE2b-256 checksum
How to use checksums
4673ab6c31d854e90cdfe2333646061b3f03bf5cfae3eeb1cc2fda5aaac6a3ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 23, 2026.

Transparency log

Release files / pymagsac-0.2.3-cp311-cp311-win_amd64.whl

Download URL pymagsac-0.2.3-cp311-cp311-win_amd64.whl
Size 3.6 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
5593676d1c1dcc75bbbbd26ab7c7f04277e925a6fd8bc3f16970e9472373bfdd
BLAKE2b-256 checksum
How to use checksums
3f96a034b1b3bf9f52430c0704e57a3f1a7344305cf5547fe22786eceecd3226
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 23, 2026.

Transparency log

Release files / pymagsac-0.2.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL pymagsac-0.2.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 5.5 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
68ddfbfabf0f5b20be1e295a83641cace13d764dc644a11b2114ade57f475da7
BLAKE2b-256 checksum
How to use checksums
c6ba52fa862eaee6ec0d45e056db4881adbf43983e64949acb9e029f23ec5c42
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 23, 2026.

Transparency log

Release files / pymagsac-0.2.3-cp310-cp310-win_amd64.whl

Download URL pymagsac-0.2.3-cp310-cp310-win_amd64.whl
Size 3.6 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
bf87fd03c3ca0667af5a5f3c9779756982593bfb07ad726eaf6f3fa25208fac0
BLAKE2b-256 checksum
How to use checksums
cfb16a2b3d1003850124a8cb994e6ba77958778fb39f8c2e94c1880ad6d3c3ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 23, 2026.

Transparency log

Release files / pymagsac-0.2.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL pymagsac-0.2.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 5.5 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
82b864c90d8bfd8be397516ba7e70d795a72d414e31b80aa82d93b1fef2f128e
BLAKE2b-256 checksum
How to use checksums
a14af46284915285dd604bd3725c11a3037dfb5414a3e19580fe546df199c166
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 23, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.3 This release

11 release files

0.2.2

11 release files

0.2.0

9 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page