Skip to content
EvalSuite
Documentation menu

Segmentation

Mean pixel accuracy

Implementedsegmentation.mean_pixel_accuracy

Definition

Per-class pixel recall (correct pixels of the class over its true pixels), averaged over the classes that occur in the truth.

Formula

(1/K) Σ_k TP_k / (TP_k + FN_k)

Range: [0, 1]

Inputs and outputs

  • y_true: ground-truth label mask
  • y_pred: predicted mask with the same shape

Returns: MetricResult

Assumptions

No assumptions beyond valid, aligned inputs of the documented types.

Limitations

No metric-specific limitations are documented yet. Interpret the value alongside the task, data, and other metrics.

Python API

PythonSince v0.3.0
import evalsuite as es

es.mean_pixel_accuracy(mask_true, mask_pred)

References

  1. Long J, Shelhamer E, Darrell T. Fully convolutional networks for semantic segmentation. CVPR 2015:3431-3440.

Implementation status