faster_fpn_reader.yml 2.2 KB

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