You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

ssd512_voc0712.py 1.8 kB

2 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. _base_ = 'ssd300_voc0712.py'
  2. input_size = 512
  3. model = dict(
  4. bbox_head=dict(
  5. in_channels=(512, 1024, 512, 256, 256, 256, 256),
  6. anchor_generator=dict(
  7. input_size=input_size,
  8. strides=[8, 16, 32, 64, 128, 256, 512],
  9. basesize_ratio_range=(0.15, 0.9),
  10. ratios=([2], [2, 3], [2, 3], [2, 3], [2, 3], [2], [2]))))
  11. img_norm_cfg = dict(mean=[123.675, 116.28, 103.53], std=[1, 1, 1], to_rgb=True)
  12. train_pipeline = [
  13. dict(type='LoadImageFromFile', to_float32=True),
  14. dict(type='LoadAnnotations', with_bbox=True),
  15. dict(
  16. type='PhotoMetricDistortion',
  17. brightness_delta=32,
  18. contrast_range=(0.5, 1.5),
  19. saturation_range=(0.5, 1.5),
  20. hue_delta=18),
  21. dict(
  22. type='Expand',
  23. mean=img_norm_cfg['mean'],
  24. to_rgb=img_norm_cfg['to_rgb'],
  25. ratio_range=(1, 4)),
  26. dict(
  27. type='MinIoURandomCrop',
  28. min_ious=(0.1, 0.3, 0.5, 0.7, 0.9),
  29. min_crop_size=0.3),
  30. dict(type='Resize', img_scale=(512, 512), keep_ratio=False),
  31. dict(type='Normalize', **img_norm_cfg),
  32. dict(type='RandomFlip', flip_ratio=0.5),
  33. dict(type='DefaultFormatBundle'),
  34. dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels']),
  35. ]
  36. test_pipeline = [
  37. dict(type='LoadImageFromFile'),
  38. dict(
  39. type='MultiScaleFlipAug',
  40. img_scale=(512, 512),
  41. flip=False,
  42. transforms=[
  43. dict(type='Resize', keep_ratio=False),
  44. dict(type='Normalize', **img_norm_cfg),
  45. dict(type='ImageToTensor', keys=['img']),
  46. dict(type='Collect', keys=['img']),
  47. ])
  48. ]
  49. data = dict(
  50. train=dict(dataset=dict(pipeline=train_pipeline)),
  51. val=dict(pipeline=test_pipeline),
  52. test=dict(pipeline=test_pipeline))

No Description

Contributors (3)