Point your camera at a street corner and see what it looked like in 1920.
Afterimage matches your photo to a geolocated historical photograph from the same location and reveals it beneath your shot using a draggable slider. All matching runs on-device against a bundled SQLite index — no backend, no accounts, no data leaves your phone.
- Live camera matching — take a photo and get a historical match in under 5 seconds
- Four-stage pipeline — spatial bounding-box query → heading filter (±45°) → thumbnail fetch → Vision feature-print re-ranking
- Draggable slider — reveals the historical image beneath the present-day photo
- Composite scoring — 70% GPS/heading + 30% Vision similarity; labeled Strong Match, Good Match, or Nearby
- Camera roll matching — any photo with GPS EXIF metadata works; manual location picker for GPS-less images
- City browse mode — explore historical photos for any of 6 covered US cities (NYC, SF, Chicago, DC, New Orleans, Boston) without taking a photo
- Xcode 16+, iOS 17.0+
- Physical iPhone (camera and GPS required for end-to-end matching)
git clone https://github.com/saagpatel/Afterimage.git
cd Afterimage
open Afterimage.xcodeprojBuild and run on a physical iPhone. Tap the camera button, photograph a landmark, and the app returns its best historical match with the comparison controls.
| Layer | Technology |
|---|---|
| Language | Swift 5.10, async/await |
| UI | SwiftUI (iOS 17+), AVFoundation camera wrapper |
| Database | GRDB.swift 7.x (typed SQLite wrappers) |
| Image loading | Kingfisher 8.x (async + disk cache) |
| ML similarity | Vision framework (VNGenerateImageFeaturePrintRequest) |
| Location | CoreLocation (CLLocationManager + CLHeading) |
MIT