Segment-and-Track-Anything icon indicating copy to clipboard operation
Segment-and-Track-Anything copied to clipboard

How to deal with the disappeared objects

Open ZillaRU opened this issue 1 year ago • 3 comments

I tried to export trackID derived by Seg-Track and got many errors. I found that there are no codes to deal with the object disappearance. https://github.com/z-x-yang/Segment-and-Track-Anything/blob/709cf2ad5ff53811f244ee19be3a8ee55290ebfb/seg_track_anything.py#L107-L117 I think Seg-Track, as a object tracking model, should handle this case better. My basic idea about this is to compare the track_mask and seg_mask like what find_new_objects does.

Will you handle the issue soon?

Thanks for your patience.

ZillaRU avatar Apr 27 '23 11:04 ZillaRU

Hi, once an object appear in the video, it will be assigned an unique ID and then be tracked in the whole video. Even an object disappear for a while and then re-appear, the model can still identify it by its unique ID. Could you please describe the errors more specifically?

yoxu515 avatar Apr 27 '23 12:04 yoxu515

Can the values in merged pred_mask be used as track_id? I did some second-development based on ur project (using BBox as box prompt, only tracking some specific objects), maybe I missed some key operations which led to mistakes in pred_mask.

ZillaRU avatar Apr 27 '23 13:04 ZillaRU

Yes. The object IDs are in the pred_mask, and the mask is saved as a palette image with color indexing. You can check the visualization results. The color of the same object should be the same across different frames.

yoxu515 avatar Apr 27 '23 13:04 yoxu515

I have fixed my code. Thanks for your patience.

ZillaRU avatar May 04 '23 03:05 ZillaRU