rtmdet_tiny_8xb32-300e_coco.py 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. _base_ = './rtmdet_s_8xb32-300e_coco.py'
  2. checkpoint = 'https://download.openmmlab.com/mmdetection/v3.0/rtmdet/cspnext_rsb_pretrain/cspnext-tiny_imagenet_600e.pth' # noqa
  3. model = dict(
  4. backbone=dict(
  5. deepen_factor=0.167,
  6. widen_factor=0.375,
  7. init_cfg=dict(
  8. type='Pretrained', prefix='backbone.', checkpoint=checkpoint)),
  9. neck=dict(in_channels=[96, 192, 384], out_channels=96, num_csp_blocks=1),
  10. bbox_head=dict(in_channels=96, feat_channels=96, exp_on_reg=False))
  11. train_pipeline = [
  12. dict(type='LoadImageFromFile', backend_args={{_base_.backend_args}}),
  13. dict(type='LoadAnnotations', with_bbox=True),
  14. dict(
  15. type='CachedMosaic',
  16. img_scale=(640, 640),
  17. pad_val=114.0,
  18. max_cached_images=20,
  19. random_pop=False),
  20. dict(
  21. type='RandomResize',
  22. scale=(1280, 1280),
  23. ratio_range=(0.5, 2.0),
  24. keep_ratio=True),
  25. dict(type='RandomCrop', crop_size=(640, 640)),
  26. dict(type='YOLOXHSVRandomAug'),
  27. dict(type='RandomFlip', prob=0.5),
  28. dict(type='Pad', size=(640, 640), pad_val=dict(img=(114, 114, 114))),
  29. dict(
  30. type='CachedMixUp',
  31. img_scale=(640, 640),
  32. ratio_range=(1.0, 1.0),
  33. max_cached_images=10,
  34. random_pop=False,
  35. pad_val=(114, 114, 114),
  36. prob=0.5),
  37. dict(type='PackDetInputs')
  38. ]
  39. train_dataloader = dict(dataset=dict(pipeline=train_pipeline))