labelme icon indicating copy to clipboard operation
labelme copied to clipboard

Can't download sam modle in windows

Open withkun opened this issue 6 months ago • 0 comments

Provide environment information

Python 3.12.9 labelme==5.8.1 osam==0.2.3

What OS are you using?

Windows11

Describe the Bug

When download sam model, osam use hash as local file name, but hash contains ":" and can't as file name in windows.

osam/types/_blob.py class Blob: url: str hash: str

@property
def path(self):
    return os.path.expanduser(f"~/.cache/osam/models/blobs/{self.hash}")

Expected Behavior

may fix as:

class Blob: url: str hash: str

@property
def path(self):
    return os.path.expanduser(f"~/.cache/osam/models/blobs/{self.url.split("/")[-1]}")

To Reproduce

No response

withkun avatar Apr 23 '25 13:04 withkun