faster-rcnn code reader 4

This section describes proposal layer, this layer and associated structure is as follows:

prototxt proposal layer defined as follows:

layer {
  name: 'proposal'
  type: 'Python'
  bottom: 'rpn_cls_prob_reshape'
  bottom: 'rpn_bbox_pred'
  bottom: 'im_info'
  top: 'rpn_rois'
#  top: 'rpn_scores'
  python_param {
    module: 'rpn.proposal_layer'
    layer: 'ProposalLayer'
    param_str: "'feat_stride': 16"
  }
}

This layer is a function of a convolutional network bbox_deltas RPN output scores to do post processing in the following steps:

1, with the upper section of the first step, generating Anchor;

2, the network output RPN bbox_deltas anchor and superimposed, to give Proposals, excluding proposal beyond the image area, and delete the original image scale (scale not input network) or a width less than the length 16 of the proposal;

3, the proposals by score in descending order, and take the first 12,000 do NMS, overlap threshold value is 0.7;

4, after the NMS, proposals are still ordered by score in descending taken before 2000 (NMS proposal number if after less than 2000, then take all) Proposals;

5, to proposals (nx 4) add a, represents batch_inds (all 0), was added in the first column, the final shape is obtained proposals nx 5.

This layer of code that links to see here , in addition to other functions involved have bbox_transform_inv , clip_boxes , NMS .

Guess you like

Origin www.cnblogs.com/pursuiting/p/11204538.html