参考帧情况:两个参数分别是VID.RPN.REF_PRE_NMS_TOP_N(6000)、VID.RPN.REF_POST_NMS_TOP_N(75) 关键帧且训练的情况:两个参数分别是RPN.PRE_NMS_TOP_N_TRAIN(12000,进行NMS前FPN的每一级应该保留的proposal数量),RPN.POST_NMS_TOP_N_TRAIN(2000,NMS之后每级保留的) 关键帧且测试的情况:两个参数分别是...
按照输入的positive softmax scores由大到小排序anchors,提取前pre_nms_topN(e.g. 6000)个anchors,即提取修正位置后的positive anchors 限定超出图像边界的positive anchors为图像边界,防止后续roi pooling时proposal超出图像边界(见文章底部QA部分图21) 剔除尺寸非常小的positive anchors 对剩余的positive anchors进行NMS(...
the A anchors34#clip predicted boxes to image35#remove predicted boxes with either height or width < threshold36#sort all (proposal, score) pairs by score from highest to lowest37#take top pre_nms_topN proposals before NMS38#apply NMS with threshold 0.7 to remaining proposals39#take after_nm...
:]#scores = scores[keep]#4. sort all (proposal, score) pairs by score from highest to lowest#5. take top pre_nms_topN (e.g. 6000)#argsort()返回的是得分从小到大的索引,[::-1]是反序排列,因此order为从大到小的索引#scores为各proposal属于fg...
(omit above) TRAIN: SCALES: (800,) MAX_SIZE: 1333 BATCH_SIZE_PER_IM: 512 RPN_PRE_NMS_TOP_N: 2000 # Per FPN level FPN_RPN_PRE_NMS_TOP_N: 1000 # Per FPN level TEST: SCALE: 800 MAX_SIZE: 1333 NMS: 0.5 RPN_PRE_NMS_TOP_N: 1000 # Per FPN level RPN_POST_NMS_TOP_N: 1000...
# return the top proposals (-> RoIs top, scores top) assertbottom[0].data.shape[0]==1, \ 'Only single item batches are supported' cfg_key=str(self.phase)# either 'TRAIN' or 'TEST' pre_nms_topN=cfg[cfg_key].RPN_PRE_NMS_TOP_N ...
labels[max_overlaps<cfg.TRAIN.RPN_NEGATIVE_OVERLAP]=0 论文中说从所有anchor中随机选取256个anchor,前景128个,背景128个。注意:那种label为-1的不会当前景也不会当背景。 下面这两段代码是前一部分是在所有前景的anchor中选128个,后一部分是在所有的背景anchor中选128个。如果前景的个数少于了128个,就把所有...
在所有anchors中筛选出top_k个anchors,top_k由参数pre_nms_top_n决定。 将筛选之后得到的anchors和它对应的box回归值进行结合,得到对应的Proposals。(box回归值就是RPN预测的anchors的偏移量) 将面积小于min_size的Proposals去除掉,min_size由参数min_size决定。
RPN:# 来自Base-RCNN-FPN.yaml IN_FEATURES: ["p2", "p3", "p4", "p5", "p6"] # 表示输入的特征图 PRE_NMS_TOPK_TRAIN: 2000 # Per FPN level 每个FPN特征图选择2000个 PRE_NMS_TOPK_TEST: 2000 # Per FPN level # Detectron1 uses 2000 proposals per-batch, # (See "modeling/rpn/rpn_ou...
64 cfg_key = str(self.phase) # either 'TRAIN' or 'TEST' 65 pre_nms_topN = cfg[cfg_key].RPN_PRE_NMS_TOP_N 66 post_nms_topN = cfg[cfg_key].RPN_POST_NMS_TOP_N 67 nms_thresh = cfg[cfg_key].RPN_NMS_THRESH 68 min_size = cfg[cfg_key].RPN_MIN_SIZE ...