SysCV / sam-hq

Segment Anything in High Quality [NeurIPS 2023]
https://arxiv.org/abs/2306.01567
Apache License 2.0
3.73k stars 224 forks source link

Add timm dependency #59

Closed giswqs closed 1 year ago

giswqs commented 1 year ago

I am adding the segment-anything-hq package to conda-forge. https://github.com/conda-forge/staged-recipes/pull/23663 Just noticed that the segment-anything-hq PyPI package is mssing the timm dependency, which causes issues for the conda-forge build. timm should be added.

import: 'segment_anything_hq' Traceback (most recent call last): File "/home/conda/staged-recipes/build_artifacts/segment-anything-hq_1691897321239/test_tmp/run_test.py", line 2, in import segment_anything_hq File "/home/conda/staged-recipes/build_artifacts/segment-anything-hq_1691897321239/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.11/site-packages/segment_anything_hq/init.py", line 7, in from .build_sam import ( File "/home/conda/staged-recipes/build_artifacts/segment-anything-hq_1691897321239/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.11/site-packages/segment_anything_hq/build_sam.py", line 11, in from .modeling import ImageEncoderViT, MaskDecoderHQ, PromptEncoder, Sam, TwoWayTransformer, TinyViT File "/home/conda/staged-recipes/build_artifacts/segment-anything-hq_1691897321239/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.11/site-packages/segment_anything_hq/modeling/init.py", line 13, in from .tiny_vit_sam import TinyViT File "/home/conda/staged-recipes/build_artifacts/segment-anything-hq_1691897321239/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.11/site-packages/segment_anything_hq/modeling/tiny_vit_sam.py", line 15, in from timm.models.layers import DropPath as TimmDropPath,\ ModuleNotFoundError: No module named 'timm'

lkeab commented 1 year ago

Thanks. We merged the request.

deltheil commented 8 months ago

@lkeab in addition, I think it would be great to push a new version to https://pypi.org/project/segment-anything-hq/ Thanks!