Segmentation
Pixel accuracy
Implemented
segmentation.pixel_accuracyDefinition
Fraction of correctly labelled pixels.
Formula
PA = Σₖ nₖₖ / Σₖ tₖ
Range: [0, 1]
Inputs and outputs
- y_true: ground-truth mask (H×W or N×H×W)
- y_pred: predicted mask with the same shape
Returns: float
Assumptions
No assumptions beyond valid, aligned inputs of the documented types.
Limitations
- Dominated by large classes such as background.
Python API
import evalsuite as es
es.pixel_accuracy(y_true, y_pred, ignore_index=255)
es.mean_pixel_accuracy(y_true, y_pred)References
- Long, J., Shelhamer, E., & Darrell, T. (2015). Fully convolutional networks for semantic segmentation. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 3431–3440.