yolov3_d53_8xb8-320-273e_coco.py 1.1 KB

1234567891011121314151617181920212223242526272829
  1. _base_ = './yolov3_d53_8xb8-ms-608-273e_coco.py'
  2. input_size = (320, 320)
  3. train_pipeline = [
  4. dict(type='LoadImageFromFile', backend_args={{_base_.backend_args}}),
  5. dict(type='LoadAnnotations', with_bbox=True),
  6. # `mean` and `to_rgb` should be the same with the `preprocess_cfg`
  7. dict(type='Expand', mean=[0, 0, 0], to_rgb=True, ratio_range=(1, 2)),
  8. dict(
  9. type='MinIoURandomCrop',
  10. min_ious=(0.4, 0.5, 0.6, 0.7, 0.8, 0.9),
  11. min_crop_size=0.3),
  12. dict(type='Resize', scale=input_size, keep_ratio=True),
  13. dict(type='RandomFlip', prob=0.5),
  14. dict(type='PhotoMetricDistortion'),
  15. dict(type='PackDetInputs')
  16. ]
  17. test_pipeline = [
  18. dict(type='LoadImageFromFile', backend_args={{_base_.backend_args}}),
  19. dict(type='Resize', scale=input_size, keep_ratio=True),
  20. dict(type='LoadAnnotations', with_bbox=True),
  21. dict(
  22. type='PackDetInputs',
  23. meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
  24. 'scale_factor'))
  25. ]
  26. train_dataloader = dict(dataset=dict(pipeline=train_pipeline))
  27. val_dataloader = dict(dataset=dict(pipeline=test_pipeline))
  28. test_dataloader = val_dataloader