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.75k stars 332 forks source link

Potential error in find_new_objs #139

Open NoelShin opened 4 months ago

NoelShin commented 4 months ago

First of all, thank you very much for making this code publicly available!

While I was using your code, I noticed that in the find_new_objs function in SegTracker.py (https://github.com/z-x-yang/Segment-and-Track-Anything/blob/main/SegTracker.py#L123) could have an issue regarding modification of new_obj_mask during iteration. In addition, as pointed out in https://github.com/z-x-yang/Segment-and-Track-Anything/issues/105, shouldn't obj_num be self.curr_idx + 1 rather than self.curr_idx? Please correct me if I'm mistaken.

Many thanks, Gyungin