facebookresearch / facebookresearch/sam2

About choosing low_res_masks as predictions instead of high_res_masks

Open
#464 0 comments 0 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

Hi, I spent couple of days to clear my confusion about the SAM2 repo, but I found one thing I cannot figure out.

In the `sam_base.py`, the following code set the `low_res_masks` as the SAM2 predicted masks (of course, after upsampling by interpolation):
https://github.com/facebookresearch/sam2/blob/c2ec8e14a185632b0a5d8b161928ceb50197eddc/sam2/modeling/sam2_base.py#L857-L858

It is worth noting that, in the above codes, we can also find the `high_res_masks` in the function of `track_step`, which is used by SAM2 for encoding memories.
https://github.com/facebookresearch/sam2/blob/c2ec8e14a185632b0a5d8b161928ceb50197eddc/sam2/modeling/sam2_base.py#L867-L875

So are there any insights that choose the upsampled `low_res_masks` as the SAM2's predictions, instead of the upsampled `high_res_masks`?

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.