mask-rcnn_x101-32x8d_fpn_ms-poly-1x_coco.py 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. _base_ = './mask-rcnn_r101_fpn_1x_coco.py'
  2. model = dict(
  3. # ResNeXt-101-32x8d model trained with Caffe2 at FB,
  4. # so the mean and std need to be changed.
  5. data_preprocessor=dict(
  6. mean=[103.530, 116.280, 123.675],
  7. std=[57.375, 57.120, 58.395],
  8. bgr_to_rgb=False),
  9. backbone=dict(
  10. type='ResNeXt',
  11. depth=101,
  12. groups=32,
  13. base_width=8,
  14. num_stages=4,
  15. out_indices=(0, 1, 2, 3),
  16. frozen_stages=1,
  17. norm_cfg=dict(type='BN', requires_grad=False),
  18. style='pytorch',
  19. init_cfg=dict(
  20. type='Pretrained',
  21. checkpoint='open-mmlab://detectron2/resnext101_32x8d')))
  22. train_pipeline = [
  23. dict(type='LoadImageFromFile', backend_args={{_base_.backend_args}}),
  24. dict(
  25. type='LoadAnnotations',
  26. with_bbox=True,
  27. with_mask=True,
  28. poly2mask=False),
  29. dict(
  30. type='RandomChoiceResize',
  31. scales=[(1333, 640), (1333, 672), (1333, 704), (1333, 736),
  32. (1333, 768), (1333, 800)],
  33. keep_ratio=True),
  34. dict(type='RandomFlip', prob=0.5),
  35. dict(type='PackDetInputs'),
  36. ]
  37. train_dataloader = dict(dataset=dict(pipeline=train_pipeline))