Evaluate classifier
Overview
Scores a classifier against ground truth and writes a report with the metrics behind the score.
Pair a labeled dataset with the predictions of a classifier on the same images or video clips, and the run reports how often it was right, where it confuses classes, and how it does per class. The badge shows the weighted F1.
Prerequisites
How it works
Pairs each image’s or video’s ground-truth class with the class the model predicted for it. The ground truth is the name of its annotation tag, or the value of the tag named in GT class tag.
FAQ
Why weighted F1 on the badge rather than accuracy?
Accuracy hides class imbalance: a model that always answers with the majority class can look excellent. Weighted F1 accounts for how each class actually performs, so it degrades when a rare class is being missed.
What does splitting by tags give me?
A separate section of the report per tag value, which is how you find out that the model is fine overall but poor at night, or on one camera. Leave the tags empty for a single result over the whole dataset.
Can it evaluate video clips?
Yes. The node reads images and videos alike, taking a video’s class from the tags of its whole-video annotation. Clips often keep their true class as the value of one tag, such as ground_truth with values Dumping and Removal: put that tag name in GT class tag. Clips without the tag are left out, or take the class you set in GT class without tag, for example negative.
What should I read first in the report?
The per-class numbers and the confusion matrix. An overall score tells you whether the model is good, those tell you what to fix.
What happens when the two datasets do not line up?
Only assets present in both are scored. An image that exists in one dataset and not the other contributes nothing, so a partial prediction run quietly shrinks the evaluation set rather than failing.
Inputs
Dataset with the ground truth class of each image or video, as the name or the value of a whole-asset annotation tag. Key: GT_DATASET.
Annotation tag whose value is the ground truth class, for example: ground_truth. Only tags over the whole image or video count. Leave empty to take the class from the name of the ground truth annotation tag. Key: GT_CLASS_TAG.
Class of a ground truth asset that has no GT class tag, for example: negative. Leave empty to leave such assets out. Used only when GT class tag is set. Key: GT_NO_TAG_CLASS.
Dataset with prediction annotations (e.g. output of a classifier predict node). Key: PRED_DATASET.
Ground truth asset tags to break the report down by, for example weather or camera. Each selected tag value gets its own view of the report, and an empty selection reports on the whole dataset. Values come from GT_DATASET. Key: TAGS.
Outputs
Machine-readable classification evaluation report for preview and compatible comparison nodes. Shown as an artifact. Key: REPORT_ID.
The evaluation row this run recorded on the model version. Empty when the registry could not be reached. Key: EVALUATION_ID.
Weighted F1 score shown as a badge on the node. Shown on the node as a badge. Key: WEIGHTED_F1.
Models and configuration
There is no model to select. The node compares two datasets, so what you configure is the scope of the comparison.
GT class tag names the annotation tag whose value is the true class, such as ground_truth. Leave it empty to take the class from the name of the ground-truth annotation tag. GT class without tag gives a class to the assets that have no such tag.
Split by Tags picks ground-truth asset tags to break the report down by. Each selected tag value gets its own section, computed on that slice only.
Report
The report opens in the preview widget.
It carries the overall metrics, a per-class breakdown showing precision, recall, and F1 for each class, and a confusion matrix naming which classes the model mixes up. When tags are selected, the same set repeats for every tag value, so slices can be compared against the whole.
Runtime
Runs on an ordinary worker. Cost scales with the number of annotations compared, not with image size, because no model is executed.
JSON config
Machine-readable node interface for automation and advanced usage.