dabble.keypoints_to_3d_loc

Description

Estimates the 3D coordinates of a person given 2D pose coordinates.

class Node(config=None, **kwargs)[source]

Uses pose keypoint information of the torso to estimate 3D location.

Inputs

keypoints (numpy.ndarray): A NumPy array of shape \((N, K, 2)\) containing the \((x, y)\) coordinates of detected poses where \(N\) is the number of detected poses, and \(K\) is the number of individual keypoints. Keypoints with low confidence scores (below threshold) will be replaced by -1.

Outputs

obj_3D_locs (List[numpy.ndarray]): A list of \(N\) NumPy arrays representing the 3D coordinates \((x, y, z)\) of an object associated with a detected bounding box.

Configs
  • focal_length (float) – default = 1.14.
    Approximate focal length of webcam used, in metres. Example on measuring focal length can be found here.

  • torso_factor (float) – default = 0.9.
    A factor used to estimate real-world distance from pixels, based on average human torso length in metres. The value varies across different camera set-ups, and calibration may be required.