ComfyUI Node
CV Class Scores Decode
Unwraps a classification model's score vector ((1, C) or (C,) from 'CV DNN Pick Output') into the top-k class labels, scores and ids. Class names come from the same labels text as the detectors ('CV Load Labels', line N = class id N). DATA only - feed 'Preview as Text' to see the ranking.
CV Class Scores Decode
- scores
- labels_out
- scores_top
- class_ids
- top_label
◄top_k5►
◄activationauto►
◄labels►
Categoryimage/CV/dnn
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| scores | NPARRAY | (1, C) or (C,) per-class scores/logits from the model (pick it out of 'DNN Forward All' with 'DNN Pick Output'). | |
| top_k | INT | 51–1000 | How many of the highest-scoring classes to emit. |
| activationopt | COMBO | auto | 'auto' applies softmax only when the values lie outside [0, 1] (i.e. raw logits). 'softmax'/'sigmoid' always apply, 'none' never (model already outputs probabilities). |
| labelsopt | STRING | Class names, one per line (line N = class id N), e.g. from 'CV Load Labels'. Blank = classes are labelled by their numeric id. |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| labels_out | NPARRAY | (K,) string array of the top-k class labels, best first. Feed 'Preview as Text'. |
| scores_top | NPARRAY | (K,) float32 scores of the top-k classes (after the chosen activation), best first. |
| class_ids | NPARRAY | (K,) int32 class ids of the top-k classes. |
| top_label | STRING | The single best class label (top-1). |