facebookresearch / facebookresearch/sam2

Recommended way to add new points to track later in the video?

Open
#224 2 comments 4 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
19.9k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

In my usecase I don't know all objects I want to track in the first frame, but they may occur at any frame in the video. So I need to be able to flexibly add new points/bboxes to track. As far as I can see there are currently two obvious approaches:

- When adding a new object to track I can reset the inference state. I can then add the new objects, together with the masks of the objects I'm already tracking. This doesn't seem ideal as the masks of the objects I was already tracking lose all context of the previous frames
- Create a separate inference state for each object I want to track. Advantage is that all objects are kept separate, allowing for full context. Disadvantage I think is that this creates a lot of overhead decreasing the inference speed.

Does anyone have any additional insights?

Thanks!

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.