z-x-yang / Segment-and-Track-Anything

An open-source project dedicated to tracking and segmenting any objects in videos, either automatically or interactively. The primary algorithms utilized include the Segment Anything Model (SAM) for key-frame segmentation and Associating Objects with Transformers (AOT) for efficient tracking and propagation purposes.
GNU Affero General Public License v3.0
2.77k stars 334 forks source link

Click/text prompt resets after 100 frames #72

Closed K-Maehashi closed 1 year ago

K-Maehashi commented 1 year ago

Hi, thank you for developing this great package with detailed instructions.

I was able to get it to work in the environment, but somehow the click/text prompt resets after 100 frames. When I check the tracking results in the folder, it can correctly detect the object (an animal) up to 100 frames, but it picks all objects from the 101-th frame.

Is this intended behavior?

LiNO3Dy commented 1 year ago

Thank you for your question. The model automatically detects and adds new objects every sam_gap frames. To solve this issue, you can adjust the default value of sam_gap in SegTrackerArgs to its maximum value.

K-Maehashi commented 1 year ago

Oh I see it makes sense. Thank you for your reply!