-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[Example] SAM: support box prompt #1206
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the addition. Consider adding a test to ci/run.sh
to exercise the new functionality.
Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
@ggerganov Added a test for the 2 new features to |
I added these features while porting MedSAM to ggml. MedSAM uses different preprocessing and only supports box prompt and single mask output. Here's that repo: https://github.com/kwsp/MedSAM.cpp, linked here for reference. Since my codebases use OpenCV, I replaced the manual bilinear interpolation and sam_image_* with OpenCV, so you probably don't want that here 😜 |
Segment Anything supports points and boxes as prompts. Currently the example only supports a single point. This PR adds
Further work (outside the scope of this PR):