Live monocular depth from the camera, fully on-device: CameraFeed streams frames,
DepthEstimator (Depth Anything 3, ~100 MB) turns each one into a relative depth map.
The whole ML surface is two calls:
let depth = try await DepthEstimator()
for await frame in try await CameraFeed(framesPerSecond: 5).start() {
depthImage = try await depth.estimateDepth(for: frame).cgImage()
}xcodegen generate
open DepthCamera.xcodeprojRun on an iPhone (camera required). First launch downloads the model from the Hugging Face Hub; later launches load from cache.