iPhoneScanningPhotos

What happens when you scan for duplicate photos in DeDup 1.0.1 on iPhone

Rahul Pahuja·October 17, 2026·4 min read

When you tap Scan on the Scan tab, DeDup reads your photo library through Apple's Photos framework, makes a small fingerprint of each photo, and groups photos whose fingerprints are close. It then shows each group with one photo marked KEEP. The scan itself deletes nothing.

What the scan reads

The first phase is called "Indexing library". DeDup fetches every photo and video, newest first, and records each one's dates, pixel size, duration, favorite flag, screenshot flag and file size. Photos has no public size field, so the code reads file size from each asset's resources through a workaround.

Albums you've excluded in Settings are dropped from the scan and from every result.

The second phase, "Analyzing photos", asks Photos for a 256-pixel image of each photo, with network download turned off. Per a code comment, an iCloud-only photo falls back to the thumbnail already on the phone. If no image comes back, that photo is left out of the comparison.

How photos are compared

DeDup uses a difference hash (dHash). It shrinks the photo to a 9 by 8 grayscale grid and sets one bit for each pixel brighter than its right-hand neighbour, giving 64 bits. Rotation is applied first, so a rotated copy gets the same hash.

Two photos count as near-duplicates when their hashes differ in at most a set number of bits. The default is 10. In Settings, "Similarity Sensitivity" is a stepper from 0 to 20, shown in bits, and it applies from the next scan.

Photos with the same file size, resolution and hash are grouped straight away. A code comment says DeDup doesn't read file bytes, because that would force iCloud downloads. So "identical" means same size, resolution and fingerprint, not a byte-by-byte check. Everything else joins the group whose first photo is closest, within the threshold.

A hash match means "looks alike", which is why group titles read "N similar photos".

Enhanced AI Scan is a Settings switch, off by default. When on, DeDup also uses Apple's Vision feature prints to merge groups of the same scene, only for photos taken within 10 minutes of each other. The app's own text says it's slower and uses more battery. The aesthetics score is only requested on iOS 18 and newer.

Inside a group, the KEEP photo is chosen in this order: favorite, then aesthetics (Enhanced only), then face capture quality, then resolution, then sharpness, then file size.

What's saved for the next launch

DeDup saves a file in the app's own storage with each photo's details, hash, sharpness and face score, the group memberships, and the time of the last scan. It doesn't store the images. A photo whose modification date is unchanged is reused on the next scan instead of analyzed again. At launch, if photo access is available, the last results are restored and photos deleted since are dropped. Settings has "Clear Scan Cache" to start over.

What the results show

  • A header: "Ready to scan", then "N duplicate groups found" or "Gallery is clean", plus "Last scanned" and the time.
  • While scanning: the phase name, a count, and a Stop button.
  • Groups titled "N similar photos", or "Burst" when each shot is within 3 seconds of the previous one.
  • Everything except the KEEP photo is preselected. A Select menu offers "Select Suggested" and "Deselect all", and there's a Sort & Filter menu.
  • A bar showing "N SELECTED" and their total size, with "Move to Trash". That sends them to DeDup's Trash. Nothing is deleted yet.

If you leave the app mid-scan, the code asks iOS for extra time to finish.

Scope of this post

Checked against: DeDup 1.0.1 source code (iPhone).

Not tested on a device: scan time, match accuracy, iCloud-only photos, and how much background time iOS grants. I read the code and on-screen text only.