@@ -94,6 +94,9 @@ models-mmpose = [
9494models-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 = [
136139models-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 ]]
249268name = " pytorch-cpu"
250269url = " https://download.pytorch.org/whl/cpu"
@@ -267,6 +286,7 @@ detectron2 = { path = "models/detectron2" }
267286jde = { path = " models/Towards-Realtime-MOT" }
268287mmpose = { path = " models/mmpose" }
269288yolox = { path = " models/yolox" }
289+ segment_anything = { path = " models/segment_anything" }
270290torch = [
271291 { index = " pytorch-cpu" , extra = " cpu" },
272292 { index = " pytorch-cu118" , extra = " cu118" },
0 commit comments