Skip to content

Add Hungarian and Sinkhorn point cloud matching methods#61

Open
Marei33 wants to merge 3 commits into
devfrom
matching-algos
Open

Add Hungarian and Sinkhorn point cloud matching methods#61
Marei33 wants to merge 3 commits into
devfrom
matching-algos

Conversation

@Marei33

@Marei33 Marei33 commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

Extends point cloud matching beyond the ILP solver by adding two alternative
matching algorithms, selectable via config. Also generalizes the ILP config
block into a method-agnostic matching block and cleans up the Snakemake rules.

Changes

New matching methods (matchmaker/utils/matching.py)

  • hungarian_matching — optimal one-to-one matching via
    scipy.optimize.linear_sum_assignment on the dense euclidean distance matrix.
    Pairs beyond max_dist are dropped, yielding a partial matching like the ILP matcher.
  • sinkhorn_matching — soft assignment via pygmtools.linear_solvers.sinkhorn
    on a distance-derived similarity matrix, discretized to a one-to-one matching with
    the Hungarian algorithm. Configurable via tau (entropy regularization) and max_iter.
  • Renamed utils/ilp_matching.pyutils/matching.py (ILP matching retained unchanged).

CLI & pipeline (match_pointclouds.py, registration.smk)

  • match_points / main gain --method {ilp,hungarian,sinkhorn}, --tau,
    and --sinkhorn_max_iter options (defaults preserve current ILP behaviour).
  • Renamed Snakemake rule ilp_matchingmatching; it now passes the method
    and Sinkhorn parameters through to the CLI.
  • Removed the hard-coded configfile: line from registration.smk (config is now
    supplied on the command line).
  • Dropped the conda: "matchmaker_env" directive from all rules.

Config

  • Replaced the ILP: config block with a matching: block that adds a method
    key (ilp | hungarian | sinkhorn) across the example configs.

Dependencies

  • Added pygmtools to environment.yml (required for Sinkhorn matching).

@Marei33 Marei33 linked an issue Jul 6, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Matching does not complete on brain data

1 participant