View Source ExVision.Types.BBoxWithMask (Ex Vision v0.4.0)

A struct describing the bounding box with mask returned by the instance segmentation model.

Summary

Types

t()

Exactly like t/1, but doesn't put any constraints on the label field

A type describing the Bounding Box with Mask object.

Functions

Return the height of the bounding box

Return the width of the bounding box

Types

@type t() :: t(term())

Exactly like t/1, but doesn't put any constraints on the label field:

@type t(label_t) :: %ExVision.Types.BBoxWithMask{
  label: label_t,
  mask: Nx.Tensor.t(),
  score: number(),
  x1: number(),
  x2: number(),
  y1: number(),
  y2: number()
}

A type describing the Bounding Box with Mask object.

Bounding box is a rectangle encompassing the region. When used in instance segmentation, this box will describe the location of the object in the image. Additionally, a binary mask represents the instance segmentation of the object.

  • x1 - x componenet of the upper left corner
  • y1 - y componenet of the upper left corner
  • x2 - x componenet of the lower right
  • y2 - y componenet of the lower right
  • score - confidence of the predition
  • label - label assigned to this bounding box
  • mask - binary mask

Functions

@spec height(t()) :: number()

Return the height of the bounding box

@spec width(t()) :: number()

Return the width of the bounding box