$ account ducha-aiki
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.