model.movenet
Description
🕺 Fast Pose Estimation model.
- class Node(config=None, **kwargs)[source]
MoveNet node that initializes a MoveNet model to detect human poses from an image.
The MoveNet node is capable of detecting up to 6 human figures for multipose lightning and single person for singlepose lightning/thunder. If there are more than 6 persons in the image, multipose lightning will only detect 6. This also applies to singlepose models, where only 1 person will be detected in a multi persons image, do take note that detection performance will suffer when using singlepose models on multi persons images. 17 keypoints are estimated and the keypoint indices table can be found here.
- Inputs
img
(numpy.ndarray
): A NumPy array of shape \((height, width, channels)\) containing the image data in BGR format.- Outputs
bboxes
(numpy.ndarray
): A NumPy array of shape \((N, 4)\) containing normalized bounding box coordinates of \(N\) detected objects. Each bounding box is represented as \((x_1, y_1, x_2, y_2)\) where \((x_1, y_1)\) is the top-left corner and \((x_2, y_2)\) is the bottom-right corner. The order corresponds to bbox_labels and bbox_scores.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
.keypoint_scores
(numpy.ndarray
): A NumPy array of shape \((N, K)\) containing the confidence scores of detected poses where \(N\) is the number of detected poses and \(K\) is the number of individual keypoints. The confidence score has a range of \([0, 1]\).keypoint_conns
(numpy.ndarray
): A NumPy array of shape \((N, D_n', 2, 2)\) containing the \((x, y)\) coordinates of adjacent keypoint pairs where \(N\) is the number of detected poses, and \(D_n'\) is the number of valid keypoint pairs for the the \(n\)-th pose where both keypoints are detected.bbox_labels
(numpy.ndarray
): A NumPy array of shape \((N)\) containing strings representing the labels of detected objects. The order corresponds to bboxes and bbox_scores.- Configs
model_format (
str
) – {“tensorflow”, “tensorrt”}, default=”tensorflow”
Defines the weights format of the model.model_type (
str
) – {” singlepose_lightning”, “singlepose_thunder”, “multipose_lightning” }, default=”multipose_lightning”
Defines the detection model for MoveNet either single or multi pose. Lightning is smaller and faster but less accurate than Thunder version.weights_parent_dir (
Optional[str]
) – default = null.
Change the parent directory where weights will be stored by replacingnull
with an absolute path to the desired directory.bbox_score_threshold (
float
) – [0,1], default = 0.2
Detected bounding box confidence score threshold, only boxes above threshold will be kept in the output.keypoint_score_threshold (
float
) – [0,1], default = 0.3
Detected keypoints confidence score threshold, only keypoints above threshold will be kept in output.