faster_rcnn_r50.yml 1.9 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
architecture: FasterRCNN
pretrain_weights: https://paddle-imagenet-models-name.bj.bcebos.com/ResNet50_cos_pretrained.tar
weights: output/faster_rcnn_r50_1x_coco/model_final.pdparams
load_static_weights: True

# Model Achitecture
FasterRCNN:
  # model anchor info flow
  anchor: Anchor
  proposal: Proposal
  # model feat info flow
  backbone: ResNet
  rpn_head: RPNHead
  bbox_head: BBoxHead
  # post process
  bbox_post_process: BBoxPostProcess


ResNet:
  # index 0 stands for res2
  depth: 50
  norm_type: bn
  freeze_at: 0
  return_idx: [2]
  num_stages: 3

RPNHead:
  rpn_feat:
    name: RPNFeat
    feat_in: 1024
    feat_out: 1024
  anchor_per_position: 15
  rpn_channel: 1024

Anchor:
  anchor_generator:
    name: AnchorGeneratorRPN
    anchor_sizes: [32, 64, 128, 256, 512]
    aspect_ratios: [0.5, 1.0, 2.0]
    stride: [16.0, 16.0]
    variance: [1.0, 1.0, 1.0, 1.0]
  anchor_target_generator:
    name: AnchorTargetGeneratorRPN
    batch_size_per_im: 256
    fg_fraction: 0.5
    negative_overlap: 0.3
    positive_overlap: 0.7
    straddle_thresh: 0.0

Proposal:
  proposal_generator:
    name: ProposalGenerator
    min_size: 0.0
    nms_thresh: 0.7
    train_pre_nms_top_n: 12000
    train_post_nms_top_n: 2000
    infer_pre_nms_top_n: 6000
    infer_post_nms_top_n: 1000
  proposal_target_generator:
    name: ProposalTargetGenerator
    batch_size_per_im: 512
    bbox_reg_weights: [[0.1, 0.1, 0.2, 0.2],]
    bg_thresh_hi: [0.5,]
    bg_thresh_lo: [0.0,]
    fg_thresh: [0.5,]
    fg_fraction: 0.25

BBoxHead:
  bbox_feat:
    name: BBoxFeat
    roi_extractor:
      name: RoIAlign
      resolution: 14
      sampling_ratio: 0
      start_level: 0
      end_level: 0
    head_feat:
      name: Res5Head
      feat_in: 1024
      feat_out: 512
  with_pool: true
  in_feat: 2048


BBoxPostProcess:
  decode:
    name: RCNNBox
    num_classes: 81
    batch_size: 1
  nms:
    name: MultiClassNMS
    keep_top_k: 100
    score_threshold: 0.05
    nms_threshold: 0.5