A lightweight macOS app that batch-processes portrait photos — detect faces, crop uniformly, remove backgrounds, and export. Built for when speakers submit inconsistent portrait photos and you need them all to look uniform.
- Face Detection — Automatically detects faces using Apple's Vision framework
- Uniform Cropping — All photos are cropped so faces appear at a consistent size and position
- Background Removal — Person segmentation removes the original background and replaces it with a solid color of your choice
- Batch Processing — Import dozens of photos and process them all at once
- Multiple Aspect Ratios — Choose from 1:1, 3:4, 9:16, 4:3, or 16:9
- Two Sizing Modes
- Best Fit — Faces are approximately similar size with better framing
- Match Largest — All faces are exactly the same size, driven by the largest face
- No External Dependencies — Uses only Apple frameworks (Vision, Core Graphics, Core Image)
- macOS 26 (Tahoe) or later
- Xcode 26 or later
- Clone the repo
- Open
BetterPortrait/BetterPortrait.xcodeprojin Xcode - Build and run (Cmd+R)
- Import — Drag and drop photos onto the main area, or click "Choose Files"
- Configure — Use the left sidebar to select crop ratio, background color, and sizing mode
- Process — Click the green "Process" button in the bottom-right panel
- Export — Click "Export" and choose "Export All" or "Export Processed Only"
Photos where no face is detected are left untouched and marked with a warning.
- SwiftUI
- Vision framework (
VNDetectFaceRectanglesRequest,VNGeneratePersonSegmentationRequest) - Core Image (
CIBlendWithMaskfor compositing) - Core Graphics
Haochen Zeng — @hzeng412
MIT