concepts.vision.fm_match.diff3f.diff3f_utils.hungarian_correspondence#

hungarian_correspondence(similarity_matrix)[source]#

Compute the hungarian correspondence based on a similarity matrix.

Parameters:

similarity_matrix (Tensor) – A tensor of shape (N, M) containing the cosine similarity between each pair of vectors.

Returns:

A tensor of shape (N, M) containing the hungarian correspondence between each pair of vectors.

Return type:

Tensor