{"id":13436163,"url":"https://github.com/danini/graph-cut-ransac","last_synced_at":"2025-03-18T20:31:02.430Z","repository":{"id":38360018,"uuid":"102725519","full_name":"danini/graph-cut-ransac","owner":"danini","description":"The Graph-Cut RANSAC algorithm proposed in paper: Daniel Barath and Jiri Matas; Graph-Cut RANSAC, Conference on Computer Vision and Pattern Recognition, 2018. It is available at http://openaccess.thecvf.com/content_cvpr_2018/papers/Barath_Graph-Cut_RANSAC_CVPR_2018_paper.pdf","archived":false,"fork":false,"pushed_at":"2025-03-06T14:52:46.000Z","size":263439,"stargazers_count":443,"open_issues_count":10,"forks_count":93,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-03-06T15:37:20.147Z","etag":null,"topics":["computer-vision","essential-matrix","fundamental-matrix","graph-cut-ransac","homography","pattern-recognition","ransac","robust","robust-estimators"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danini.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-07T10:46:08.000Z","updated_at":"2025-03-04T08:16:29.000Z","dependencies_parsed_at":"2024-10-27T19:13:16.445Z","dependency_job_id":"48efb848-d967-471a-bfcd-ddde4991d451","html_url":"https://github.com/danini/graph-cut-ransac","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danini%2Fgraph-cut-ransac","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danini%2Fgraph-cut-ransac/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danini%2Fgraph-cut-ransac/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danini%2Fgraph-cut-ransac/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danini","download_url":"https://codeload.github.com/danini/graph-cut-ransac/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244301329,"owners_count":20430923,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["computer-vision","essential-matrix","fundamental-matrix","graph-cut-ransac","homography","pattern-recognition","ransac","robust","robust-estimators"],"created_at":"2024-07-31T03:00:44.923Z","updated_at":"2025-03-18T20:31:02.423Z","avatar_url":"https://github.com/danini.png","language":"C++","readme":"# Important news\n\n- I am happy to announce that Graph-Cut RANSAC had been included in OpenCV.\nYou can check the documentation at [link](https://docs.opencv.org/4.5.2/d1/df1/md__build_master-contrib_docs-lin64_opencv_doc_tutorials_calib3d_usac.html).\n\n# Graph-Cut RANSAC\n\nThe Graph-Cut RANSAC algorithm proposed in paper: Daniel Barath and Jiri Matas; Graph-Cut RANSAC, Conference on Computer Vision and Pattern Recognition, 2018. \nIt is available at http://openaccess.thecvf.com/content_cvpr_2018/papers/Barath_Graph-Cut_RANSAC_CVPR_2018_paper.pdf\n\nThe journal paper with updated spatial coherence term and additional experiments is available at https://ieeexplore.ieee.org/document/9399280\n\nThe method is explained in the [Latest developments in RANSAC presentation](https://www.youtube.com/watch?v=Nfd9dzeSSG8\u0026feature=youtu.be) from CVPR tutorial [RANSAC in 2020](http://cmp.felk.cvut.cz/cvpr2020-ransac-tutorial/).\n\nExperiments on homography, fundamental matrix, essential matrix, and 6D pose estimation are shown in the corresponding [presentation](https://www.youtube.com/watch?v=igRydL72160\u0026feature=youtu.be) from the tutorial RANSAC in 2020.\n\n# Install from PyPI with pip\nThere are pre-compiled wheels for Windows and Linux for Python 3.8 - 3.11 that you can install with:\n\n```\npip install pygcransac\n```\n\nThanks to [@akaszynski](https://github.com/akaszynski) for his contributions.\n\n# Installation C++\n\nTo build and install C++ only `GraphCutRANSAC`, clone or download this repository and then build the project by CMAKE. \n```shell\n$ git clone https://github.com/danini/graph-cut-ransac\n$ cd build\n$ cmake ..\n$ make\n```\n\n# Install Python package and compile C++\n\n```bash\npython3 ./setup.py install\n```\n\nor\n\n```bash\npip3 install -e .\n```\n\n\n# Example project\n\nTo 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. \nThen \n```shell\n$ cd build\n$ ./SampleProject\n```\n\n# Requirements\n\n- Eigen 3.0 or higher\n- CMake 2.8.12 or higher\n- OpenCV 3.0 or higher\n- A modern compiler with C++17 support\n\n\n# Example of usage in python\n\n```python\nimport pygcransac\nh1, w1 = img1.shape\nh2, w2 = img2.shape\nH, mask = pygcransac.findHomography(src_pts, dst_pts, h1, w1, h2, w2, 3.0)\nF, mask = pygcransac.findFundamentalMatrix(src_pts, dst_pts, h1, w1, h2, w2, 3.0)\n\n```\n\n# Jupyter Notebook example\n\nThe example for homography fitting is available at: [notebook](examples/example_homography.ipynb).\n\nThe example for fundamental matrix fitting is available at: [notebook](examples/example_fundamental_matrix.ipynb).\n\nThe example for essential matrix fitting is available at: [notebook](examples/example_essential_matrix.ipynb).\n\nThe example for essential matrix fitting with planar motion assumption is available at: [notebook](examples/example_planar_essential_matrix.ipynb).\n\nThe example for essential matrix fitting with known gravity is available at: [notebook](examples/example_gravity_essential_matrix.ipynb).\n\nThe example for essential matrix fitting is available at: [notebook](examples/example_essential_matrix.ipynb).\n \nThe example for 6D pose fitting is available at: [notebook](examples/example_absolute_pose.ipynb).\n \nAn example comparing different samplers on fundamental matrix fitting: [notebook](examples/example_samplers.ipynb).\n\n# Jupyter Notebook example (Affine and SIFT correspondence-based solvers)\n\nThe example for homography fitting to SIFT correspondences is available at: [notebook](examples/example_homography_sift_correspondence.ipynb).\n\nThe example for essential matrix fitting to SIFT correspondences is available at: [notebook](examples/example_essential_matrix_sift_correspondence.ipynb).\n\nThe example for fundamental matrix fitting to SIFT correspondences is available at: [notebook](examples/example_fundamental_matrix_sift_correspondence.ipynb).\n\n\nThe example for homography fitting to affine correspondences is available at: [notebook](examples/example_homography_affine_correspondence.ipynb).\n\nThe example for essential matrix fitting to affine correspondences is available at: [notebook](examples/example_essential_matrix_affine_correspondence.ipynb).\n\nThe example for fundamental matrix fitting to affine correspondences is available at: [notebook](examples/example_fundamental_matrix_affine_correspondence.ipynb).\n\n\n\n# Requirements\n\n- Python 3\n- CMake 2.8.12 or higher\n- OpenCV 3.4\n- A modern compiler with C++11 support\n\n# Acknowledgements\n\nWhen using the algorithm, please cite\n\n```\n@inproceedings{GCRansac2018,\n\tauthor = {Barath, Daniel and Matas, Jiri},\n\ttitle = {Graph-cut {RANSAC}},\n\tbooktitle = {Conference on Computer Vision and Pattern Recognition},\n\tyear = {2018},\n}\n\n```\n\nIf you use it together with Progressive NAPSAC sampling or DEGENSAC, please cite \n\n```\n@inproceedings{PNAPSAC2020,\n\tauthor = {Barath, Daniel and Noskova, Jana and Ivashechkin, Maksym and Matas, Jiri},\n\ttitle = {{MAGSAC}++, a Fast, Reliable and Accurate Robust Estimator},\n\tbooktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},\n\tmonth = {June},\n\tyear = {2020}\n}\n\n@inproceedings{Degensac2005,\n\tauthor = {Chum, Ondrej and Werner, Tomas and Matas, Jiri},\n\ttitle = {Two-View Geometry Estimation Unaffected by a Dominant Plane},\n\tbooktitle = {Conference on Computer Vision and Pattern Recognition},\n\tyear = {2005},\n}\n\n```\n\nIf you use with Space Partitioning turned on, please cite\n\n```\n@inproceedings{spaceransac2022,\n\tauthor = {Barath, Daniel and Valasek, Gabor},\n\ttitle = {Space-Partitioning {RANSAC}},\n\tjournal={European Conference on Computer Vision},\n\tyear = {2022}\n}\n\n```\n\nThe Python wrapper part is based on the great [Benjamin Jack `python_cpp_example`](https://github.com/benjaminjack/python_cpp_example).\n","funding_links":[],"categories":["C++"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanini%2Fgraph-cut-ransac","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanini%2Fgraph-cut-ransac","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanini%2Fgraph-cut-ransac/lists"}