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

关于RPN网络softmax #243

Open
zf6578 opened this issue Nov 12, 2021 · 2 comments
Open

关于RPN网络softmax #243

zf6578 opened this issue Nov 12, 2021 · 2 comments

Comments

@zf6578
Copy link

zf6578 commented Nov 12, 2021

image
对最后一维(2个数字嘛)做了softmax出来,为什么取序号为1的那列呢?是把1的那列当作包含物体的概率?为什么啊?这一点我没找到什么资料。

@luxunxiansheng
Copy link

你可以试着取另一维,然后跑跑看结果。如果几乎没有差别,那就说明这个选取没有一定的要求。 而事实上可能真的就是这样:神经网络不在乎你取哪一个,他总是会根据你的选择完成拟合。

@hideinthesoul
Copy link

def _create_label(self, inside_index, anchor, bbox):
    # label: 1 is positive, 0 is negative, -1 is dont care
    label = np.empty((len(inside_index),), dtype=np.int32)
    label.fill(-1)

    argmax_ious, max_ious, gt_argmax_ious = \
        self._calc_ious(anchor, bbox, inside_index)

    # assign negative labels first so that positive labels can clobber them
    label[max_ious < self.neg_iou_thresh] = 0

    # positive label: for each gt, anchor with highest iou
    label[gt_argmax_ious] = 1

    # positive label: above threshold IOU
    label[max_ious >= self.pos_iou_thresh] = 1

...

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

3 participants