mlx-cv

MLX · Apple silicon · inference only

Parity-driven computer vision.

referencemlx

An open-source, inference-only library for MLX. Open-vocabulary grounding, object detection, monocular and multi-view depth, promptable segmentation, panoptic segmentation, and video object tracking — running on the Apple GPU, with no PyTorch at inference.

What it is

The laptop runs it. The reference proves it.

Pure MLX runtime

The Apple GPU is the whole runtime. Unified memory, no PyTorch at inference, no CUDA anywhere.

Parity or it does not ship

Every supported model is compared numerically against its upstream reference implementation. A skipped gate never becomes a claim.

One loader, one result

Every task uses the same call shape, and Result.draw() turns any output into an image you can look at.

Tasks

Six things to ask an image.

Open-vocabulary grounding

Boxes, points, and labels for anything you can name in a sentence.

LocateAnything

Object detection

COCO boxes with class labels and confidence scores.

RF-DETR

Depth and camera geometry

Monocular and multi-view depth, per-pixel confidence, and camera intrinsics and extrinsics.

Depth Anything V3

Promptable segmentation

Masks from a text phrase, a point, or a box.

SAM 3

Panoptic segmentation

Every pixel labelled, with per-segment metadata for things and stuff.

EoMT · DINOv3

Video object tracking

Stateful propagation across frames, with objects entering and leaving.

SAM 3

The live catalog is whatever mlx_cv.available_models() returns — check the repository for what is supported today.

How parity works

A port is a claim. A claim needs evidence.

Reimplementing a model in a new framework is easy to get subtly wrong, and subtly wrong models still produce confident output. So every family here carries a gate.

Reference

Check out the original implementation and run it on a fixed input.

Capture

Record its outputs and the intermediate activations worth comparing.

Replay

Run the MLX port on the same input, on the Apple GPU.

Compare

Diff both under a declared tolerance and write the verdict into a ledger.

LOCAL_FIXTURE_ONLY UPSTREAM_PASSED BLOCKED:<reason>

Three verdicts, no fourth. A gate that was skipped stays skipped in the record. The current ledger and its measured tolerances live in the repository.

Start

Load. Predict. Draw.

# Python 3.13+, Apple silicon
git clone https://github.com/appautomaton/mlx-cv
pip install -e ".[mlx]"

While the API is pre-alpha, a checkout is the recommended install — it keeps you on the code the parity ledger describes. Released versions are on PyPI and can lag main.

Weights are external artifacts and are never bundled — point the loader at a local package directory or a repository id, as described in model packages.

import mlx_cv

model  = mlx_cv.load("<alias>", "/path/to/package")
result = model.predict(image, "a text prompt")

result.draw().save("out.png")

Scope

What this is not.

Inference onlyNo training loop, no fine-tuning, no serving layer.
Weights stay upstreamNothing is bundled, and every checkpoint keeps its own licence.
Pre-alphaThe public API is still moving. Pin a commit if you depend on it.
Apple siliconMLX targets the Apple GPU. There is no CUDA path.