Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can SAMed accept prompts to generate masks? If yes, how can it be done? #37

Open
Aimeeman opened this issue Jan 26, 2024 · 2 comments
Open

Comments

@Aimeeman
Copy link

Can SAMed accept prompts to generate masks? If yes, how can it be done?

@25benjaminli
Copy link

I don't see why it wouldn't be able to accept prompts. Simply modify the code in sam.py.

sparse_embeddings, dense_embeddings = self.prompt_encoder(
            points=None, boxes=None, masks=None
        )

You would probably have to retrain it, as the authors used default embeddings from the image during training I believe.

@hitachinsk lmk if this is correct.

@xingsanmed
Copy link

Quite interested in this issue, will the SAMed be used under a prompt-able scenario?

Thanks,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants