cascade-mask-rcnn_r50_fpn_instaboost-4x_coco.py 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. _base_ = '../cascade_rcnn/cascade-mask-rcnn_r50_fpn_1x_coco.py'
  2. train_pipeline = [
  3. dict(type='LoadImageFromFile', backend_args={{_base_.backend_args}}),
  4. dict(
  5. type='InstaBoost',
  6. action_candidate=('normal', 'horizontal', 'skip'),
  7. action_prob=(1, 0, 0),
  8. scale=(0.8, 1.2),
  9. dx=15,
  10. dy=15,
  11. theta=(-1, 1),
  12. color_prob=0.5,
  13. hflag=False,
  14. aug_ratio=0.5),
  15. dict(type='LoadAnnotations', with_bbox=True, with_mask=True),
  16. dict(type='Resize', scale=(1333, 800), keep_ratio=True),
  17. dict(type='RandomFlip', prob=0.5),
  18. dict(type='PackDetInputs')
  19. ]
  20. train_dataloader = dict(dataset=dict(pipeline=train_pipeline))
  21. max_epochs = 48
  22. param_scheduler = [
  23. dict(
  24. type='LinearLR', start_factor=0.001, by_epoch=False, begin=0, end=500),
  25. dict(
  26. type='MultiStepLR',
  27. begin=0,
  28. end=max_epochs,
  29. by_epoch=True,
  30. milestones=[32, 44],
  31. gamma=0.1)
  32. ]
  33. train_cfg = dict(max_epochs=max_epochs)
  34. # only keep latest 3 checkpoints
  35. default_hooks = dict(checkpoint=dict(max_keep_ckpts=3))