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

本页目录

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

classification

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

函数

compute_classification_scores

Python
1def compute_classification_scores(scores: np.ndarray, *, is_softmax: bool = True) -> np.ndarray:
展平类别分数并可选地应用 softmax。参数
  • scores (np.ndarray): 模型分数张量。
  • is_softmax (bool): 分数是否已包含概率。如果为 false,则应用 softmax。
返回
  • np.ndarray: 一维数组,每个类别一个分数。