tfma.metrics.SemanticSegmentationTruePositive

Calculates the true postive for semantic segmentation.

Inherits From: Metric

class_ids the class ids for calculating metrics.
ground_truth_key the key for storing the ground truth of encoded image with class ids.
prediction_key the key for storing the predictions of encoded image with class ids.
decode_ground_truth If true, the ground truth is assumed to be bytes of images and will be decoded. By default it is true assuming the label is the bytes of image.
decode_prediction If true, the prediction is assumed to be bytes of images and will be decoded. By default it is false assuming the model outputs numpy arrays or tensors.
ignore_ground_truth_id (Optional) The id of ground truth to be ignored.
name (Optional) string name of the metric instance.

compute_confidence_interval Whether to compute confidence intervals for this metric.

Note that this may not completely remove the computational overhead involved in computing a given metric. This is only respected by the jackknife confidence interval method.

Methods

computations

View source

Creates computations associated with metric.

from_config

View source

get_config

View source

Returns serializable config.