cascade-rcnn_hrnetv2p-w32-20e_coco.py 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. _base_ = '../cascade_rcnn/cascade-rcnn_r50_fpn_1x_coco.py'
  2. model = dict(
  3. backbone=dict(
  4. _delete_=True,
  5. type='HRNet',
  6. extra=dict(
  7. stage1=dict(
  8. num_modules=1,
  9. num_branches=1,
  10. block='BOTTLENECK',
  11. num_blocks=(4, ),
  12. num_channels=(64, )),
  13. stage2=dict(
  14. num_modules=1,
  15. num_branches=2,
  16. block='BASIC',
  17. num_blocks=(4, 4),
  18. num_channels=(32, 64)),
  19. stage3=dict(
  20. num_modules=4,
  21. num_branches=3,
  22. block='BASIC',
  23. num_blocks=(4, 4, 4),
  24. num_channels=(32, 64, 128)),
  25. stage4=dict(
  26. num_modules=3,
  27. num_branches=4,
  28. block='BASIC',
  29. num_blocks=(4, 4, 4, 4),
  30. num_channels=(32, 64, 128, 256))),
  31. init_cfg=dict(
  32. type='Pretrained', checkpoint='open-mmlab://msra/hrnetv2_w32')),
  33. neck=dict(
  34. _delete_=True,
  35. type='HRFPN',
  36. in_channels=[32, 64, 128, 256],
  37. out_channels=256))
  38. # learning policy
  39. max_epochs = 20
  40. train_cfg = dict(max_epochs=max_epochs)
  41. param_scheduler = [
  42. dict(
  43. type='LinearLR', start_factor=0.001, by_epoch=False, begin=0, end=500),
  44. dict(
  45. type='MultiStepLR',
  46. begin=0,
  47. end=max_epochs,
  48. by_epoch=True,
  49. milestones=[16, 19],
  50. gamma=0.1)
  51. ]