Add Hungarian and Sinkhorn point cloud matching methods#61
Open
Marei33 wants to merge 3 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Extends point cloud matching beyond the ILP solver by adding two alternative
matching algorithms, selectable via config. Also generalizes the
ILPconfigblock into a method-agnostic
matchingblock and cleans up the Snakemake rules.Changes
New matching methods (
matchmaker/utils/matching.py)hungarian_matching— optimal one-to-one matching viascipy.optimize.linear_sum_assignmenton the dense euclidean distance matrix.Pairs beyond
max_distare dropped, yielding a partial matching like the ILP matcher.sinkhorn_matching— soft assignment viapygmtools.linear_solvers.sinkhornon a distance-derived similarity matrix, discretized to a one-to-one matching with
the Hungarian algorithm. Configurable via
tau(entropy regularization) andmax_iter.utils/ilp_matching.py→utils/matching.py(ILP matching retained unchanged).CLI & pipeline (
match_pointclouds.py,registration.smk)match_points/maingain--method {ilp,hungarian,sinkhorn},--tau,and
--sinkhorn_max_iteroptions (defaults preserve current ILP behaviour).ilp_matching→matching; it now passes the methodand Sinkhorn parameters through to the CLI.
configfile:line fromregistration.smk(config is nowsupplied on the command line).
conda: "matchmaker_env"directive from all rules.Config
ILP:config block with amatching:block that adds amethodkey (
ilp | hungarian | sinkhorn) across the example configs.Dependencies
pygmtoolstoenvironment.yml(required for Sinkhorn matching).