# classification

Python API: `depthai_nodes.node.parsers.utils.classification`

## 函数

### compute_classification_scores

```python
def compute_classification_scores(scores: np.ndarray, *, is_softmax: bool = True) -> np.ndarray:
```

展平类别分数并可选地应用 softmax。

参数

 * `scores` (`np.ndarray`): 模型分数张量。
 * `is_softmax` (`bool`): 分数是否已包含概率。如果为 false，则应用 softmax。

返回

 * `np.ndarray`: 一维数组，每个类别一个分数。
