# SPDX-License-Identifier: Apache-2.0 # Python package of the SAM3 port for Tenstorrent Blackhole. # # pip install -e code/ (or: pip install code/) # # Install it into an environment that already has tt-metal's ttnn (and its torch); ttnn and torch are not # declared here so that pip never replaces the tt-metal build's own torch. [build-system] requires = ["setuptools>=64"] build-backend = "setuptools.build_meta" [project] name = "tt-sam3" version = "0.1.0" description = "SAM3 (Segment Anything with Concepts) text-prompted instance segmentation on Tenstorrent Blackhole via ttnn" readme = "PYTHON.md" requires-python = ">=3.10" license = { text = "SAM License (port code; see the model card)" } dependencies = [ "numpy>=1.26,<2", "pillow", "torchvision", # sam3 imports torchvision.ops; use the build that matches the tt-metal torch "sam3==0.1.4", "timm>=1.0.17", "huggingface_hub", "iopath", "psutil", "einops", "pycocotools", "ftfy", "regex", "tqdm", "typing_extensions", "triton", # sam3/model/edt.py imports it; use the version that matches torch (3.6.0 for 2.11) # host fast paths of the published numbers (each has a slower fallback when missing): "numba>=0.59", # fused resize + normalise + im2col of the input image "xxhash>=3", # image-result cache key "deflate>=0.7", # PNG fast decode ] [project.optional-dependencies] server = ["fastapi", "uvicorn", "pydantic>=2", "pybase64>=1.4", "httptools>=0.6"] test = ["pytest", "httpx"] # httpx: fastapi TestClient of the host tests [tool.setuptools.packages.find] include = ["tt_sam3*"] exclude = ["tt_sam3.tests*"] [tool.setuptools.package-data] tt_sam3 = ["assets/*.gz"] "tt_sam3.tt" = ["kernels/*.cpp"]