explaingit

felipebudinich/depth-map-exporter

Analysis updated 2026-05-18

3SwiftAudience · developerComplexity · 4/5Setup · hard

TLDR

A macOS command line tool that turns a regular video into a grayscale depth map video using Apple's built in AI tools, with no extra software needed.

Mindmap

mindmap
  root((depth-exporter))
    What it does
      Video to depth map
      Grayscale output
      People box tracking
    Tech stack
      Swift
      AVFoundation
      Core ML
      Vision
    Use cases
      Depth visualization
      Person tracking
      Comparison videos
    Audience
      macOS developers
      Command line users

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Convert an MP4 video into a grayscale depth map video for visual effects or analysis.

USE CASE 2

Track and draw colored boxes around people moving through a video.

USE CASE 3

Create a side by side comparison video of original footage and its depth map.

What is it built with?

SwiftAVFoundationCore MLVision

How does it compare?

felipebudinich/depth-map-exporterabdullahselek/swiftpusherbartosk97/dead-process-mate
Stars333
LanguageSwiftSwiftSwift
Last pushed2026-06-24
MaintenanceActive
Setup difficultyhardmoderateeasy
Complexity4/52/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · hard Time to first run · 1h+

Requires an Apple Silicon Mac, Xcode tools, and a separately downloaded Core ML depth model file.

In plain English

depth-exporter is a command line tool for Mac computers with Apple Silicon chips. It takes a regular video file in MP4 format and creates a new video that shows depth information as a grayscale image, where lighter or darker areas represent how near or far things are from the camera. It does this using Apple's own tools, AVFoundation and Core ML, so it does not need FFmpeg, Python, Node.js, Electron, or other common video and AI tools installed on your machine. To use it, you need a Mac running macOS 13 or newer, the Xcode command line tools, and a Core ML depth model file that you download separately, such as the Depth Anything V2 Small model mentioned in the documentation. You build the tool yourself using Swift, then run it from the terminal with your input video and chosen model. The tool offers many optional settings. You can choose which hardware runs the AI model, such as the CPU, GPU, or Neural Engine, pick how the output looks in grayscale or inverted grayscale, and control how the depth values are normalized across frames so brightness stays consistent instead of flickering. You can also cap the output resolution, set the video bitrate, keep the original audio track, or create a side by side comparison video showing the original footage stacked above its depth map. Besides depth mapping, the project includes a second command called track-boxes. This draws colored boxes around people in a video and follows them as they move, using Apple's Vision framework for detection instead of the depth model. You can set how many people to track, provide starting box positions manually, and export debug data describing each tracked box over time. This is a specialized tool built for people comfortable with the command line and building software from source code on a Mac. It has no graphical interface, so someone unfamiliar with terminal commands or compiling Swift projects may find it hard to use directly. There is no license information provided in the material available.

Copy-paste prompts

Prompt 1
Help me build and run depth-exporter on my Mac to create a depth map video from an MP4 file.
Prompt 2
Explain what Core ML compute unit options like cpuAndNeuralEngine mean for depth-exporter's compute flag.
Prompt 3
Show me how to use the track-boxes command in depth-exporter to follow two people in a video.
Prompt 4
Walk me through choosing between global, ema, and per-frame normalization in depth-exporter.

Frequently asked questions

What is depth-map-exporter?

A macOS command line tool that turns a regular video into a grayscale depth map video using Apple's built in AI tools, with no extra software needed.

What language is depth-map-exporter written in?

Mainly Swift. The stack also includes Swift, AVFoundation, Core ML.

How hard is depth-map-exporter to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is depth-map-exporter for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.