cascade-rpn_r50-caffe_fpn_1x_coco.py 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. _base_ = '../rpn/rpn_r50-caffe_fpn_1x_coco.py'
  2. model = dict(
  3. rpn_head=dict(
  4. _delete_=True,
  5. type='CascadeRPNHead',
  6. num_stages=2,
  7. stages=[
  8. dict(
  9. type='StageCascadeRPNHead',
  10. in_channels=256,
  11. feat_channels=256,
  12. anchor_generator=dict(
  13. type='AnchorGenerator',
  14. scales=[8],
  15. ratios=[1.0],
  16. strides=[4, 8, 16, 32, 64]),
  17. adapt_cfg=dict(type='dilation', dilation=3),
  18. bridged_feature=True,
  19. sampling=False,
  20. with_cls=False,
  21. reg_decoded_bbox=True,
  22. bbox_coder=dict(
  23. type='DeltaXYWHBBoxCoder',
  24. target_means=(.0, .0, .0, .0),
  25. target_stds=(0.1, 0.1, 0.5, 0.5)),
  26. loss_bbox=dict(type='IoULoss', linear=True, loss_weight=10.0)),
  27. dict(
  28. type='StageCascadeRPNHead',
  29. in_channels=256,
  30. feat_channels=256,
  31. adapt_cfg=dict(type='offset'),
  32. bridged_feature=False,
  33. sampling=True,
  34. with_cls=True,
  35. reg_decoded_bbox=True,
  36. bbox_coder=dict(
  37. type='DeltaXYWHBBoxCoder',
  38. target_means=(.0, .0, .0, .0),
  39. target_stds=(0.05, 0.05, 0.1, 0.1)),
  40. loss_cls=dict(
  41. type='CrossEntropyLoss', use_sigmoid=True,
  42. loss_weight=1.0),
  43. loss_bbox=dict(type='IoULoss', linear=True, loss_weight=10.0))
  44. ]),
  45. train_cfg=dict(rpn=[
  46. dict(
  47. assigner=dict(
  48. type='RegionAssigner', center_ratio=0.2, ignore_ratio=0.5),
  49. allowed_border=-1,
  50. pos_weight=-1,
  51. debug=False),
  52. dict(
  53. assigner=dict(
  54. type='MaxIoUAssigner',
  55. pos_iou_thr=0.7,
  56. neg_iou_thr=0.7,
  57. min_pos_iou=0.3,
  58. ignore_iof_thr=-1,
  59. iou_calculator=dict(type='BboxOverlaps2D')),
  60. sampler=dict(
  61. type='RandomSampler',
  62. num=256,
  63. pos_fraction=0.5,
  64. neg_pos_ub=-1,
  65. add_gt_as_proposals=False),
  66. allowed_border=-1,
  67. pos_weight=-1,
  68. debug=False)
  69. ]),
  70. test_cfg=dict(
  71. rpn=dict(
  72. nms_pre=2000,
  73. max_per_img=2000,
  74. nms=dict(type='nms', iou_threshold=0.8),
  75. min_bbox_size=0)))
  76. optim_wrapper = dict(clip_grad=dict(max_norm=35, norm_type=2))