solov2_r50_fpn_ms-3x_coco.py 905 B

1234567891011121314151617181920212223242526272829303132333435
  1. _base_ = './solov2_r50_fpn_1x_coco.py'
  2. train_pipeline = [
  3. dict(type='LoadImageFromFile', backend_args={{_base_.backend_args}}),
  4. dict(type='LoadAnnotations', with_bbox=True, with_mask=True),
  5. dict(
  6. type='RandomChoiceResize',
  7. scales=[(1333, 800), (1333, 768), (1333, 736), (1333, 704),
  8. (1333, 672), (1333, 640)],
  9. keep_ratio=True),
  10. dict(type='RandomFlip', prob=0.5),
  11. dict(type='PackDetInputs')
  12. ]
  13. train_dataloader = dict(dataset=dict(pipeline=train_pipeline))
  14. # training schedule for 3x
  15. max_epochs = 36
  16. train_cfg = dict(max_epochs=max_epochs)
  17. # learning rate
  18. param_scheduler = [
  19. dict(
  20. type='LinearLR',
  21. start_factor=1.0 / 3,
  22. by_epoch=False,
  23. begin=0,
  24. end=500),
  25. dict(
  26. type='MultiStepLR',
  27. begin=0,
  28. end=36,
  29. by_epoch=True,
  30. milestones=[27, 33],
  31. gamma=0.1)
  32. ]