rtmdet-ins_tiny_8xb32-300e_coco.py 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. _base_ = './rtmdet-ins_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))
  11. train_pipeline = [
  12. dict(type='LoadImageFromFile', backend_args={{_base_.backend_args}}),
  13. dict(
  14. type='LoadAnnotations',
  15. with_bbox=True,
  16. with_mask=True,
  17. poly2mask=False),
  18. dict(
  19. type='CachedMosaic',
  20. img_scale=(640, 640),
  21. pad_val=114.0,
  22. max_cached_images=20,
  23. random_pop=False),
  24. dict(
  25. type='RandomResize',
  26. scale=(1280, 1280),
  27. ratio_range=(0.5, 2.0),
  28. keep_ratio=True),
  29. dict(type='RandomCrop', crop_size=(640, 640)),
  30. dict(type='YOLOXHSVRandomAug'),
  31. dict(type='RandomFlip', prob=0.5),
  32. dict(type='Pad', size=(640, 640), pad_val=dict(img=(114, 114, 114))),
  33. dict(
  34. type='CachedMixUp',
  35. img_scale=(640, 640),
  36. ratio_range=(1.0, 1.0),
  37. max_cached_images=10,
  38. random_pop=False,
  39. pad_val=(114, 114, 114),
  40. prob=0.5),
  41. dict(type='FilterAnnotations', min_gt_bbox_wh=(1, 1)),
  42. dict(type='PackDetInputs')
  43. ]
  44. train_dataloader = dict(dataset=dict(pipeline=train_pipeline))