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

A struct describing the bounding box with keypoints returned by the keypoint detection model.

Summary

Types

t()

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

A type describing the Bounding Box 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.BBoxWithKeypoints{
  keypoints: %{required(atom()) => %{x: number(), y: number(), score: number()}},
  label: label_t,
  score: number(),
  x1: number(),
  x2: number(),
  y1: number(),
  y2: number()
}

A type describing the Bounding Box object.

Bounding box is a rectangle encompassing the region. When used in object detectors, this box will describe the location of the object in the image. It also includes keypoints. Each keypoint has a predefined atom as its name.

  • 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
  • label - label assigned to this bounding box
  • score - confidence of the predition
  • keypoints - a map where keys are predefined names (represented as atoms) denoting the specific keypoints (body parts). The values associated with each key are another map, which contains the following:
    • :x: The x-coordinate of the keypoint
    • :y: The y-coordinate of the keypoint
    • :score: The confidence score of the predicted keypoint

Keypoint atom names include:

  • :nose
  • :left_eye
  • :right_eye
  • :left_ear
  • :right_ear
  • :left_shoulder
  • :right_shoulder
  • :left_elbow
  • :right_elbow
  • :left_wrist
  • :right_wrist
  • :left_hip
  • :right_hip
  • :left_knee
  • :right_knee
  • :left_ankle
  • :right_ankle

Functions

Link to this function

height(b_box_with_keypoints)

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

Return the height of the bounding box

Link to this function

width(b_box_with_keypoints)

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

Return the width of the bounding box