Skip to main content

sam3-mlx

Segment images from text and geometric prompts with an unofficial native MLX port of SAM 3.

Docs · MedMLX

Text prompts “person” and “helmet” → masks on a real photograph.

Text prompts “person” and “helmet” → masks on a real photograph.

Input Output
Image + text, boxes or points Masks, boxes and confidence scores

Apple Silicon · Metal · Python 3.13+ · uv

Quick start

uv venv --python 3.13
source .venv/bin/activate

uv pip install sam3-mlx

Weights download automatically; Hugging Face access to the official checkpoint is required.

from sam3_mlx import build_sam3_image_model
from sam3_mlx.model.sam3_image_processor import Sam3Processor

model = build_sam3_image_model()
processor = Sam3Processor(model, resolution=1008)

state = processor.set_image("image.jpg")
state = processor.set_text_prompt("shoe", state)

masks, boxes, scores = state["masks"], state["boxes"], state["scores"]

Use a resolution divisible by 14. Selected-frame video runs each frame independently; temporal tracking and SAM 3.1 are experimental.

License

SAM License; see LICENSE and third-party notices. Unofficial port; not affiliated with Meta. Official checkpoints have separate access terms.

For research and education. Outputs require human review.

Metadata

Release files for sam3-mlx 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sam3-mlx 0.1.4
File Size Uploaded Provenance Actions
sam3_mlx-0.1.4.tar.gz 1.9 MB Without provenance Details for sam3_mlx-0.1.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sam3-mlx 0.1.4
File Interpreter ABI Platform Actions
sam3_mlx-0.1.4-py3-none-any.whl Python 3 none any Details for sam3_mlx-0.1.4-py3-none-any.whl

Total release size: 3.8 MB

Release files / sam3_mlx-0.1.4.tar.gz

Download URL sam3_mlx-0.1.4.tar.gz
Size 1.9 MB
Tags Source
SHA-256 checksum
How to use checksums
9658185aa3981958d325bf63037eb98e08329562b0cdde997d39d4ac2a7a2ff8
BLAKE2b-256 checksum
How to use checksums
9beaa821478554d2fc57bff94b5d528c7c89c7faedf26c36f642faf0a6e273d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / sam3_mlx-0.1.4-py3-none-any.whl

Download URL sam3_mlx-0.1.4-py3-none-any.whl
Size 1.9 MB
Tags Python 3
SHA-256 checksum
How to use checksums
5a99a176c7ac1bb290459a547dd7c587a53df32ef01fc9c00426873d1ae91136
BLAKE2b-256 checksum
How to use checksums
205825e6256102f01488b3b5f31cf0340a55ef9c6bce6bff37e2a32d23f81593
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for sam3-mlx 0.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page