fcos_x101-64x4d_fpn_gn-head_ms-640-800-2x_coco.py 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. _base_ = './fcos_r50-caffe_fpn_gn-head_1x_coco.py'
  2. # model settings
  3. model = dict(
  4. data_preprocessor=dict(
  5. type='DetDataPreprocessor',
  6. mean=[123.675, 116.28, 103.53],
  7. std=[58.395, 57.12, 57.375],
  8. bgr_to_rgb=True,
  9. pad_size_divisor=32),
  10. backbone=dict(
  11. type='ResNeXt',
  12. depth=101,
  13. groups=64,
  14. base_width=4,
  15. num_stages=4,
  16. out_indices=(0, 1, 2, 3),
  17. frozen_stages=1,
  18. norm_cfg=dict(type='BN', requires_grad=True),
  19. norm_eval=True,
  20. style='pytorch',
  21. init_cfg=dict(
  22. type='Pretrained', checkpoint='open-mmlab://resnext101_64x4d')))
  23. # dataset settings
  24. train_pipeline = [
  25. dict(type='LoadImageFromFile', backend_args={{_base_.backend_args}}),
  26. dict(type='LoadAnnotations', with_bbox=True),
  27. dict(
  28. type='RandomChoiceResize',
  29. scale=[(1333, 640), (1333, 800)],
  30. keep_ratio=True),
  31. dict(type='RandomFlip', prob=0.5),
  32. dict(type='PackDetInputs')
  33. ]
  34. train_dataloader = dict(dataset=dict(pipeline=train_pipeline))
  35. # training schedule for 2x
  36. max_epochs = 24
  37. train_cfg = dict(max_epochs=max_epochs)
  38. # learning rate
  39. param_scheduler = [
  40. dict(type='ConstantLR', factor=1.0 / 3, by_epoch=False, begin=0, end=500),
  41. dict(
  42. type='MultiStepLR',
  43. begin=0,
  44. end=max_epochs,
  45. by_epoch=True,
  46. milestones=[16, 22],
  47. gamma=0.1)
  48. ]