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

【BUG ?】 Problems about the background loss when self_bg=False #77

Open
Dawn-LX opened this issue Oct 25, 2023 · 0 comments
Open

【BUG ?】 Problems about the background loss when self_bg=False #77

Dawn-LX opened this issue Oct 25, 2023 · 0 comments

Comments

@Dawn-LX
Copy link

Dawn-LX commented Oct 25, 2023

Hi, I am confused about the calculation of bg_loss. here:
https://github.com/qiuyu96/CoDeF/blob/137f16c5423d484846857327597bf65c06b92994/train.py#L329

first of all, what does self_bg mean? Next, when self_bg=False, it seems that we are computing the mse loss between grid (coordinate values) and rgb values. I suppose this is wrong.

if self.hparams.bg_loss:
    mk1 = torch.logical_not(mk_t)
    if self.hparams.self_bg:
        grid_flattened = rgbs_flattend
    else:
        grid_flattened = rearrange(grid, 'b n c -> (b n) c')
        grid_flattened = torch.cat(
            [grid_flattened, grid_flattened[:, :1]], -1)

if self.hparams.bg_loss and self.hparams.mask_dir:
    loss = loss + self.hparams.bg_loss * self.color_loss(
        results[mk1], grid_flattened[mk1])

although all experiments use self_bg=True according to the config. I'm just curious about the config self_bg, what does it mean? and what are we doing when self_bg=False ?

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

1 participant