faster_reader.yml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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: -1
  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. - !NormalizeImage
  49. is_channel_first: false
  50. is_scale: true
  51. mean: [0.485,0.456,0.406]
  52. std: [0.229, 0.224,0.225]
  53. - !ResizeImage
  54. interp: 1
  55. max_size: 1333
  56. target_size: 800
  57. use_cv2: true
  58. - !Permute
  59. channel_first: true
  60. to_bgr: false
  61. batch_size: 1
  62. shuffle: false
  63. drop_empty: false
  64. worker_num: 2
  65. TestReader:
  66. inputs_def:
  67. fields: ['image', 'im_info', 'im_id', 'im_shape']
  68. dataset:
  69. !ImageFolder
  70. anno_path: annotations/instances_val2017.json
  71. sample_transforms:
  72. - !DecodeImage
  73. to_rgb: true
  74. with_mixup: false
  75. - !NormalizeImage
  76. is_channel_first: false
  77. is_scale: true
  78. mean: [0.485,0.456,0.406]
  79. std: [0.229, 0.224,0.225]
  80. - !ResizeImage
  81. interp: 1
  82. max_size: 1333
  83. target_size: 800
  84. use_cv2: true
  85. - !Permute
  86. channel_first: true
  87. to_bgr: false
  88. batch_size: 1
  89. shuffle: false