Get Detection Model Metrics

Returns the metrics for a model that has a modelType of image-detection, such as the mean average precision and average precision per label. The combination of these metrics gives you a picture of model accuracy and how well the model will perform. This call returns the metrics for the last epoch in the training used to create the model. To see the metrics for each epoch, see Get Detection Model Learning Curve.

Object detection models are available in Einstein Vision API version 2.0 and later.

The call that you make to get model metrics is always the same format, but the response varies depending on the type of model for which you retrieve metrics.

Response Body

Name

Type

Description

Available Version

algorithm

string

Algorithm used to create the model. Returned only when the modelType is image-detection. Default is object-detection.

2.0

createdAt

date

Date and time that the model was created.

2.0

id

string

ID of the model. Contains letters and numbers.

2.0

language

string

Model language inherited from the dataset language. Default is N/A.

2.0

metricsData

object

Contains label and model metrics values.

2.0

object

string

Object returned; in this case, metrics.

2.0

metricsData Response Body

Name

Type

Description

Available Version

classMetrics

array

Metrics relevant to each label in the model.

2.0

modelMetrics

object

Metrics relevant to the model.

2.0

labelMetrics Response Body

Name

Type

Description

Available Version

averagePrecision

float

Average precision for the specified label. This value is computed from the validation data. The PASCAL VOC 2012 method is used to compute the average precision, also known as [email protected] When no examples for a label appear in the validation data, this value returns null.

2.0

label

string

Label for which the metrics are returned.

2.0

f1

array

The weighted average of precision and recall for the specified label. This value is computed from the validation data.

2.0

precision

array

Array of precision values used to compute the average precision. The precision array hasn't been preprocessed to be monotonically non-increasing. The precision and recall arrays can be used to draw the precision-recall curve.

2.0

recall

array

Array of recall values used to compute the average precision.

2.0

modelMetrics Response Body

Name

Type

Description

Available Version

meanAveragePrecision

array

Mean of the per-label average precision values. The higher the number, the more accurate the model is on the validation data. See the description of averagePrecision for more information on how the average precision is computed for each label.

2.0

trainingLoss

float

Cumulative loss over the training data. The lower the number, the more accurate the model is on the training data.

2.0

Language