Advanced RANSAC (DEGENSAC) with bells and whistles for H and F estimation
Project description
pydegensac
This repository contains an Python wrapper of RANSAC for homography and fundamental matrix estimation from sparse correspondences. It implements LO-RANSAC and DEGENSAC.
It was originally located in https://github.com/ducha-aiki/pyransac, but was renamed to avoid conflict with already existing pyransac in pypi from other author.
Performance
Vanilla pydegensac implementation is marginally better than OpenCV one and with degeneracy-check enabled (DEGENSAC) it is the state of the art, according to the recent study Yin et.al."Image Matching across Wide Baselines: From Paper to Practice", 2020.
Installation
To build and install pydegensac
, you can use pip:
pip install pydegensac
Or clone or download this repository and then, from within the repository, run:
python3 ./setup.py install
or
pip3 install .
Building hints from Tomasz Malisiewicz
- Compiling pydegensac without a system-wide install.
python3 ./setup.py build
- Compiling on Mac OS X computer Use GCC instead of Clang. The most recent version on my machine (installed via brew) is gcc-8. Try this:
CC=gcc-8 python3 ./setup.py build
- Compiling on Ubuntu 18.04 You need LAPACK and a few other libraries and I always forget those specific package names. Take a look at my pydegensac Dockerfile to see the exact packages you need to apt install on an Ubuntu 18.04 system (https://github.com/quantombone/pydegensac-dockerfile/blob/master/Dockerfile)
FROM ubuntu:18.04
update system
RUN apt-get clean
RUN apt-get update
RUN apt-get install -qy \
git python3 python3-setuptools python3-dev
RUN apt-get install -y cmake libblas-dev liblapack-dev gfortran
RUN apt-get install -y g++ gcc
download and build pydegensac
RUN git clone https://github.com/ducha-aiki/pydegensac.git
WORKDIR pydegensac
RUN python3 ./setup.py build
copy built assets into target directory (which will be a -v volume)
CMD cp -R /pydegensac/build/lib.linux-x86_64-3.6/pydegensac /target_directory
dockerfile
https://github.com/quantombone/pydegensac-dockerfile
Example of usage
import pydegensac
H, mask = pydegensac.findHomography(src_pts, dst_pts, 3.0)
F, mask = pydegensac.findFundamentalMatrix(src_pts, dst_pts, 3.0)
See also this notebook with simple example
And this notebook with detailed explanation of possible options
Requirements
- Python 3
- CMake 2.8.12 or higher
- LAPACK,
- BLAS (OpenBLAS, MKL, Atlas, ...)
- A modern compiler with C++11 support
Citation
Please cite us if you use this code:
@InProceedings{Chum2003,
author="Chum, Ond{\v{r}}ej and Matas, Ji{\v{r}}{\'i} and Kittler, Josef",
title="Locally Optimized RANSAC",
booktitle="Pattern Recognition",
year="2003",
}
@inproceedings{Chum2005,
author = {Chum, Ondrej and Werner, Tomas and Matas, Jiri},
title = {Two-View Geometry Estimation Unaffected by a Dominant Plane},
booktitle = {CVPR},
year = {2005},
}
@article{Mishkin2015MODS,
title = "MODS: Fast and robust method for two-view matching ",
journal = "Computer Vision and Image Understanding ",
year = "2015",
issn = "1077-3142",
doi = "http://dx.doi.org/10.1016/j.cviu.2015.08.005",
url = "http://www.sciencedirect.com/science/article/pii/S1077314215001800",
author = "Dmytro Mishkin and Jiri Matas and Michal Perdoch"
}
Acknowledgements
This wrapper part is based on great Benjamin Jack python_cpp_example
.
Project details
Release history Release notifications | RSS feed
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 pydegensac-0.1.3-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 819b234e88de746bcd8d26ff1636de2abf1f554d80a9b8e0c05e0210fe2b1c73 |
|
MD5 | 235cc01b46d71774b7363677c3168316 |
|
BLAKE2b-256 | f3440761a1d8b5fefddaabda471ebe9855eaccf43c72393477f3d30e7babc42a |
Hashes for pydegensac-0.1.3-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb2d2eaaf81efd8b94db2d18153dc4d1c807144de0710b3d875d3dd72f9d1147 |
|
MD5 | 6f34d32550a4944d12274835b9c29b68 |
|
BLAKE2b-256 | 192941f233f1ea370de2780ee4ad4bdede6e1c95ec5d4233ed2613dec0a1ea95 |
Hashes for pydegensac-0.1.3-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d79e33ec827fa9b8004defb0b9093810c212f5c8857bead7346489d0fdeaff6 |
|
MD5 | 1c6b7469f5436524f2bc723753e76d27 |
|
BLAKE2b-256 | 8c730487c7d9cb6291dd62734dd77c0d531202c5f11f5c706579dc60a6fb0b63 |
Hashes for pydegensac-0.1.3-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90377b84902e519621e5ea956c4670a227daba0ae713ead29bfd3a4db6d44625 |
|
MD5 | a0e99b3a899683c210241c7dff72fbaf |
|
BLAKE2b-256 | fc36e08449b3165747b0d03a9789eb4298f1ce109d63016e6de32762de7040b0 |
Hashes for pydegensac-0.1.2-pp37-pypy37_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30ffa095162884950c260f159751b0c342755b05a05a49ad5eb6a630126e00d9 |
|
MD5 | caf7adf4a2dd2bc902f0163d39d852f1 |
|
BLAKE2b-256 | 4cc288d8c604d52f684c2415ada6ad05d13d1e4a83ad3f463a692e5cdc1e7021 |
Hashes for pydegensac-0.1.2-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2185fdb51f3ef3866979a1e76e98732b928080aaa0286b75738483d80988a0a |
|
MD5 | 13993389612c797bc7466f4522db98bf |
|
BLAKE2b-256 | 98cac849908e04876e1bed9d8dac7e21f3cc87465337903a24acf6eebd8987bd |
Hashes for pydegensac-0.1.2-cp311-cp311-macosx_13_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d2e29aa43a9f22689e66953286bf54e07dc5f715a3dfa9e55a1b27c6acda0382 |
|
MD5 | 02503178e5d2e648146bbd8e04ab6bfb |
|
BLAKE2b-256 | 83aee0361a30f0730f0158eee719322be32113419635ea756d7f811857c4010c |
Hashes for pydegensac-0.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27f524e0d0ff6f0e749b18561b5b373bbcd1a3d683e321af3805a40c028f1756 |
|
MD5 | 580ed1b55ba8434ee479350880db8e85 |
|
BLAKE2b-256 | cc69db8a93cd42b6508a24c1ae8fdccb7db86235838e40d3c6b7f968ffd4a099 |
Hashes for pydegensac-0.1.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8a7c23d16f603d9a22c52058e307b13fc42b8bfc2e3d2dae4afc5f1949ff09d |
|
MD5 | 99daab5540db71547c05868e0ad33c63 |
|
BLAKE2b-256 | df796cb7591563be5e3b6d4913b9b494109edc7189d66e2bb1589208e1d6900f |
Hashes for pydegensac-0.1.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3834ed3633516698651dd7bd4138ec5b3593ef99731d8f9037f000de42e14838 |
|
MD5 | 7011b452d04d48c518fdd8dfdcd8ccea |
|
BLAKE2b-256 | a82664588c24bf0a3319d2ce3e824a90b89b02235fd8aa1eb3c7efcf1d2a1ffa |
Hashes for pydegensac-0.1.2-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60237214a91d4f27e6b35f0617f078de3c923a63598ee8d154e91995f376aaf6 |
|
MD5 | 7f0e68f5419cbe2a249024c5fdc16ee6 |
|
BLAKE2b-256 | 3d085aa521e833d4c513349320ab6317fe298de6ab0e84de77c19444edd60919 |
Hashes for pydegensac-0.1.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ceca101adec85e88a7d5faa1950e0895a1748e78be3592f15532cc9971a7c8da |
|
MD5 | 8024b41860f3e30c8c9ed85a1a87ee6a |
|
BLAKE2b-256 | 84c7c8862d447500acb172e76ee01a8efcba0fc4f5599753dc980cbce14a7ff6 |
Hashes for pydegensac-0.1.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f17f595586fd4233968627b54c27cda87e6d9f9c12d0e33655bc8a90f4bf4242 |
|
MD5 | a4d40f99c13aed6a721f6cdcc85e564c |
|
BLAKE2b-256 | 3db94ca297240976c40460e1f86678b741679bbd127f4a3925376d95f6cec54a |
Hashes for pydegensac-0.1.2-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d2af348b0f5738a706c8295e9eb0fc46c2c86271049c75118369cc28da5c8a76 |
|
MD5 | 3d291b0158089a0d74ef865af0585e6a |
|
BLAKE2b-256 | 0ba093c319821195bd244a2fbd1aad0169b1df4f994491efde87b4418a4447dd |
Hashes for pydegensac-0.1.2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3bcf611f07a1cbedc16e847efd2b240630dbc422e6a121149bea9cea3eb1d244 |
|
MD5 | d2a3442fd9b75d854edba30f2edcb2a7 |
|
BLAKE2b-256 | eb8fc997bfd96cb831ccae8dcf5422a8deaf684f0551631c67f6ee2de99c14d3 |
Hashes for pydegensac-0.1.2-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d29f2d6086813b9ae82e02d445a70d44c9b086ad3abf5030a4b648513020d36e |
|
MD5 | 8232219f41a81239be64c0a585bbd532 |
|
BLAKE2b-256 | 39722b23e03fad436f66b97d1c8f7ae3b6908bd795f50d6a613f85c24e56997e |
Hashes for pydegensac-0.1.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dcb08b5924b0ba6044911db473a14ae56d7e754bcd5af1c8af0acc518b563588 |
|
MD5 | fdfc3dff66ca8a04a36fc7fabf133585 |
|
BLAKE2b-256 | c82ec3f311bdf53dbef701cd537599bcd7ed418b4c47884ecd22622220d159e4 |
Hashes for pydegensac-0.1.2-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b389b762b12e611098cb703829c7286e30bfa7c85d955faa69bcc892c6590f17 |
|
MD5 | a7eb3291da1d7643823739125cea1250 |
|
BLAKE2b-256 | fa4d4a827662cf6c66ff8a04118c5b260e2264ba7d496b9b4dd035a61b0da104 |
Hashes for pydegensac-0.1.2-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6191759b7b1de48619f96dcf175cf8329a4c629c993d0009b264eb59a6c8137 |
|
MD5 | 3a6ebde6311abbb8928990a6cf7a0c5a |
|
BLAKE2b-256 | 03455881a56ce97998e3af5faa505d219e41e7d07c269e5df3344c8034690384 |
Hashes for pydegensac-0.1.2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9df467122614a17360a51d3b463a84f6409c576ef6b56cb6f7118931e8b10838 |
|
MD5 | 6306ebe2ce8acc1e34ef91c0161cf491 |
|
BLAKE2b-256 | 016504f1a4db0c1beddba08a4a00c2beb7e59923bdc7378aa9aecaeadac7f9ff |
Hashes for pydegensac-0.1.2-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5716729beddbcb0dd9353a41965d4ab9d771bec2ea2b8fa0eab305c1060dfc36 |
|
MD5 | 1c3b7e8145d97ec10c64f998dde20600 |
|
BLAKE2b-256 | 58a8c108a5169cefbce6721d10aa28ef8b00e81a74826654dc571d3690110798 |
Hashes for pydegensac-0.1.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b82cb4b7d9010ed13ce65ffb3ff73f31b5299021e146484504569d1148f02e6f |
|
MD5 | dc3467444b96be3b7b66e14f465fb306 |
|
BLAKE2b-256 | 67eac3795a0b6c5e173afab1e268b36f90f65d0518ccf74bd70b44546dbc2343 |
Hashes for pydegensac-0.1.2-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd4ce7744dee0dca6878eee091b415d6d5006aa9dda7bc03db1d577caf255dbd |
|
MD5 | 036a62d1f9a2bc948e9b771cda60cfdc |
|
BLAKE2b-256 | da05ee3c2e7b5a2abec26a15073de4fe7cc35699e260fe681510960a3ef56f69 |
Hashes for pydegensac-0.1.2-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad9f4297b10748a09fe7029561ff04caabbf9709f8d9ffa37af46f07592f4ac5 |
|
MD5 | f99e3b9800e750ad3eebad12ad12c2ef |
|
BLAKE2b-256 | b59631e168a995759098950aefce973a8466585e14f452f2a99da8e1ba77f28f |
Hashes for pydegensac-0.1.2-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a55de8d84aa74a5b7bc1f454edc0def74fbaff6a3503eee39076da4b28c2290 |
|
MD5 | 1d78a0ccdbab08622699ff8c3cd2076c |
|
BLAKE2b-256 | 0ae27f3c9af975b40afa4dd8cd56c1254bce2b3514404f2cc8f1e366c9ea0b4a |
Hashes for pydegensac-0.1.2-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | df48922fd1e1ec56f1262631b1996b7a820a0f613d6a53e96949b9438a4c9760 |
|
MD5 | 3dcab5cf0cec2c805619e0b11f28af51 |
|
BLAKE2b-256 | 2e896a912be441c73db8428f3454aa5e49aa51f6bcee859628668dda52365827 |
Hashes for pydegensac-0.1.2-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d5585281f440bdac7dd718ddaed583414577f669ae3ccb2baa63deed6516b2b |
|
MD5 | 0d878b3b136b1b6df38a6a13add3eadd |
|
BLAKE2b-256 | cbb0b54568d55329834cb7b237c335f0bb53632e7d99e44474bb4d960a6637a3 |
Hashes for pydegensac-0.1.2-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59879d96b81a1f7323119cbcedba9b7837c14cecc38c97f54bae813171c24738 |
|
MD5 | 4daeee126907b5e43defd26d6ad3c73c |
|
BLAKE2b-256 | e8f59b0cd237d36c9ef3894dccc2172179f988a1eaedec63fbc68506f9c0b7b2 |
Hashes for pydegensac-0.1.2-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e7b97d5a32304304d7742b1bdfaf42bd0ce6559e3acd04ae5bf12a1a75dba1b |
|
MD5 | 2021ccbccd2c0ed21d494bc8276608db |
|
BLAKE2b-256 | 17daa100157784ae10a258620fe64514d5d596403cf8b7b054d87a4f75fbd110 |
Hashes for pydegensac-0.1.2-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b60714bf4a289e724851b7f3a68822bfcf6a3ea3185177fe1f1fabb1b4d73225 |
|
MD5 | 617a959160d4983c78214ec9b6fafdf4 |
|
BLAKE2b-256 | 53d892fb3b22a1c6eed38012e60a06441d41cd273f12d12da0ecac43b2ec1b7a |
Hashes for pydegensac-0.1.2-cp27-cp27m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e7355372032112cb79b69fb9f5b0b0689346b7e8866fda0c5c1ada172d3068a |
|
MD5 | 04391e659988a642b85977031a69f641 |
|
BLAKE2b-256 | a573fdf578cebd1e3a90ba351255b8896a3b660363e49a89cc88d1d5e0ad4d57 |