Home
← All projects

Kotlin Multiplatform app · Sep – Oct 2026 · MVP done on Android, iOS shell built

Smart Gallery

An on-device photo cleaner for Android and iOS that never touches the network.

Phones fill up with blurry shots, bursts, duplicates, screenshots and photos of receipts. Smart Gallery finds them and lets you clear them in one pass. Every photo is analysed on the phone, and the Android app has no permission to open a network socket at all.

  • One SigLIP2 inference per photo gives both duplicate grouping and scene labels
  • Android ships with the INTERNET permission removed, checked in the build
  • Shared Kotlin grouping engine for Android and iOS, 25 of 26 milestones passed
  • First-run screen saying photos are analysed on the device with no uploads and no account

    First run: on-device, no account

  • Library scanning, analysing 6 of 12 photos

    Scanning the library

  • Scan results: 8 to review across duplicates, blurry, too dark, screenshots and documents

    What it found

  • Two copies of a photo, one kept and one marked for trash

    Copies, with a keeper picked

  • Three similar burst shots of a motorcycle, one kept

    Burst shots grouped

  • Trash with three photos marked and a button to move them to the system trash

    Nothing is deleted without confirmation

The itch

Gallery cleaners either upload your photos to a server or ship analytics SDKs that phone home. For a library of private photos, I wanted one that provably can’t.

What I built

A Kotlin Multiplatform app with a shared core (scan coordinator, grouping engine, keeper selection, Room index) and native analysers on each platform.

  • Android runs a SigLIP2 image encoder through LiteRT’s CompiledModel on the GPU, with CPU fallback. One inference per photo gives a 768-dimension embedding, used both to group near-duplicates and to classify scenes against text anchors computed offline.
  • iOS uses Apple’s own Vision requests for feature prints and “utility image” detection, plus PhotoKit’s exact burst and screenshot flags.
  • Sharpness is a shared Kotlin metric, so both platforms judge blur the same way.

Scans run while the phone is charging and idle. Most photos are never fully decoded: the app reads the system’s thumbnail cache, because decoding often costs more battery than inference.

The hard part

Privacy had to be enforced, not promised. MediaPipe and ML Kit were both rejected because they pull in Google’s telemetry uploader. On Android the INTERNET permission is stripped in the manifest, and the build checks the final permission list. Backups are off and the index is stored privately.

Copies were the other hard problem. Two photos can embed almost identically and still differ (a crop, an edit), so a 64×64 grayscale pixel check now confirms a “copy” before it is grouped as one.

Where it stands

The Android MVP passes its gates through a signed R8 release build and a smoke test on a real phone. The iOS app shell and Vision probe work. iOS end-to-end tests are blocked because the iOS 18.3 simulator can’t run the Vision requests.

The screens on this page are from the Android emulator, scanning the test photos the project ships with.