Skip to content

Commit 23aa86e

Browse files
committed
[fix] toml for segment_anything
1 parent b8b3b97 commit 23aa86e

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

pyproject.toml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ models-mmpose = [
9494
models-yolox = [
9595
"yolox",
9696
]
97+
models-segment_anything = [
98+
"segment_anything",
99+
]
97100

98101
# NOTE: Temporarily duplicated from [project.optional-dependencies] until
99102
# pip supports installing [dependency-groups].
@@ -136,6 +139,9 @@ models-mmpose = [
136139
models-yolox = [
137140
"yolox",
138141
]
142+
models-segment_anything = [
143+
"segment_anything",
144+
]
139145

140146
[project.scripts]
141147
"compressai-vision-eval" = "compressai_vision.run.eval_split_inference:main"
@@ -165,6 +171,7 @@ no-build-isolation-package = [
165171
"mmpose", # build-system.requires: numpy, torch
166172
"xtcocotools", # build-system.requires: Cython, numpy
167173
"yolox", # build-system.requires: pycocotools, torch, yolox, ...
174+
"segment_anything", # build-system.requires: Cython, numpy, setuptools ...
168175
]
169176

170177
# Manually specify dependencies for packages without declarative dependency metadata.
@@ -245,6 +252,18 @@ requires-dist = [
245252
# "onnx-simplifier==0.4.10",
246253
]
247254

255+
[[tool.uv.dependency-metadata]]
256+
name = "segment_anything"
257+
version = "1.0"
258+
requires-dist = [
259+
# From https://github.com/facebookresearch/segment-anything/blob/main/setup.py
260+
"matplotlib",
261+
"pycocotools",
262+
"opencv-python",
263+
# "onnx",
264+
# "onnxruntime"
265+
]
266+
248267
[[tool.uv.index]]
249268
name = "pytorch-cpu"
250269
url = "https://download.pytorch.org/whl/cpu"
@@ -267,6 +286,7 @@ detectron2 = { path = "models/detectron2" }
267286
jde = { path = "models/Towards-Realtime-MOT" }
268287
mmpose = { path = "models/mmpose" }
269288
yolox = { path = "models/yolox" }
289+
segment_anything = { path = "models/segment_anything" }
270290
torch = [
271291
{ index = "pytorch-cpu", extra = "cpu" },
272292
{ index = "pytorch-cu118", extra = "cu118" },

0 commit comments

Comments
 (0)