Main Content

evaluateReidentificationNetwork

Evaluate re-identification network using cumulative matching characteristic (CMC) and mean average precision (mAP) metrics

Since R2024a

    Description

    [metrics,queries,gallerySets] = evaluateReidentificationNetwork(features,labels) evaluates the performance of a re-identification (ReID) network and returns the cumulative matching characteristic (CMC) and mean average precision (mAP) metrics.

    [metrics,queries,gallerySets] = evaluateReidentificationNetwork(___,Name=Value) configures the evaluation metrics using one or more name-value arguments, in addition to the input arguments from the previous syntax. For example, DistanceMetric="euclidean-squared" specifies "euclidean-squared" as the distance metrics method for measuring the distance between feature vectors.

    Input Arguments

    collapse all

    Features extracted by the re-identification network using the extractReidentificationFeatures object function, specified as an M-by-N matrix. N is the number of images in the input datastore ds.

    Labels corresponding to the class name of each features column vector output by the extractReidentificationFeatures object function, specified as a 1-by-N string array. N is the number of images in the input datastore, ds.

    Name-Value Arguments

    Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

    Example: evaluateReidentificationNetwork(features,labels,DistanceMetric="euclidean-squared") specifies "euclidean-squared" as the distance metrics method for measuring the distance between feature vectors.

    Distance metrics method to use in query evaluations to measure the distance between feature vectors, specified as "cosine" or "euclidean-squared". For most cross-entropy training scenarios, use the "euclidean-squared" method.

    Order of the queries, specified as a logical true or false. The function randomizes the order of the queries by default. If you specify RandomizeQueries as false, the function orders the queries in the same order as the columns in features and labels.

    Ranks to store in the reidentificationMetrics object for the CMC metric, specified as a non-repeating and increasing numeric scalar or numeric vector in the range [1, C], or "all". C is the number of unique object classes in labels. If you specify Rank as "all", the reidentificationMetrics stores all valid ranks of the CMC metric.

    Evaluation progress display toggle, specified as a numeric or logical 1 (true) or 0 (false). If you specify Verbose as true, the function displays progress information in the Command Window. The displayed information includes a progress bar, elapsed time, estimated time remaining, and data set metrics.

    Output Arguments

    collapse all

    Re-identification metrics, returned as a reidentificationMetrics object.

    Queries for object retrieval, returned as 1-by-N vector of integers. N is the number of columns in features. Each element in the vector represents the column index of the features used to query a gallery.

    Gallery sets of images for querying, returned as a C-by-N matrix of integers. N is the number of columns in features, and C is the number of unique classes in labels.

    Version History

    Introduced in R2024a