mask_fpn_reader.yml 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. TrainReader:
  2. inputs_def:
  3. fields: ['image', 'im_info', 'im_id', 'gt_bbox', 'gt_class', 'is_crowd', 'gt_mask']
  4. dataset:
  5. !COCODataSet
  6. image_dir: train2017
  7. anno_path: annotations/instances_train2017.json
  8. dataset_dir: dataset/coco
  9. sample_transforms:
  10. - !DecodeImage
  11. to_rgb: true
  12. - !RandomFlipImage
  13. prob: 0.5
  14. is_mask_flip: true
  15. - !NormalizeImage
  16. is_channel_first: false
  17. is_scale: true
  18. mean: [0.485,0.456,0.406]
  19. std: [0.229, 0.224,0.225]
  20. - !ResizeImage
  21. target_size: 800
  22. max_size: 1333
  23. interp: 1
  24. use_cv2: true
  25. - !Permute
  26. to_bgr: false
  27. channel_first: true
  28. batch_transforms:
  29. - !PadBatch
  30. pad_to_stride: 32
  31. use_padded_im_info: false
  32. batch_size: 1
  33. shuffle: true
  34. worker_num: 2
  35. drop_last: false
  36. use_process: false
  37. EvalReader:
  38. inputs_def:
  39. fields: ['image', 'im_info', 'im_id', 'im_shape']
  40. # for voc
  41. #fields: ['image', 'im_info', 'im_id', 'gt_bbox', 'gt_class', 'is_difficult']
  42. dataset:
  43. !COCODataSet
  44. image_dir: val2017
  45. anno_path: annotations/instances_val2017.json
  46. dataset_dir: dataset/coco
  47. sample_transforms:
  48. - !DecodeImage
  49. to_rgb: true
  50. - !NormalizeImage
  51. is_channel_first: false
  52. is_scale: true
  53. mean: [0.485,0.456,0.406]
  54. std: [0.229, 0.224,0.225]
  55. - !ResizeImage
  56. interp: 1
  57. max_size: 1333
  58. target_size: 800
  59. use_cv2: true
  60. - !Permute
  61. channel_first: true
  62. to_bgr: false
  63. batch_transforms:
  64. - !PadBatch
  65. pad_to_stride: 32
  66. use_padded_im_info: true
  67. batch_size: 1
  68. shuffle: false
  69. drop_last: false
  70. drop_empty: false
  71. worker_num: 2
  72. TestReader:
  73. inputs_def:
  74. fields: ['image', 'im_info', 'im_id', 'im_shape']
  75. dataset:
  76. !ImageFolder
  77. anno_path: annotations/instances_val2017.json
  78. sample_transforms:
  79. - !DecodeImage
  80. to_rgb: true
  81. with_mixup: false
  82. - !NormalizeImage
  83. is_channel_first: false
  84. is_scale: true
  85. mean: [0.485,0.456,0.406]
  86. std: [0.229, 0.224,0.225]
  87. - !ResizeImage
  88. interp: 1
  89. max_size: 1333
  90. target_size: 800
  91. use_cv2: true
  92. - !Permute
  93. channel_first: true
  94. to_bgr: false
  95. batch_transforms:
  96. - !PadBatch
  97. pad_to_stride: 32
  98. use_padded_im_info: true
  99. batch_size: 1
  100. shuffle: false
  101. drop_last: false