mask-rcnn_r50_fpn_groie_1x_coco.py 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. _base_ = '../mask_rcnn/mask-rcnn_r50_fpn_1x_coco.py'
  2. # model settings
  3. model = dict(
  4. roi_head=dict(
  5. bbox_roi_extractor=dict(
  6. type='GenericRoIExtractor',
  7. aggregation='sum',
  8. roi_layer=dict(type='RoIAlign', output_size=7, sampling_ratio=2),
  9. out_channels=256,
  10. featmap_strides=[4, 8, 16, 32],
  11. pre_cfg=dict(
  12. type='ConvModule',
  13. in_channels=256,
  14. out_channels=256,
  15. kernel_size=5,
  16. padding=2,
  17. inplace=False,
  18. ),
  19. post_cfg=dict(
  20. type='GeneralizedAttention',
  21. in_channels=256,
  22. spatial_range=-1,
  23. num_heads=6,
  24. attention_type='0100',
  25. kv_stride=2)),
  26. mask_roi_extractor=dict(
  27. type='GenericRoIExtractor',
  28. roi_layer=dict(type='RoIAlign', output_size=14, sampling_ratio=2),
  29. out_channels=256,
  30. featmap_strides=[4, 8, 16, 32],
  31. pre_cfg=dict(
  32. type='ConvModule',
  33. in_channels=256,
  34. out_channels=256,
  35. kernel_size=5,
  36. padding=2,
  37. inplace=False,
  38. ),
  39. post_cfg=dict(
  40. type='GeneralizedAttention',
  41. in_channels=256,
  42. spatial_range=-1,
  43. num_heads=6,
  44. attention_type='0100',
  45. kv_stride=2))))