Inlier
inlier is a rust library for robust model fitting.
It exposes idiomatic Rust API with
pluggable estimators, samplers, scoring functions, and optimizers.
Features
- Drop-in estimators for homography, fundamental/essential matrices, absolute pose, rigid transform, etc.
- Ready-to-use RANSAC variants (RANSAC, MSAC, MAGSAC, ACRANSAC) with local optimization pipelines (LSQ, IRLS, nested RANSAC, etc.).
- Flexible samplers (uniform, PROSAC, NAPSAC, progressive NAPSAC, adaptive reordering) plus neighborhood graphs (grid, USearch ANN).
Run Examples
# Robust line fitting with plot output
# Homography estimation demo
See examples/README.md for the full catalog.
Usage
use ;
use DMatrix;
Extensibility
Implement the core traits to add custom functionality:
Estimator(models)Sampler/NeighborhoodGraphScoringLocalOptimizerTerminationCriterion
Each trait includes documentation and doctests describing the expected behavior.
Reference
This uses the c++ library superansac as reference implementation, of which the author had done an excellent work on improving the SOTA sample consensus algorithm!