Filter predictions
Overview
Selects a subset of a dataset from the confidence carried by its prediction annotations, and adds the selected assets to a destination dataset or to the node’s own output dataset.
Task decides how assets are scored and picked. Classification reads the image-level tag as the predicted class and the confidence tag beside it as the confidence (older predictions carry it as the class tag’s own value), keeps what falls inside the confidence band, and spreads a fixed budget across the predicted classes. Object detection aggregates the box confidences of each asset into one score, drops everything under the floor, and keeps the highest-scoring assets. Without a destination, rerunning the node writes a new version of the dataset it created the first time, instead of creating another one.
How it works
Takes the destination dataset, or the node’s own output dataset — created on the first run, a new empty version of it on a rerun.
Scores every asset the way Task demands: one image-level confidence for classification, or the box confidences aggregated by max, mean or min for object detection.
FAQ
Why doesn't a second run create another output dataset?
The node remembers the dataset it produced, named Confidence Sample for classification or Top-K Filtered for object detection, and writes a new version of it on every rerun. A flow that reruns does not leave a trail of near-identical datasets behind, and earlier results stay in that dataset’s version history. A destination you select is never versioned: each run adds its selection to it.
What happens when fewer assets match than Count asks for?
Classification fills each class up to its quota, then tops the remaining budget up from the assets left over in other classes. When the band matches fewer assets than Count in total, everything that matched is kept.
Is the random selection reproducible?
Yes. Random ordering inside a class uses a fixed seed, so the same dataset and the same settings select the same assets.
How is an asset scored when its annotation cannot be read?
Object detection scores it zero, which puts it under any Min score above zero. Classification skips it, because no predicted class can be read from it. The same holds for an asset with no annotation at all.
What does this node not support?
Task offers only classification and object detection. Classification reads one predicted class per image, so multi-label predictions are not supported. With Min score set to 0, object detection also selects assets that carry no box confidences, because they score zero.
Inputs
Dataset containing assets with prediction annotations. Key: SRC_DATASET.
Where the selected assets go. Leave empty to reuse the dataset an earlier run of this node created, or to start a new one. Key: DST_DATASET.
Kind of prediction the source annotations carry, which decides how assets are scored and picked. Key: TASK_TYPE.
Options:
- Classification (
classification) - Object detection (
object_detection)
Lowest confidence a prediction may have and still be kept. Minimum: 0.0. Maximum: 1.0. Step: 0.05. Visible when TASK_TYPE is classification. Key: CONF_MIN.
Highest confidence a prediction may have and still be kept. Set it to 1.0 to take everything above Conf min. Minimum: 0.0. Maximum: 1.0. Step: 0.05. Visible when TASK_TYPE is classification. Key: CONF_MAX.
How many assets to keep at most. Minimum: 1. Step: 1. Visible when TASK_TYPE is classification. Key: COUNT.
Which assets to take when more of them fall inside the band than Count allows. Visible when TASK_TYPE is classification. Key: WITHIN_RANGE.
Options:
- Random (
random) - Highest confidence (
highest) - Lowest confidence (
lowest)
How to split the Count budget across predicted classes. Visible when TASK_TYPE is classification. Key: BALANCE_MODE.
Options:
- Equal per class (
equal) - Proportional to candidates (
proportional) - None (global) (
none)
How the confidences of an asset’s predicted boxes are reduced to the one score it is ranked by. Visible when TASK_TYPE is object_detection. Key: SCORE_AGGREGATION.
Options:
- Max (highest box confidence) (
max) - Mean (average of all boxes) (
mean) - Min (all boxes must be confident) (
min)
Assets scoring below this are dropped even when Top K still has room. Minimum: 0.0. Maximum: 1.0. Step: 0.05. Visible when TASK_TYPE is object_detection. Key: MIN_SCORE.
Maximum number of assets to keep (highest-scoring first). Minimum: 1. Step: 1. Visible when TASK_TYPE is object_detection. Key: TOP_K.
Outputs
Dataset containing the selected assets. Shown as an artifact. Key: FILTERED_DATASET.
Number of assets the last run selected. Shown on the node as a badge. Selecting the badge opens FILTERED_DATASET. Key: FILTERED_COUNT.
JSON config
Machine-readable node interface for automation and advanced usage.