Main Content

mAPObjectDetectionMetric

Mean average precision (mAP) metric for object detection

Since R2024a

    Description

    Use an mAPObjectDetectionMetric object to track the mean average precision (mAP) metric when you train an object detector.

    You can specify metrics options for training by using these arguments of the trainingOptions (Deep Learning Toolbox) function:

    • Metrics — Specify which metrics to use during training.

    • Plots — To plot metrics during training, specify as "training-progress".

    • ValidationData — Specify this argument to additionally plot and record the metric values for the validation data.

    • Verbose — To output the metric values to the Command Window, specify as true.

    Creation

    Description

    metric = mAPObjectDetectionMetric creates a default mean average precision (mAP) metric to use when training an object detector.

    When specified to the Metrics (Deep Learning Toolbox) argument of the trainingOptions (Deep Learning Toolbox) function, the default mAPObjectDetectionMetric object is equivalent to specifying Metrics as "mAP50".

    metric = mAPObjectDetectionMetric(Name=Value) specifies the Name and OverlapThreshold properties, used for metric calculation, using name-value arguments.

    For example, Name="mAP50" sets the mean average precision as the metric to calculate.

    Properties

    expand all

    Metric name, specified as a string scalar or character vector. The metric name appears in the training plot and the verbose output.

    Data Types: char | string

    Overlap threshold, specified as a numeric scalar in the range [0, 1], which mAPObjectDetectionMetric uses to compute the mAP metric. When the intersection over union (IoU) of the pixels in the ground truth bounding box and the predicted bounding box is equal to or greater than the overlap threshold, the trainingOptions function considers the detection to be a match to the ground truth. The IoU is the number of pixels in the intersection of the bounding boxes divided by the number of pixels in the union of the bounding boxes.

    Version History

    Introduced in R2024a

    See Also

    (Deep Learning Toolbox) | (Deep Learning Toolbox) | | | (Deep Learning Toolbox) | (Deep Learning Toolbox)