yolov3_d53_8xb8-ms-416-273e_coco.py 1.1 KB

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