Skip to content

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

Open
@Dawn-LX

Description

@Dawn-LX

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions