Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is the goal of IngroupIndicesFunction? #182

Open
ArseniuML opened this issue Feb 5, 2024 · 1 comment
Open

What is the goal of IngroupIndicesFunction? #182

ArseniuML opened this issue Feb 5, 2024 · 1 comment

Comments

@ArseniuML
Copy link

ArseniuML commented Feb 5, 2024

As I can see, IngroupIndicesFunction from sst_ops.py is a random number generator. Why do you use it? I can imagine, that RNG can be useful for training, but you use it in the inference code...

I replaced

if len(torch.unique(batch_idx[fg_mask])) < batch_size:
    one_random_pos_per_sample = self.get_sample_beg_position(batch_idx, fg_mask)
    fg_mask[one_random_pos_per_sample] = True # at least one point per sample

to

if len(torch.unique(batch_idx[fg_mask])) < batch_size:
    one_random_pos_per_sample = 0
    fg_mask[one_random_pos_per_sample] = True # at least one point per sample

and inference results (FSDv2 with Argo2 config) seems to be identical (batch index is always 0 in my case).

@Abyssaledge
Copy link
Collaborator

It is designed to create a fake foreground point at the start position of each sample. So, if the inference batch_size is 1, they are the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants