Dark
- class plugins.extract.align.dark_decoder.Dark(num_points: int, size: int, blur_kernel: int = 11)
Bases:
objectDark heatmap decoding
https://github.com/ilovepose/DarkPose
- Parameters:
num_points (int) – The number of landmarks output from the model
size (int) – The size of the heatmap
blur_kernel (int)
Methods Summary
__call__(heatmap)Call self as a function.
gaussian_blur(heatmap)Perform gaussian blurring on the heatmaps
get_max_preds(batch_heatmaps)get predictions from score maps
taylor(heatmap, coords)Sub-pixel refine the predictions
Methods Documentation
- __call__(heatmap: ndarray)
Call self as a function.
- Parameters:
heatmap (ndarray)
- gaussian_blur(heatmap: ndarray) ndarray
Perform gaussian blurring on the heatmaps
- Parameters:
heatmap (ndarray) – Batch of heatmaps to blur (N, points, size, size)
- Return type:
The blurred heatmaps
- get_max_preds(batch_heatmaps: ndarray) ndarray
get predictions from score maps
- Parameters:
heatmaps – Heatmap to derive points from ([batch_size, num_joints, height, width])
batch_heatmaps (ndarray)
- Returns:
The derived points from the heatmaps (B, N, 2)
- Return type:
coords
- taylor(heatmap: ndarray, coords: ndarray) ndarray
Sub-pixel refine the predictions
- Parameters:
heatmap (ndarray) – The processed heatmaps for refinement
coords (ndarray) – The coordinates to be refined
- Return type:
The refined coordinates
- __call__(heatmap: ndarray)
Call self as a function.
- Parameters:
heatmap (ndarray)
- gaussian_blur(heatmap: ndarray) ndarray
Perform gaussian blurring on the heatmaps
- Parameters:
heatmap (ndarray) – Batch of heatmaps to blur (N, points, size, size)
- Return type:
The blurred heatmaps
- get_max_preds(batch_heatmaps: ndarray) ndarray
get predictions from score maps
- Parameters:
heatmaps – Heatmap to derive points from ([batch_size, num_joints, height, width])
batch_heatmaps (ndarray)
- Returns:
The derived points from the heatmaps (B, N, 2)
- Return type:
coords
- taylor(heatmap: ndarray, coords: ndarray) ndarray
Sub-pixel refine the predictions
- Parameters:
heatmap (ndarray) – The processed heatmaps for refinement
coords (ndarray) – The coordinates to be refined
- Return type:
The refined coordinates