traccuracy.matchers._point

Module Contents

Classes

PointMatcher

A one-to-one matcher that uses Hungarian matching to minimize global

class traccuracy.matchers._point.PointMatcher(threshold: float, scale_factor: tuple[float, Ellipsis] | list[float] | None = None)[source]

A one-to-one matcher that uses Hungarian matching to minimize global distance of node pairs with a maximum distance threshold beyond which nodes will not be matched. Note: this matcher computes the Euclidean distance based on the location on the points. If the data is not isotropic, the scale parameter can be used to rescale the locations in each dimension to reflect “real-world” distances.

Parameters:
  • threshold (float) – The maximum distance to allow node matchings (inclusive), in (potentially rescaled) pixels.

  • scale_factor (tuple[float, ...] | list[float] | None, optional) – If provided, multiply the node locations by the scale factor in each dimension before computing the distance. Useful if the data is not isotropic to ensure that distances are computed in a space that reflects real world distances.

property info: dict[str, Any]

Dictionary of Matcher name and any parameters

compute_mapping(gt_graph: traccuracy._tracking_graph.TrackingGraph, pred_graph: traccuracy._tracking_graph.TrackingGraph) traccuracy.matchers._matched.Matched

Run the matching on a given set of gt and pred TrackingGraph and returns a Matched object with a new copy of each TrackingGraph

Parameters:
Returns:

Matched data object

Return type:

matched (traccuracy.matchers.Matched)

Raises:

ValueError – gt and pred must be a TrackingGraph object