File size: 1,830 Bytes
d18e0a7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2b27efc
d18e0a7
 
 
 
 
 
 
 
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
# 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"]