fsaf_r50_fpn_1x_coco.py 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. _base_ = '../retinanet/retinanet_r50_fpn_1x_coco.py'
  2. # model settings
  3. model = dict(
  4. type='FSAF',
  5. bbox_head=dict(
  6. type='FSAFHead',
  7. num_classes=80,
  8. in_channels=256,
  9. stacked_convs=4,
  10. feat_channels=256,
  11. reg_decoded_bbox=True,
  12. # Only anchor-free branch is implemented. The anchor generator only
  13. # generates 1 anchor at each feature point, as a substitute of the
  14. # grid of features.
  15. anchor_generator=dict(
  16. type='AnchorGenerator',
  17. octave_base_scale=1,
  18. scales_per_octave=1,
  19. ratios=[1.0],
  20. strides=[8, 16, 32, 64, 128]),
  21. bbox_coder=dict(_delete_=True, type='TBLRBBoxCoder', normalizer=4.0),
  22. loss_cls=dict(
  23. type='FocalLoss',
  24. use_sigmoid=True,
  25. gamma=2.0,
  26. alpha=0.25,
  27. loss_weight=1.0,
  28. reduction='none'),
  29. loss_bbox=dict(
  30. _delete_=True,
  31. type='IoULoss',
  32. eps=1e-6,
  33. loss_weight=1.0,
  34. reduction='none')),
  35. # training and testing settings
  36. train_cfg=dict(
  37. assigner=dict(
  38. _delete_=True,
  39. type='CenterRegionAssigner',
  40. pos_scale=0.2,
  41. neg_scale=0.2,
  42. min_pos_iof=0.01),
  43. allowed_border=-1,
  44. pos_weight=-1,
  45. debug=False))
  46. optim_wrapper = dict(clip_grad=dict(max_norm=10, norm_type=2))