faster-rcnn_r50-caffe_fpn_ms-1x_coco.py 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. _base_ = './faster-rcnn_r50_fpn_1x_coco.py'
  2. model = dict(
  3. data_preprocessor=dict(
  4. type='DetDataPreprocessor',
  5. mean=[103.530, 116.280, 123.675],
  6. std=[1.0, 1.0, 1.0],
  7. bgr_to_rgb=False,
  8. pad_size_divisor=32),
  9. backbone=dict(
  10. norm_cfg=dict(requires_grad=False),
  11. norm_eval=True,
  12. style='caffe',
  13. init_cfg=dict(
  14. type='Pretrained',
  15. checkpoint='open-mmlab://detectron2/resnet50_caffe')))
  16. train_pipeline = [
  17. dict(type='LoadImageFromFile', backend_args=_base_.backend_args),
  18. dict(type='LoadAnnotations', with_bbox=True),
  19. dict(
  20. type='RandomChoiceResize',
  21. scale=[(1333, 640), (1333, 672), (1333, 704), (1333, 736), (1333, 768),
  22. (1333, 800)],
  23. keep_ratio=True),
  24. dict(type='RandomFlip', prob=0.5),
  25. dict(type='PackDetInputs')
  26. ]
  27. # MMEngine support the following two ways, users can choose
  28. # according to convenience
  29. # train_dataloader = dict(dataset=dict(pipeline=train_pipeline))
  30. _base_.train_dataloader.dataset.pipeline = train_pipeline