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

about proposal_target_layer #31

Open
foralliance opened this issue Dec 27, 2018 · 0 comments
Open

about proposal_target_layer #31

foralliance opened this issue Dec 27, 2018 · 0 comments

Comments

@foralliance
Copy link

@guoruoqian HI

proposal_target_layer.py中,在选择负样本时,用的函数是:

rand_num = np.floor(np.random.rand(bg_rois_per_this_image) * bg_num_rois)   
rand_num = torch.from_numpy(rand_num).type_as(gt_boxes).long()
bg_inds = bg_inds[rand_num]

其中,
rand_num = np.floor(np.random.rand(bg_rois_per_this_image) * bg_num_rois)  
其结果会有重复数字,即导致重复采样.为什么要设置成重复采样呢??

在py-faster-rcnn中,采样时
npr.choice(bg_inds, size=bg_rois_per_this_image, replace=False)
通过replace=False的设置来刻意避免重复采样.

many many thaks!!

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