csuhan / opendet2

Official code of the paper "Expanding Low-Density Latent Regions for Open-Set Object Detection" (CVPR 2022)
https://arxiv.org/abs/2203.14911
104 stars 11 forks source link

请问在up loss中关于background类别的处理。 #8

Open Feobi1999 opened 2 years ago

Feobi1999 commented 2 years ago
        targets[:num_fg, self.num_classes-2] = gt_scores[:num_fg] * \
            (1-gt_scores[:num_fg]).pow(self.alpha)
        targets[num_fg:, self.num_classes-1] = gt_scores[num_fg:] * \
            (1-gt_scores[num_fg:]).pow(self.alpha)

        return self._soft_cross_entropy(mask_scores, targets.detach())

看到您在这块对于background 类好像采取了和unknown类一样的操作,可以解释一下这个的原因吗?论文中好像没有看到相关的阐述。

csuhan commented 2 years ago

image

We select the same number of background samples to 1) balance foreground and background samples, 2) recall unknown from background.

libig1012 commented 1 year ago

您好,我想问一下这里的self.num_class是know_class+unknow_class+bg嘛 我看到代码分类训练是是self.cls_score = nn.Linear( self.cls_score.in_features, self.num_classes + 1, bias=False)不太明白未知类的概率是怎么得到的。 感谢

fuyimin96 commented 1 year ago

您好,我想问一下这里的self.num_class是know_class+unknow_class+bg嘛 我看到代码分类训练是是self.cls_score = nn.Linear( self.cls_score.in_features, self.num_classes + 1, bias=False)不太明白未知类的概率是怎么得到的。 感谢

同问