Find copies
Overview
Finds pictures that appear more than once in a dataset: byte-for-byte equal images, and copies made by a flip or a rotation. A picture that sits in two splits is seen in training and scored in validation or test, and a picture that sits twice in one split counts twice. The node also compares the boxes of the copies, because copies of one picture should carry the same labels, and optionally groups images by file name, which catches frames of one scene that no pixel test relates.
Nothing in the dataset changes. The report lists copy groups and pairs, and its findings can be read by Dataset insights through its Findings from other nodes input. The badge shows how many images sit in how many copy groups, for example 1357 images in 400 copy groups.
Prerequisites
How it works
Downloads each image once and reduces it to a pixel hash, a perceptual hash that survives the eight flips and rotations, and a 64x64 grey thumbnail.
Calls two images copies when their pixels are equal, or when the perceptual hashes are within 4 bits under one transform and the thumbnails correlate at 0.95 or more after it. Quarter turns and transposes count only between square images.
With Group by file name on, gives images one name key: the text before _jpg.rf. in a Roboflow export name, else the name without extension, one trailing letter after a number and a trailing number after a separator. Images with one key form a group. The rule is skipped when it leaves fewer than two distinct keys or fewer than 1% of the names distinct.
Inputs
Dataset to search. Every image is downloaded and decoded once. The split of an image is read from its split tag. Key: DATASET.
Also group images whose file names differ only by a copy suffix, a frame number or a Roboflow hash. The groups are written to the report and can keep a source scene on one side of a split. Key: NAME_GROUPS.
Image tag that gets a copy-group id on every image with a copy, for example copy_group. Pick the same tag in “Group by tags” of a Train/validation split node to keep the copies of a picture on one side of the split. Images without a copy lose the tag. Leave empty to write no tags. The name split is refused. Key: GROUP_TAG.
Outputs
Copy groups and pairs, copies inside and across splits, label agreement between copies, identical images labelled differently, file-name groups, and findings.json for analytical nodes. Shown as an artifact. Key: REPORT_ID.
How many images sit in how many copy groups. Shown on the node as a badge. Key: COPY_COUNT.
Report
Only copies made by a flip or half turn that keep the image size are mapped onto the reference copy for the label checks; other copies, and images of splits without any box, are left out of them. Besides index.md the report holds copy_groups.parquet (one row per image: group, transform to the reference copy, split, name group, file name), copy_pairs.parquet, labels_mismatch.parquet, name_groups.json, the agreement and gallery files, and findings.json.
The report starts with the counts, then has sections for copies inside a split, copies across splits, label consistency across copies, identical images labelled differently, and groups by file name. A section appears only when the run found something to show.
JSON config
Machine-readable node interface for automation and advanced usage.