For the complete documentation index, see llms.txt. This page is also available as Markdown.

Performance by Class

Returns per-class headline metrics for one split. The response shape depends on the evaluation's task type:

  • Object detection / instance segmentation - per-class map50, map50_95, map75, precision, recall, F1, and optimal threshold.

  • Semantic segmentation - per-class iou, precision, recall, F1, and optimal threshold (pixel-level).

The taskType field in the response indicates which shape to expect.

This is the data the performance by class panel in the app reads.

https://api.roboflow.com/:workspace/model-evals/:evalId/performance-by-class
curl "https://api.roboflow.com/my-workspace/model-evals/$EVAL_ID/performance-by-class?api_key=$ROBOFLOW_API_KEY&split=test"

Query parameters

Parameter
Type
Description

split

enum

One of train, valid, test. Default test. all is not valid here - per-class metrics are not aggregable across splits.

Response (object detection / instance segmentation)

{
    "taskType": "object-detection-like",
    "split": "test",
    "classes": [
        {
            "className": "Car-rims",
            "map50": 0.9239650566041828,
            "map50_95": 0.7555258345429926,
            "map75": 0.9239650566041828,
            "precision": 0.85,
            "recall": 0.85,
            "f1": 0.85,
            "optimalThreshold": 0.37
        },
        {
            "className": "music-note",
            "map50": null,
            "map50_95": null,
            "map75": null,
            "precision": 0,
            "recall": 0,
            "f1": 0,
            "optimalThreshold": 0.5
        }
    ]
}

Response (semantic segmentation)

Notes

  • taskType discriminates the per-class field set. Detection classes include map50/map50_95/map75; semantic segmentation classes include iou and classID instead.

  • optimalThreshold is the per-class F1-optimal confidence threshold from the confidence sweep.

  • precision, recall, and f1 are reported at that per-class optimal threshold.

  • For detection, mAP fields are null when the split has no instances of that class.

  • For semantic segmentation, all metrics are pixel-level. An optimalThreshold of 0.0 is valid.

Last updated

Was this helpful?