mask-rcnn_r50_fpn_seesaw-loss_sample1e-3-ms-2x_lvis-v1.py 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. _base_ = [
  2. '../_base_/models/mask-rcnn_r50_fpn.py',
  3. '../_base_/datasets/lvis_v1_instance.py',
  4. '../_base_/schedules/schedule_2x.py', '../_base_/default_runtime.py'
  5. ]
  6. model = dict(
  7. roi_head=dict(
  8. bbox_head=dict(
  9. num_classes=1203,
  10. cls_predictor_cfg=dict(type='NormedLinear', tempearture=20),
  11. loss_cls=dict(
  12. type='SeesawLoss',
  13. p=0.8,
  14. q=2.0,
  15. num_classes=1203,
  16. loss_weight=1.0)),
  17. mask_head=dict(num_classes=1203)),
  18. test_cfg=dict(
  19. rcnn=dict(
  20. score_thr=0.0001,
  21. # LVIS allows up to 300
  22. max_per_img=300)))
  23. # dataset settings
  24. train_pipeline = [
  25. dict(type='LoadImageFromFile', backend_args={{_base_.backend_args}}),
  26. dict(type='LoadAnnotations', with_bbox=True, with_mask=True),
  27. dict(
  28. type='RandomChoiceResize',
  29. scales=[(1333, 640), (1333, 672), (1333, 704), (1333, 736),
  30. (1333, 768), (1333, 800)],
  31. keep_ratio=True),
  32. dict(type='RandomFlip', prob=0.5),
  33. dict(type='PackDetInputs')
  34. ]
  35. train_dataloader = dict(dataset=dict(dataset=dict(pipeline=train_pipeline)))
  36. train_cfg = dict(val_interval=24)