superanimal
最后更新
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]: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):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 坐标。