Instructions to use Hoodrobot/MLX_SAM3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use Hoodrobot/MLX_SAM3 with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] huggingface-cli download --local-dir MLX_SAM3 Hoodrobot/MLX_SAM3
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- LM Studio
File size: 2,430 Bytes
ced11e2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | [build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "sam3-mlx"
version = "0.1.0"
description = "Segment Anything Model 3 (SAM3) implemented in Apple MLX for native Metal acceleration"
readme = "README.md"
requires-python = ">=3.9"
license = {text = "MIT"}
authors = [
{name = "SAM3 MLX Contributors"},
]
keywords = [
"segment-anything",
"sam3",
"mlx",
"apple-silicon",
"computer-vision",
"segmentation",
"metal",
"machine-learning",
"deep-learning",
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: MacOS",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Image Recognition",
]
dependencies = [
"mlx>=0.20.0",
"numpy>=1.23.0",
"pillow>=9.0.0",
]
[project.optional-dependencies]
dev = [
"pytest>=7.0",
"pytest-cov>=4.0",
"black>=23.0",
"ruff>=0.1.0",
"mypy>=1.0",
]
examples = [
"matplotlib>=3.5.0",
"tqdm>=4.65.0",
]
all = [
"sam3-mlx[dev,examples]",
]
[project.urls]
Homepage = "https://github.com/yourusername/sam3-mlx"
Repository = "https://github.com/yourusername/sam3-mlx"
Documentation = "https://github.com/yourusername/sam3-mlx#readme"
"Bug Tracker" = "https://github.com/yourusername/sam3-mlx/issues"
[project.scripts]
sam3-segment = "sam3_mlx.cli:main"
[tool.setuptools]
packages = ["sam3_mlx", "sam3_mlx.models", "sam3_mlx.utils"]
[tool.setuptools.package-data]
sam3_mlx = ["py.typed"]
[tool.black]
line-length = 100
target-version = ['py39', 'py310', 'py311']
include = '\.pyi?$'
[tool.ruff]
line-length = 100
target-version = "py39"
select = ["E", "F", "I", "N", "W"]
ignore = ["E501"]
[tool.mypy]
python_version = "3.9"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = "test_*.py"
python_classes = "Test*"
python_functions = "test_*"
addopts = "-v --cov=sam3_mlx --cov-report=term-missing"
|