pyFM.eval.evaluate

Functions

accuracy(p2p, gt_p2p, D1_geod[, return_all, ...])

Computes the geodesic accuracy of a vertex to vertex map.

continuity(p2p, D1_geod, D2_geod, edges)

Computes continuity of a vertex to vertex map.

coverage(p2p, A)

Computes coverage of a vertex to vertex map.

pyFM.eval.evaluate.accuracy(p2p, gt_p2p, D1_geod, return_all=False, sqrt_area=None)

Computes the geodesic accuracy of a vertex to vertex map. The map goes from the target shape to the source shape.

Parameters:
  • p2p

    (n2,) - vertex to vertex map giving the index of the matched vertex on the source shape

    for each vertex on the target shape (from a functional map point of view)

  • gt_p2p – (n2,) - ground truth mapping between the pairs

  • D1_geod – (n1,n1) - geodesic distance between pairs of vertices on the source mesh

  • return_all (bool) – whether to return all the distances or only the average geodesic distance

Returns:

  • acc (float) – average accuracy of the vertex to vertex map

  • dists (np.ndarray) – (n2,) - if return_all is True, returns all the pairwise distances

pyFM.eval.evaluate.continuity(p2p, D1_geod, D2_geod, edges)

Computes continuity of a vertex to vertex map. The map goes from the target shape to the source shape.

Parameters:
  • p2p

    (n2,) - vertex to vertex map giving the index of the matched vertex on the source shape

    for each vertex on the target shape (from a functional map point of view)

  • gt_p2p – (n2,) - ground truth mapping between the pairs

  • D1_geod – (n1,n1) - geodesic distance between pairs of vertices on the source mesh

  • D2_geod – (n1,n1) - geodesic distance between pairs of vertices on the target mesh

  • edges – (n2,2) edges on the target shape

Returns:

continuity – average continuity of the vertex to vertex map

Return type:

float

pyFM.eval.evaluate.coverage(p2p, A)

Computes coverage of a vertex to vertex map. The map goes from the target shape to the source shape.

Parameters:
  • p2p

    (n2,) - vertex to vertex map giving the index of the matched vertex on the source shape

    for each vertex on the target shape (from a functional map point of view)

  • A – (n1,n1) or (n1,) - area matrix on the source shape or array of per-vertex areas.

Returns:

coverage – coverage of the vertex to vertex map

Return type:

float