yolov3_enhance_reader.yml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. TrainReader:
  2. inputs_def:
  3. fields: ['image', 'gt_bbox', 'gt_class', 'gt_score']
  4. num_max_boxes: 50
  5. use_fine_grained_loss: true
  6. dataset:
  7. !COCODataSet
  8. image_dir: train2017
  9. anno_path: annotations/instances_train2017.json
  10. dataset_dir: dataset/coco
  11. with_background: false
  12. sample_transforms:
  13. - !DecodeImage
  14. to_rgb: True
  15. - !RandomCrop {}
  16. - !RandomFlipImage
  17. is_normalized: false
  18. - !NormalizeBox {}
  19. - !PadBox
  20. num_max_boxes: 50
  21. - !BboxXYXY2XYWH {}
  22. batch_transforms:
  23. - !RandomShape
  24. sizes: [320, 352, 384, 416, 448, 480, 512, 544, 576, 608]
  25. random_inter: True
  26. - !NormalizeImage
  27. mean: [0.485, 0.456, 0.406]
  28. std: [0.229, 0.224, 0.225]
  29. is_scale: False
  30. is_channel_first: false
  31. - !Permute
  32. to_bgr: false
  33. channel_first: True
  34. # Gt2YoloTarget is only used when use_fine_grained_loss set as true,
  35. # this operator will be deleted automatically if use_fine_grained_loss
  36. # is set as false
  37. - !Gt2YoloTarget
  38. anchor_masks: [[6, 7, 8], [3, 4, 5], [0, 1, 2]]
  39. anchors: [[10, 13], [16, 30], [33, 23],
  40. [30, 61], [62, 45], [59, 119],
  41. [116, 90], [156, 198], [373, 326]]
  42. downsample_ratios: [32, 16, 8]
  43. batch_size: 8
  44. shuffle: true
  45. drop_last: true
  46. worker_num: 8
  47. bufsize: 16
  48. use_process: true
  49. EvalReader:
  50. inputs_def:
  51. image_shape: [3, 608, 608]
  52. fields: ['image', 'im_size', 'im_id']
  53. num_max_boxes: 50
  54. dataset:
  55. !COCODataSet
  56. dataset_dir: dataset/coco
  57. anno_path: annotations/instances_val2017.json
  58. image_dir: val2017
  59. with_background: false
  60. sample_transforms:
  61. - !DecodeImage
  62. to_rgb: True
  63. with_mixup: false
  64. - !ResizeImage
  65. interp: 2
  66. target_size: 608
  67. - !NormalizeImage
  68. mean: [0.485, 0.456, 0.406]
  69. std: [0.229, 0.224, 0.225]
  70. is_scale: False
  71. is_channel_first: false
  72. - !PadBox
  73. num_max_boxes: 50
  74. - !Permute
  75. to_bgr: false
  76. channel_first: True
  77. batch_size: 8
  78. drop_empty: false
  79. worker_num: 8
  80. bufsize: 16
  81. TestReader:
  82. inputs_def:
  83. image_shape: [3, 608, 608]
  84. fields: ['image', 'im_size', 'im_id']
  85. dataset:
  86. !ImageFolder
  87. anno_path: annotations/instances_val2017.json
  88. with_background: false
  89. sample_transforms:
  90. - !DecodeImage
  91. to_rgb: True
  92. with_mixup: false
  93. - !ResizeImage
  94. interp: 2
  95. target_size: 608
  96. - !NormalizeImage
  97. mean: [0.485, 0.456, 0.406]
  98. std: [0.229, 0.224, 0.225]
  99. is_scale: False
  100. is_channel_first: false
  101. - !Permute
  102. to_bgr: false
  103. channel_first: True
  104. batch_size: 1