queryinst_r50_fpn_300-proposals_crop-ms-480-800-3x_coco.py 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. _base_ = './queryinst_r50_fpn_ms-480-800-3x_coco.py'
  2. num_proposals = 300
  3. model = dict(
  4. rpn_head=dict(num_proposals=num_proposals),
  5. test_cfg=dict(
  6. _delete_=True,
  7. rpn=None,
  8. rcnn=dict(max_per_img=num_proposals, mask_thr_binary=0.5)))
  9. # augmentation strategy originates from DETR.
  10. train_pipeline = [
  11. dict(type='LoadImageFromFile', backend_args={{_base_.backend_args}}),
  12. dict(type='LoadAnnotations', with_bbox=True, with_mask=True),
  13. dict(type='RandomFlip', prob=0.5),
  14. dict(
  15. type='RandomChoice',
  16. transforms=[[
  17. dict(
  18. type='RandomChoiceResize',
  19. scales=[(480, 1333), (512, 1333), (544, 1333), (576, 1333),
  20. (608, 1333), (640, 1333), (672, 1333), (704, 1333),
  21. (736, 1333), (768, 1333), (800, 1333)],
  22. keep_ratio=True)
  23. ],
  24. [
  25. dict(
  26. type='RandomChoiceResize',
  27. scales=[(400, 1333), (500, 1333), (600, 1333)],
  28. keep_ratio=True),
  29. dict(
  30. type='RandomCrop',
  31. crop_type='absolute_range',
  32. crop_size=(384, 600),
  33. allow_negative_crop=True),
  34. dict(
  35. type='RandomChoiceResize',
  36. scales=[(480, 1333), (512, 1333), (544, 1333),
  37. (576, 1333), (608, 1333), (640, 1333),
  38. (672, 1333), (704, 1333), (736, 1333),
  39. (768, 1333), (800, 1333)],
  40. keep_ratio=True)
  41. ]]),
  42. dict(type='PackDetInputs')
  43. ]
  44. train_dataloader = dict(dataset=dict(pipeline=train_pipeline))