deeplabcut.pose_estimation_pytorch.post_processing.nms
Methods for non-maximum suppression of detected poses.
Functions:
| Name | Description |
|---|---|
nms_oks |
Implementation of NMS using OKS. |
nms_oks
nms_oks(
predictions: ndarray,
oks_threshold: float,
oks_sigmas: float | ndarray = 0.1,
oks_margin: float = 1.0,
score_threshold: float | None = None,
order: ndarray | None = None,
) -> np.ndarray
Implementation of NMS using OKS.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
ndarray
|
The predicted poses, of shape (num_predictions, num_keypoints, 3). |
required |
|
float
|
The threshold for NMS. Keeps predictions for which the OKS score is below this threshold. |
required |
|
float | ndarray
|
The sigmas to use to compute OKS scores. |
0.1
|
|
float
|
The margin to add around keypoints when computing area. |
1.0
|
|
float | None
|
If not None, computes NMS using only keypoints for which the score is above this threshold. |
None
|
|
ndarray | None
|
If predictions should be sorted by another means than score, the order to use in NMS. |
None
|
Returns:
| Type | Description |
|---|---|
ndarray
|
An array of length num_predictions indicating which keypoints should be kept. |