Score for Semantic Segmentation Models to use tf-keras-vis

class image_segmentation.class_activation_maps.score.SegScore(target_mask: tensorflow.Tensor, target_class: int = 0, logits: bool = False)[source]

Score for semantic segmentation models to use tf-keras-vis.

target_mask

Masks of the interest regions

Type:

tf.Tensor

target_class

Label or channel of the interest class.

Type:

int

__call__(pred: tensorflow.Tensor) tensorflow.Tensor[source]

Calculate scores

Parameters:

pred – Predictions (masks) of a tf.keras.Model

Returns:

Score per instances

Return type:

tuple

__init__(target_mask: tensorflow.Tensor, target_class: int = 0, logits: bool = False) None[source]
Parameters:
  • target_mask – Masks of the interest regions

  • target_class – Label or channel of the interest class.

  • logits – If the values are from logit