DEV Community

orville wang
orville wang

Posted on

I Cleaned My Mom's Phone: A Case Study in Photo Junk

My mom called me on a Sunday. "My phone says storage full and I can't take pictures of your niece." I drove over expecting a five-minute fix. Two hours later I had a small taxonomy of digital clutter and a new appreciation for why photo storage is a genuinely hard product problem.

Here is what I found, and what it taught me about building on-device photo cleanup.

The Three Categories of Photo Junk

When I actually looked at her 8,000-photo library, the junk fell into three clean buckets.

1. Screenshots

She had 47 screenshots of the same recipe. Not similar recipes — the identical page, screenshotted every time she wanted to cook it because she never trusted that the last one was still there. Add receipts, WhatsApp conversations, and "how do I do X" tutorials, and screenshots were roughly 30% of her library.

The insight: screenshots are visually distinct from real photos. They have flat UI regions, status bars, and text density that a classifier can learn. This is a tractable ML problem.

2. Duplicates and Near-Duplicates

Every important moment existed 4-8 times. She'd tap the shutter repeatedly to "make sure one came out." The result: bursts of nearly identical frames where only one is worth keeping.

True duplicates are easy (hash the pixels). Near-duplicates are the hard part — you need perceptual similarity, and then you need to pick the best frame (sharpest, eyes open, best framing). That's a ranking problem on top of a clustering problem.

3. Blurry and Accidental Shots

Pocket photos. Motion blur. The floor. The inside of a bag. These are pure waste with zero sentimental value, and a blur-detection model catches them with high precision.

Why This Should Run On-Device

Here's the part that matters. Every instinct in modern app development says "upload it to the cloud and process it there." For photos, that's the wrong call.

  1. Privacy. A person's photo library is the most intimate dataset they own. My mom's library has photos of her grandkids, her medical documents, her passport. Uploading that to anyone's server to save space is a terrible trade.
  2. Cost and latency. Uploading 8,000 full-resolution photos over her home Wi-Fi would take hours and hammer her data if it fell back to cellular.
  3. It's unnecessary. Apple's Core ML and the Vision framework run classification, feature extraction, and perceptual hashing directly on the Neural Engine. A modern iPhone can scan thousands of photos locally in a couple of minutes.

On-device isn't a limitation to work around — for this problem it's strictly better on every axis that matters to the user.

What I Took Away

The hard part of photo cleanup isn't detection. Detecting screenshots, duplicates, and blur are all solved-ish problems. The hard part is trust: people don't delete because they're afraid of losing the one photo that mattered. Good cleanup tooling is really a trust-building exercise — group the obvious junk, make deletion reversible, and never touch anything ambiguous without asking.

That's the philosophy behind the app I've been working on, Swipe Cleaner: on-device Core ML classification for screenshots, duplicates, and blurry shots, with nothing ever leaving the phone. My mom went from "storage full" to 12 GB free in about ten minutes of swiping.

If you're curious about the approach, the project is here: https://www.opennomos.com/en/project/01KW95TC7VFJXZNYHNV3SJ04CN

What's the weirdest thing you've found cleaning a family member's photo library? I'm collecting stories.

Top comments (0)