facebookresearch / facebookresearch/sam2

Different behaviour in hosted demo than local

Open
#252 7 comments 1 reaction 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
19.9k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

I'm working on a similar application like your hosted demo. When I use the same objectId for two different objects it still works great in the demo, but not at all when running it myself.

It looks good for a single point:
Screenshot 2024-08-22 at 17 34 29

But for one point on the human and one point on the car it looks like this:
Screenshot 2024-08-22 at 17 33 07

Meanwhile in your demo:
Screenshot 2024-08-22 at 17 33 14

What is the reason for that behaviour? I understand that we should just use separate objectId's but I'm nevertheless interested why it looks so much better in your demo.

EDIT: Actually there is a very valid use case for merging the objects. If you want to classify something as foreground and background then using two objects will have gaps between the objects. This way they are automatically closed.

Any insight is greatly appreciated!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.