Photo Cleaner
- hand tracking in the browser
- 60 fps
- photos pre-fetched ahead
- 5
- batch call to macOS Trash
- 1
- files permanently deleted
- 0
A local-first Mac tool for cleaning out a photo library with hand gestures. Swipe left at the webcam to delete, right to keep, with arrow keys and z-to-undo as a fallback. Photos never leave the machine, and nothing is deleted until the end of a session, when you confirm and the whole pile goes to macOS Trash in one batch call. It never calls fs.unlink, so every file stays recoverable.
Hand tracking runs in the browser through MediaPipe's HandLandmarker on WASM and the GPU at 60fps. The detector is built to ignore the return arc of your hand. It tracks wrist velocity, waits for a peak, and only fires once deceleration confirms the swipe was intentional. The frontend is React 18 and Vite, talking to a local Express 5 server that scans the folder, serves images, and handles the trash call.
State is a three-array model: an immutable queue of filenames, plus toKeep and toDelete, with a cursor into the queue, so undo is just moving the cursor back. The session is written to session.json after every swipe, filenames only, so you can quit halfway through 3,000 photos and resume at the same one tomorrow. A five-image pre-fetch window keeps upcoming photos in memory as object URLs and revokes each one after use, so there's no load time between cards. An optional Python and OpenCV script flags blurry photos by Laplacian variance, and they get a badge during review.