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.5

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.5
File Size Uploaded Provenance Actions
sam3_mlx-0.1.5.tar.gz 1.9 MB Without provenance Details for sam3_mlx-0.1.5.tar.gz

Built distribution (wheel)

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

Total release size: 3.8 MB

Release files / sam3_mlx-0.1.5.tar.gz

Download URL sam3_mlx-0.1.5.tar.gz
Size 1.9 MB
Tags Source
SHA-256 checksum
How to use checksums
83d51fecc31a5352d2a2b6388afb7c0cbca07d27d89f44479900a68d0af27436
BLAKE2b-256 checksum
How to use checksums
3ae7e61357b5fe28859d3d9f8603d5afafe90ff205696fe7cba9260c701a8950
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

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

Download URL sam3_mlx-0.1.5-py3-none-any.whl
Size 1.9 MB
Tags Python 3
SHA-256 checksum
How to use checksums
7b5cda5c357654f44a3c1548944d35cefe296eb6751751e22427efa0d212866c
BLAKE2b-256 checksum
How to use checksums
8d45548c3e2994f88270784e271b4c995ef98170c87d4caeaa353db475438be4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Security for sam3-mlx 0.1.5

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