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

The detected objects and the segmented objects are inconsistent #24

Open
magicwang1111 opened this issue Aug 2, 2024 · 3 comments
Open

Comments

@magicwang1111
Copy link

image

@kijai
Copy link
Owner

kijai commented Aug 2, 2024

So the issue here is that the SAM2 video mode only supports point prompts and not full boxes, the Florence2 Coordinates -node simply selects center of the box and passes that as a point to SAM2, in this case it would be the shirt and it segments only that.

The video mode also supports multiple points, so in this case the Florence2 box detection simply won't work well.

@tristan22mc
Copy link

Is it possible to give some kind of a prompt to SAM2 so it has a better idea what to segment? I was having an issue segmenting a product out of an image and it kept selecting the text instead of the whole product

@kijai
Copy link
Owner

kijai commented Aug 5, 2024

Is it possible to give some kind of a prompt to SAM2 so it has a better idea what to segment? I was having an issue segmenting a product out of an image and it kept selecting the text instead of the whole product

Prompting for SAM is just points, boxes or masks, it doesn't have any innate way to handle text. It works best with the points, for which I have been working on the PointsEditor -node now included in the video example too.

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