text: _base_ = '../faster_rcnn/faster_rcnn_r50_caffe_fpn_1x_coco.py'
  rpn_weight = 0.7
  sub_images=[
      'default.png'
  ]
  model = dict(
      # type='SiameseRPNV2',
      neck=dict(
          type='FPN',
          in_channels=[256, 512, 1024, 2048],
          out_channels=256,
          num_outs=5),
      rpn_head=dict(
          _delete_=True,
          type='CascadeRPNHead',
          num_stages=2,
          stages=[
              dict(
                  type='StageCascadeRPNHead',
                  in_channels=256,
                  feat_channels=256,
                  anchor_generator=dict(
                      type='AnchorGenerator',
                      scales=[8],
                      ratios=[1.0],
                      strides=[4, 8, 16, 32, 64]),
                  adapt_cfg=dict(type='dilation', dilation=3),
                  bridged_feature=True,
                  sampling=False,
                  with_cls=False,
                  reg_decoded_bbox=True,
                  bbox_coder=dict(
                      type='DeltaXYWHBBoxCoder',
                      target_means=(.0, .0, .0, .0),
                      target_stds=(0.1, 0.1, 0.5, 0.5)),
                  loss_bbox=dict(
                      type='CIoULoss', loss_weight=10.0 * rpn_weight)),
              dict(
                  type='StageCascadeRPNHead',
                  in_channels=256,
                  feat_channels=256,
                  adapt_cfg=dict(type='offset'),
                  bridged_feature=False,
                  sampling=True,
                  with_cls=True,
                  reg_decoded_bbox=True,
                  bbox_coder=dict(
                      type='DeltaXYWHBBoxCoder',
                      target_means=(.0, .0, .0, .0),
                      target_stds=(0.05, 0.05, 0.1, 0.1)),
                  loss_cls=dict(
                      type='CrossEntropyLoss',
                      use_sigmoid=True,
                      loss_weight=1.0 * rpn_weight),
                  loss_bbox=dict(
                      type='CIoULoss', loss_weight=10.0 * rpn_weight))
          ]),
      roi_head=dict(
          bbox_head=dict(
              bbox_coder=dict(target_stds=[0.04, 0.04, 0.08, 0.08]),
              num_classes=1,
              loss_cls=dict(
                  type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0),
              loss_bbox=dict(type='SmoothL1Loss', beta=1.0, loss_weight=1.0))),
      # model training and testing settings
      train_cfg=dict(
          rpn=[
              dict(
                  assigner=dict(
                      type='RegionAssigner', center_ratio=0.2, ignore_ratio=0.5),
                  allowed_border=-1,
                  pos_weight=-1,
                  debug=False),
              dict(
                  assigner=dict(
                      type='MaxIoUAssigner',
                      pos_iou_thr=0.7,
                      neg_iou_thr=0.7,
                      min_pos_iou=0.3,
                      ignore_iof_thr=-1),
                  sampler=dict(
                      type='RandomSampler',
                      num=256,
                      pos_fraction=0.5,
                      neg_pos_ub=-1,
                      add_gt_as_proposals=False),
                  allowed_border=-1,
                  pos_weight=-1,
                  debug=False)
          ],
          rpn_proposal=dict(max_per_img=300, nms=dict(iou_threshold=0.7)),
          rcnn=dict(
              assigner=dict(
                  pos_iou_thr=0.65, neg_iou_thr=0.65, min_pos_iou=0.65),
              sampler=dict(type='RandomSampler', num=256))),
      test_cfg=dict(
          rpn=dict(max_per_img=300, nms=dict(iou_threshold=0.7)),
          rcnn=dict(score_thr=0.05,
              nms=dict(type='soft_nms', iou_threshold=0.5),
              max_per_img=100)))
  optimizer_config = dict(
      _delete_=True, grad_clip=dict(max_norm=35, norm_type=2))
  classes = ('merge',)
  data = dict(
      samples_per_gpu=2,  # Batch size of a single GPU
      workers_per_gpu=2,  # Worker to pre-fetch data for each single GPU
      train=dict(
          img_prefix='my-dataset/train',
          classes=classes,
          ann_file='my-dataset/train/train.json',
          sub_images=sub_images
      ),
      val=dict(
          img_prefix='my-dataset/test/train',
          classes=classes,
          ann_file='my-dataset/test/train/train.json',
          sub_images=sub_images
      ),
      test=dict(
          img_prefix='my-dataset/test/train',
          classes=classes,
          ann_file='my-dataset/test/train/train.json',
          sub_images=sub_images        
      )
  )
  load_from = 'crpn_faster_rcnn_r50_caffe_fpn_1x_coco-c8283cca.pth  '