DEV Community

ao wang
ao wang

Posted on

How AI Image Classification Powers Smart Photo Cleanup

Every iPhone user knows the feeling: iCloud Storage Full.

When I checked my own device, 68% of storage was consumed by useless images — screenshots, blurry duplicates, near-identical burst photos. Manual cleanup would take hours.

This is where on-device AI changes the game.

How Swipe Cleaner Classifies Junk Photos

Swipe Cleaner (apps.apple.com/id6779493280) uses Core ML to run image classification entirely on-device:

1. Resolution Pattern Detection

Screenshots have a tell-tale sign: they match the exact device resolution. Real photos have varied dimensions. The model flags resolution-anchored images immediately.

2. Metadata Analysis

Camera photos carry EXIF data — location, aperture, ISO. Screenshots and downloads usually do not. The classifier uses this gap to filter.

3. Duplicate and Similarity Detection

Perceptual hashing compares images pixel-by-pixel. Burst photos or saved-then-forwarded memes are caught and grouped.

4. Blur Scoring

A lightweight CNN estimates sharpness. Anything below a configurable threshold gets flagged for review.

Privacy-First Architecture

All processing happens on-device via Core ML and Vision frameworks. No image ever leaves the phone. This is critical for a photo app — users should never have to trust a cloud service with their entire camera roll.

The Result

In testing, Swipe Cleaner reduced photo libraries by an average of 34% in under 3 minutes. The AI does the categorization, but the user always makes the final delete decision.

Key Takeaway

On-device ML has matured to the point where sophisticated image classification can run entirely on a phone, with sub-second per-image latency and zero privacy trade-offs. If you are building a mobile utility, Core ML should be your first option — not your last.


Built as part of the Nomos Build-in-Public series. Try Swipe Cleaner at apps.apple.com/id6779493280

Top comments (0)