Skip to content

load_SAM isn't expanding $HOME #3

@fikisipi

Description

@fikisipi

isdir is not supposed to be used with ~:

>>> os.isdir("~/.cache")
False
>>>

It needs to be expanded to the user:

if not os.path.isdir("~/.cache/autodistill/segment_anything_2/segment-anything-2"):
subprocess.run(
[

and you already did in some places, for example just like here:

AUTODISTILL_CACHE_DIR = os.path.expanduser("~/.cache/autodistill")
GROUDNING_DINO_CACHE_DIR = os.path.join(AUTODISTILL_CACHE_DIR, "groundingdino")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions