sam-pt icon indicating copy to clipboard operation
sam-pt copied to clipboard

How to use mask sampling for tracing?

Open Bentonmaster opened this issue 2 years ago • 3 comments

我阅读了你们的论文,其中提到了通过提供初始帧掩码的方式进行采样,然后进行跟踪的方法。我想要知道你们提供了相关的测试代码吗?如果有提供就太好了 I read your paper which mentions a method of sampling by providing an initial frame mask and then tracking it. I would like to know if you have provided any test code for this? It would be great if you do.

Bentonmaster avatar Sep 14 '23 02:09 Bentonmaster

Hej, thanks for your interest. If you are looking for the point method used to sample points from the mask, it is implemented in the extract_kmedoid_points function. If you are looking for the Video Object Segmentation (VOS) code where an initial GT mask is given and tracked throughout the video, then you can look into the documentation on running the VOS experiments or look directly into the VOS evaluation script. Have I understood your question correctly? Let me know if I can provide further help!

m43 avatar Sep 14 '23 15:09 m43

extract_kmedoid_points only gives you the +ve points.

How to get the -ve points using the same algorithm ?

ManuBN786 avatar Nov 22 '23 08:11 ManuBN786

Hi @ManuBN786, the function extract_kmedoid_points also supports sampling negative points when given the inverted mask as input. For example, if the mask is a float tensor, then you invert it with 1 - mask. For more context, check how we extract the negative points here. In our experiments, I've always used Mixed Sampling for selecting negative points.

m43 avatar Dec 03 '23 22:12 m43