Similar pairs
Overview
Finds every pair of similar images inside one dataset, or between a dataset and a reference dataset, and grades each pair as an exact duplicate, near-identical, or strongly similar by three cosine-similarity thresholds.
Search one dataset to find copies worth removing, or compare it with a reference, such as a test set against the training set, to find split leakage. The candidates land in a review dataset: in single-dataset mode every duplicate except one kept image per group, in reference mode the dataset images with an exact or near-identical match in the reference. Strongly similar pairs are reported but never become candidates. The badge counts the pairs and opens the review dataset. The source datasets stay unchanged.
The report can be passed to Dataset insights through its Findings from other nodes input.
Prerequisites
How it works
Compares every image with every other one, or with every reference image, and keeps each pair at or above the strong similarity threshold, graded by level.
FAQ
What does the report row limit change?
Only the all-pairs gallery. Counts, duplicate groups, findings, and the review dataset always use the complete pair set.
Why does the run stop with incomplete image embeddings?
At least one image of the dataset or the reference has no embedding for the selected model. Run AI index embeddings on each dataset with that model, then retry.
Which threshold values are accepted?
The three thresholds must satisfy strong similarity at most near-identical at most exact duplicate, all between 0 and 1. Any other combination stops the run.
What happens to the review dataset on a rerun?
The first run creates it, and every rerun adds a new version to it, so earlier results stay in its history.
What if the reference dataset is the same as the dataset?
It is treated as a single-dataset search.
Inputs
Dataset searched for similar images. Its images must already be indexed by an AI Index Embeddings node. Key: DATASET.
Second dataset every image is compared against, for example a test set checked against the training set. Leave empty to compare the dataset with itself. Key: REFERENCE_DATASET.
Model both datasets were indexed with. Choosing one they were not indexed with stops the run. Key: EMBEDDING_MODEL.
Options:
- CLIP (
clip) - PE-Core (
pecore) - SigLIP 2 (
siglip2) - DINOv3 (
dinov3)
Similarity at or above which a pair is treated as an exact duplicate: a byte-identical or near-identical copy of the same frame. Minimum: 0. Maximum: 1. Step: 0.01. Key: EXACT_THRESHOLD.
Similarity at or above which a pair is treated as near-identical: a resize, crop, or compression variant of the same image. Minimum: 0. Maximum: 1. Step: 0.01. Key: NEAR_THRESHOLD.
Similarity a pair must reach to be reported at all: the same scene or a semantically similar image, but not the same shot. Minimum: 0. Maximum: 1. Step: 0.01. Key: SIMILAR_THRESHOLD.
Maximum number of pairs listed in the report. Counts, duplicate groups, findings, and the output dataset stay complete. Minimum: 1. Step: 1. Key: REPORT_ROW_LIMIT.
Outputs
Pair table, duplicate groups or split leakage, and findings. Shown as an artifact. Key: REPORT_ID.
Human-readable count of all unique pairs meeting the lowest threshold. Shown on the node as a badge. Selecting the badge opens DUPLICATE_ASSETS. Key: TOTAL_PAIR_COUNT.
Short-lived dataset containing removal or leakage-review candidates from Dataset. Shown as an artifact. Key: DUPLICATE_ASSETS.
Report
The report leads with a verdict, shows where the pairs sit against the thresholds, and lists duplicate groups, leaked images, and pairs as image galleries.
What does the report contain?
The overview states how many dataset images have an exact or near-identical copy and, in single-dataset mode, how many images keeping one per group would remove. Metric cards carry the images with a duplicate, removable copies, and duplicate groups in single-dataset mode, or the dataset, reference, and leaked image counts in reference mode, plus the pair count broken down by level. A collapsed block records the mode, model, the three thresholds, and whether the pair gallery was truncated. A similarity histogram bins every qualifying pair and colours each bar by its level, so a threshold that cuts through one population is visible. Selecting a bar opens the pairs in it side by side. In single-dataset mode a gallery shows every duplicate group by its keeper, largest first. In reference mode it shows the leaked dataset images, the ones with the most exact or near-identical matches first. Selecting a card opens the whole group or every match. An all-pairs gallery closes the report, most similar first, limited by the report row limit. Selecting a pair card compares the two images side by side. The report has no tables: every list is a gallery of the images themselves.
JSON config
Machine-readable node interface for automation and advanced usage.