retinanet_tta.py 881 B

1234567891011121314151617181920212223
  1. tta_model = dict(
  2. type='DetTTAModel',
  3. tta_cfg=dict(nms=dict(type='nms', iou_threshold=0.5), max_per_img=100))
  4. img_scales = [(1333, 800), (666, 400), (2000, 1200)]
  5. tta_pipeline = [
  6. dict(type='LoadImageFromFile', backend_args=None),
  7. dict(
  8. type='TestTimeAug',
  9. transforms=[[
  10. dict(type='Resize', scale=s, keep_ratio=True) for s in img_scales
  11. ], [
  12. dict(type='RandomFlip', prob=1.),
  13. dict(type='RandomFlip', prob=0.)
  14. ], [dict(type='LoadAnnotations', with_bbox=True)],
  15. [
  16. dict(
  17. type='PackDetInputs',
  18. meta_keys=('img_id', 'img_path', 'ori_shape',
  19. 'img_shape', 'scale_factor', 'flip',
  20. 'flip_direction'))
  21. ]])
  22. ]