autodistill-grounded-sam-2 icon indicating copy to clipboard operation
autodistill-grounded-sam-2 copied to clipboard

load_SAM isn't expanding $HOME

Open fikisipi opened this issue 6 months ago • 0 comments

isdir is not supposed to be used with ~:

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

It needs to be expanded to the user:

https://github.com/autodistill/autodistill-grounded-sam-2/blob/d6eebed1c9fda3cb0a1bf5aba3773467ce1deb54/autodistill_grounded_sam_2/helpers.py#L73-L75

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

https://github.com/autodistill/autodistill-grounded-sam-2/blob/d6eebed1c9fda3cb0a1bf5aba3773467ce1deb54/autodistill_grounded_sam_2/helpers.py#L17-L19

fikisipi avatar Aug 15 '24 10:08 fikisipi