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 magsac

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

Download files

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

Source Distribution

pymagsac-0.2.0.tar.gz (3.2 MB view details)

Uploaded Source

Built Distributions

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

pymagsac-0.2.0-cp311-cp311-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.11Windows x86-64

pymagsac-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

pymagsac-0.2.0-cp310-cp310-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.10Windows x86-64

pymagsac-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

pymagsac-0.2.0-cp39-cp39-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.9Windows x86-64

pymagsac-0.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.5 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

pymagsac-0.2.0-cp38-cp38-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.8Windows x86-64

pymagsac-0.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.5 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

File details

Details for the file pymagsac-0.2.0.tar.gz.

File metadata

  • Download URL: pymagsac-0.2.0.tar.gz
  • Upload date:
  • Size: 3.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for pymagsac-0.2.0.tar.gz
Algorithm Hash digest
SHA256 a0ff80853b4f8f6504af5e2d448ebc92dbb5bfe923be8c309d19620cbfb7c0c7
MD5 b45d73858e918589df900f8ede5a4e1e
BLAKE2b-256 2a6b3296309b4d563614a143f2019244447b962483a7f320fbaf27d6bad7658e

See more details on using hashes here.

File details

Details for the file pymagsac-0.2.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: pymagsac-0.2.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 3.5 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for pymagsac-0.2.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 e6d382cfccc372c4bf753dee46786d6b5b21503cb7288d20fa2f1eb90a6d3ac3
MD5 398605c008679cd5de89c629859651fb
BLAKE2b-256 f2d096ac352bf4d4a73900c9fe259956b91144f87732b97cf187b7c559fef2d7

See more details on using hashes here.

File details

Details for the file pymagsac-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pymagsac-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 196e1fcb463fad71c09086ca8167e1922f3a92f39e2caf8e97262dca9cc4687f
MD5 986b4f8dd2f8259f9f730df857b23285
BLAKE2b-256 fc7ccd9f30d9f4e250ecae77a072838bf8ab129bb4a9eec109a9bb52f1d1f016

See more details on using hashes here.

File details

Details for the file pymagsac-0.2.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: pymagsac-0.2.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 3.5 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for pymagsac-0.2.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 1e27f18b11753caef66db0bb7b87e49d10c3ec28484ba106f873058dc87b4d7d
MD5 6bbea60a774c187adf20e19dcb2d19f6
BLAKE2b-256 dc3749046147a5fbbec719227703c265c5dd7b8b685d3fb91b7cb6862ae1af09

See more details on using hashes here.

File details

Details for the file pymagsac-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pymagsac-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 22129062e9cca7e7cbfeeeac9aadcd8e2097fe3f753bcf3530ecae7054c8da94
MD5 aaf3ecbec1d3043bf880c0f8f0a00853
BLAKE2b-256 607cf930637a4bbc376c7541e2cd2b9bad7c408f8528fb7aa2f9428d83facd08

See more details on using hashes here.

File details

Details for the file pymagsac-0.2.0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: pymagsac-0.2.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 3.5 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for pymagsac-0.2.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 745e67f5808f1b093f7486d9ea73cb6d9e34525acae9d70cd1f0d3639e697e7d
MD5 491f0341345f26a3a81f02ea3eb74807
BLAKE2b-256 e28f006066682dd011089cacf5c1aa37d3041d40f0fad892c0d94ed55e855558

See more details on using hashes here.

File details

Details for the file pymagsac-0.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pymagsac-0.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7164346200d910583e1ca0165701732abb5cb67e0769dc437dbb0797cc38d939
MD5 7025f3a3c71012cd0a26f5aa9138f34f
BLAKE2b-256 0ffbe6cd1162849ebefe09bbea788e44feef45264a0d3f6920887bb3c3d657f9

See more details on using hashes here.

File details

Details for the file pymagsac-0.2.0-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: pymagsac-0.2.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 3.5 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for pymagsac-0.2.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 96e8c096ed671bad62fad1756df7151b3e6fd58bd6615a7ae4cfb469144e5780
MD5 ff596336996ef1f0358f712bc98b038e
BLAKE2b-256 a56c14c42502c3f5a5ee0330709fd916ff3dcb0380be7999a8e6d725fc14f8a1

See more details on using hashes here.

File details

Details for the file pymagsac-0.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pymagsac-0.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b5870579898326ab57dcdaa43428ab9603a3365ccf2481cad1eeb2146bc742a5
MD5 55eb77f15c6978e445a5e11581a87953
BLAKE2b-256 3d96cce008d80c7bf19a7e5926a91601029b564ef22726fd4ce5aa14e9ad3556

See more details on using hashes here.

Supported by

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