MAGSAC is a C++ library with Python bindings (pymagsac) implementing robust model fitting algorithms for computer vision, including homography, fundamental matrix, essential matrix, rigid transformation, and 2D line estimation. The core algorithm is a template class `MAGSAC<DatumType, ModelEstimator>` that supports sigma-consensus and MAGSAC++ scoring, with interchangeable sampling strategies (uniform, PROSAC, P-NAPSAC, NG-RANSAC, AR-Sampler) and adaptive inlier selection. The Python API mirrors the C++ functionality via pybind11, accepting numpy arrays for point correspondences and returning estimated models with inlier masks. The repository also includes benchmark datasets and Jupyter notebook examples demonstrating usage. While the library is primarily a software package, it contains research-grade data and notebooks, giving it a hybrid character. The code is well-architected with clean separation of concerns, though it has minor maintenance risks such as memory management caveats and limited platform support (Linux/Windows only).
pydegensac is a Python library for robust geometric estimation in computer vision, providing RANSAC-based estimation of fundamental matrices (F) and homographies (H). The core algorithms â DEGENSAC (degeneracy-aware sampling) and PROSAC (progressive sampling) â are implemented in C++ and exposed to Python via pybind11 with Eigen/numpy array interop. The primary deliverable is a pip-installable wheel (pydegensac), built for cp38âcp314 across manylinux2014, manylinux_2_28, macOS, and Windows via GitHub Actions and cibuildwheel. Entry points are the Python API (fundamental matrix and homography estimation) backed by the C++ core exposed through `bindings.cpp`. The codebase is research-grade: the C++ core uses conditional compilation flags (`__HASHING__`, `__D3__`, `__LSQ_BEFORE_LO__`), raw pointers, manual memory management, and commented-out code. Documentation is thin â `bindings.cpp` has placeholder docstrings, and usage examples live in `examples/how-to-use-detailed.ipynb` and benchmark scripts. The repo vendors a full copy of pybind11 (headers, tests, build helpers), which risks drift from upstream. Benchmark infrastructure (`benchmarks/run.py`, `benchmarks/methods.py`) compares against OpenCV RANSAC, MAGAC, Poselib, and Poselib-PROSAC on standard multi-view datasets (IMC/photo-tourism for F, EVD and HPatchesSeq for H), but requires downloading ~1.4 GB of external data from CMP, Hugging Face, and other URLs. Testing relies on golden data (`.npz` files under `tests/data/`) generated by `scripts/make_golden_data.py` from a known-good git HEAD with fixed seeds, plus the bundled pybind11 test suite. There are no unit tests for the C++ core itself. The repo is actively maintained (last commit 2026-09-18, 1 open issue) with wheels published to PyPI, though the publish workflow requires a manual trigger with a build run ID. Known issues include a PROSAC score-orientation bug (benchmark-only, indicating dataset-compatibility risk), platform-specific xfails in the bundled pybind11 tests, and compiler-specific workarounds for GCC/Clang/MSVC. Overall, this is a functional, well-packaged research library with solid CI/CD but notable technical debt: vendored pybind11, placeholder documentation, external data dependencies, and research-code cruft. It is best suited for users needing a fast, reference-quality RANSAC implementation for F/H estimation, or for researchers studying DEGENSAC/PROSAC variants. The hybrid nature is worth noting: while primarily a software library, it includes benchmark/data components (golden data, dataset downloaders, evaluation harnesses) that are integral to its testing story.