Skip to content

outputs

ModelForImageSegmentationOutput

Bases: TypedDict

The output for image segmentation models.

Source code in glasses/models/vision/image/segmentation/outputs.py
class ModelForImageSegmentationOutput(TypedDict):
    """The output for image segmentation models."""

    pixel_logits: Tensor
    """A `torch.Tensor` of shape `(batch_size, num_classes, height, width)`.

    !!! note
        The `height` and `width` are usually smaller than the original image.
    """

pixel_logits: Tensor class-attribute

A torch.Tensor of shape (batch_size, num_classes, height, width).

Note

The height and width are usually smaller than the original image.