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.

yolox_tiny_8x8_300e_coco.py 2.4 kB

2 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. _base_ = './yolox_s_8x8_300e_coco.py'
  2. # model settings
  3. model = dict(
  4. backbone=dict(deepen_factor=0.33, widen_factor=0.375),
  5. neck=dict(in_channels=[96, 192, 384], out_channels=96),
  6. bbox_head=dict(in_channels=96, feat_channels=96))
  7. # dataset settings
  8. img_norm_cfg = dict(
  9. mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
  10. img_scale = (640, 640)
  11. train_pipeline = [
  12. dict(type='Mosaic', img_scale=img_scale, pad_val=114.0),
  13. dict(
  14. type='RandomAffine',
  15. scaling_ratio_range=(0.5, 1.5),
  16. border=(-img_scale[0] // 2, -img_scale[1] // 2)),
  17. dict(
  18. type='PhotoMetricDistortion',
  19. brightness_delta=32,
  20. contrast_range=(0.5, 1.5),
  21. saturation_range=(0.5, 1.5),
  22. hue_delta=18),
  23. dict(type='RandomFlip', flip_ratio=0.5),
  24. dict(type='Resize', keep_ratio=True),
  25. dict(type='Pad', pad_to_square=True, pad_val=114.0),
  26. dict(type='Normalize', **img_norm_cfg),
  27. dict(type='DefaultFormatBundle'),
  28. dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels'])
  29. ]
  30. test_pipeline = [
  31. dict(type='LoadImageFromFile'),
  32. dict(
  33. type='MultiScaleFlipAug',
  34. img_scale=(416, 416),
  35. flip=False,
  36. transforms=[
  37. dict(type='Resize', keep_ratio=True),
  38. dict(type='RandomFlip'),
  39. dict(type='Pad', size=(416, 416), pad_val=114.0),
  40. dict(type='Normalize', **img_norm_cfg),
  41. dict(type='DefaultFormatBundle'),
  42. dict(type='Collect', keys=['img'])
  43. ])
  44. ]
  45. train_dataset = dict(pipeline=train_pipeline)
  46. data = dict(
  47. train=train_dataset,
  48. val=dict(pipeline=test_pipeline),
  49. test=dict(pipeline=test_pipeline))
  50. resume_from = None
  51. interval = 10
  52. # Execute in the order of insertion when the priority is the same.
  53. # The smaller the value, the higher the priority
  54. custom_hooks = [
  55. dict(type='YOLOXModeSwitchHook', num_last_epochs=15, priority=48),
  56. dict(
  57. type='SyncRandomSizeHook',
  58. ratio_range=(10, 20),
  59. img_scale=img_scale,
  60. priority=48),
  61. dict(
  62. type='SyncNormHook',
  63. num_last_epochs=15,
  64. interval=interval,
  65. priority=48),
  66. dict(type='ExpMomentumEMAHook', resume_from=resume_from, priority=49)
  67. ]
  68. checkpoint_config = dict(interval=interval)
  69. evaluation = dict(interval=interval, metric='bbox')

No Description

Contributors (3)