此页面由 AI 自动翻译。查看英文原版
最后更新

本页目录

  • 函数
  • compute_superanimal_keypoints
  • get_pose_prediction
  • get_top_values
Claude CodeCodexCursor
Luxonis 智能体工具包为你常用的编程智能体加载 Luxonis 上下文与技能,更快地基于 OAK 开发应用。
安装工具包

superanimal

最后更新
Python API: depthai_nodes.node.parsers.utils.superanimal

函数

compute_superanimal_keypoints

Python
1def compute_superanimal_keypoints(heatmaps: np.ndarray, *, scale_factor: float) -> tuple[np.ndarray, np.ndarray]:
将 SuperAnimal 热图解码为归一化地标。参数
  • heatmaps (np.ndarray): 模型热图张量。
  • scale_factor (float): 用于将模型坐标转换为归一化坐标的非零除数。
返回
  • tuple[np.ndarray, np.ndarray]: 一对 (N, 2) 关键点坐标和 (N,) 分数。坐标除以 scale_factor。

get_pose_prediction

Python
1def get_pose_prediction(heatmap, locref, scale_factors):
从热图和 locref 张量获取姿态预测。用于 SuperAnimal 模型。参数
  • heatmap (np.ndarray): 热图张量。
  • locref (np.ndarray): Locref 张量。
  • scale_factors (tuple[float, float]): x 轴和 y 轴的比例因子。
返回
  • np.ndarray: 姿态预测。

get_top_values

Python
1def get_top_values(heatmap):
从热图张量中获取顶部值。参数
  • heatmap (np.ndarray): 热图张量。
返回
  • tuple[np.ndarray, np.ndarray]: 顶部值的 Y 和 X 坐标。