Skip to content

outputs

ModelForImageDetectionOutput

Bases: TypedDict

The output for image detection models.

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

    logits: Tensor
    """A `torch.Tensor` of shape `(batch_size, num_bboxes, num_classes + 1)`."""
    bboxes: Tensor
    """A `torch.Tensor` of shape `(batch_size, num_bboxes, 4)`."""

bboxes: Tensor class-attribute

A torch.Tensor of shape (batch_size, num_bboxes, 4).

logits: Tensor class-attribute

A torch.Tensor of shape (batch_size, num_bboxes, num_classes + 1).