Skip to content

Path for SAM models #2

@acorbat

Description

@acorbat

As mentioned by Nils in an email, some notebooks that implement SAM2 for segmentation throw errors as the config or model cannot be found. Within the utils.py in the download_model function, the path to save the model and config are hardcoded to ../models/sam2_hiera_large.pt here and ../models/sam2_hiera_l.yaml here, respectively.

The download_model function assumes there will be a single model in the models folder, so it saves the downloaded model to a specific file. On the other hand, the notebooks give the user the freedom to load different modules. Although they are not coherent, the model path expected in the notebooks is not hte one hardcoded into the download_model function.

SHould we keep a single model in the models folder and use that same path in the notebooks or should we let many models be downloaded and then each notebook selects adequately the path?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions