# classification

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

## Functions

| Name | Description |
| --- | --- |
| [`compute_classification_scores`](https://docs.luxonis.com/software-v3/ai-inference/inference/depthai-nodes/depthai-nodes-api-reference/node/parsers/utils/classification.md#classification-Functions-compute_classification_scores) | Flatten class scores and optionally apply softmax. |

### function `compute_classification_scores`

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

Flatten class scores and optionally apply softmax.

Args

| Name | Type | Description | Default |
| --- | --- | --- | --- |
| `scores` | `np.ndarray` | Model score tensor. | required |
| `is_softmax` | `bool` | Whether scores already contain probabilities. If false, apply softmax. | `True` |

Returns

| Type | Description |
| --- | --- |
| `np.ndarray` | One-dimensional array with one score per class. |
