ga-retinanet_r50-caffe_fpn_1x_coco.py 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. _base_ = '../retinanet/retinanet_r50-caffe_fpn_1x_coco.py'
  2. model = dict(
  3. bbox_head=dict(
  4. _delete_=True,
  5. type='GARetinaHead',
  6. num_classes=80,
  7. in_channels=256,
  8. stacked_convs=4,
  9. feat_channels=256,
  10. approx_anchor_generator=dict(
  11. type='AnchorGenerator',
  12. octave_base_scale=4,
  13. scales_per_octave=3,
  14. ratios=[0.5, 1.0, 2.0],
  15. strides=[8, 16, 32, 64, 128]),
  16. square_anchor_generator=dict(
  17. type='AnchorGenerator',
  18. ratios=[1.0],
  19. scales=[4],
  20. strides=[8, 16, 32, 64, 128]),
  21. anchor_coder=dict(
  22. type='DeltaXYWHBBoxCoder',
  23. target_means=[.0, .0, .0, .0],
  24. target_stds=[1.0, 1.0, 1.0, 1.0]),
  25. bbox_coder=dict(
  26. type='DeltaXYWHBBoxCoder',
  27. target_means=[.0, .0, .0, .0],
  28. target_stds=[1.0, 1.0, 1.0, 1.0]),
  29. loc_filter_thr=0.01,
  30. loss_loc=dict(
  31. type='FocalLoss',
  32. use_sigmoid=True,
  33. gamma=2.0,
  34. alpha=0.25,
  35. loss_weight=1.0),
  36. loss_shape=dict(type='BoundedIoULoss', beta=0.2, loss_weight=1.0),
  37. loss_cls=dict(
  38. type='FocalLoss',
  39. use_sigmoid=True,
  40. gamma=2.0,
  41. alpha=0.25,
  42. loss_weight=1.0),
  43. loss_bbox=dict(type='SmoothL1Loss', beta=0.04, loss_weight=1.0)),
  44. # training and testing settings
  45. train_cfg=dict(
  46. ga_assigner=dict(
  47. type='ApproxMaxIoUAssigner',
  48. pos_iou_thr=0.5,
  49. neg_iou_thr=0.4,
  50. min_pos_iou=0.4,
  51. ignore_iof_thr=-1),
  52. ga_sampler=dict(
  53. type='RandomSampler',
  54. num=256,
  55. pos_fraction=0.5,
  56. neg_pos_ub=-1,
  57. add_gt_as_proposals=False),
  58. assigner=dict(neg_iou_thr=0.5, min_pos_iou=0.0),
  59. center_ratio=0.2,
  60. ignore_ratio=0.5))
  61. optim_wrapper = dict(clip_grad=dict(max_norm=35, norm_type=2))