mask_reader.yml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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: -1
  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_size: 1
  64. shuffle: false
  65. drop_last: false
  66. drop_empty: false
  67. worker_num: 2
  68. TestReader:
  69. inputs_def:
  70. fields: ['image', 'im_info', 'im_id', 'im_shape']
  71. dataset:
  72. !ImageFolder
  73. anno_path: annotations/instances_val2017.json
  74. sample_transforms:
  75. - !DecodeImage
  76. to_rgb: true
  77. with_mixup: false
  78. - !NormalizeImage
  79. is_channel_first: false
  80. is_scale: true
  81. mean: [0.485,0.456,0.406]
  82. std: [0.229, 0.224,0.225]
  83. - !ResizeImage
  84. interp: 1
  85. max_size: 1333
  86. target_size: 800
  87. use_cv2: true
  88. - !Permute
  89. channel_first: true
  90. to_bgr: false
  91. batch_size: 1
  92. shuffle: false
  93. drop_last: false