open_dataset.yaml 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. name: DBNet
  2. dataset:
  3. train:
  4. dataset:
  5. type: DetDataset # 数据集类型
  6. args:
  7. data_path: # 一个存放 img_path \t gt_path的文件
  8. - ''
  9. pre_processes: # 数据的预处理过程,包含augment和标签制作
  10. - type: IaaAugment # 使用imgaug进行变换
  11. args:
  12. - {'type':Fliplr, 'args':{'p':0.5}}
  13. - {'type': Affine, 'args':{'rotate':[-10,10]}}
  14. - {'type':Resize,'args':{'size':[0.5,3]}}
  15. - type: EastRandomCropData
  16. args:
  17. size: [640,640]
  18. max_tries: 50
  19. keep_ratio: true
  20. - type: MakeBorderMap
  21. args:
  22. shrink_ratio: 0.4
  23. thresh_min: 0.3
  24. thresh_max: 0.7
  25. - type: MakeShrinkMap
  26. args:
  27. shrink_ratio: 0.4
  28. min_text_size: 8
  29. transforms: # 对图片进行的变换方式
  30. - type: ToTensor
  31. args: {}
  32. - type: Normalize
  33. args:
  34. mean: [0.485, 0.456, 0.406]
  35. std: [0.229, 0.224, 0.225]
  36. img_mode: RGB
  37. load_char_annotation: false
  38. expand_one_char: false
  39. filter_keys: [img_path,img_name,text_polys,texts,ignore_tags,shape] # 返回数据之前,从数据字典里删除的key
  40. ignore_tags: ['*', '###']
  41. loader:
  42. batch_size: 1
  43. shuffle: true
  44. num_workers: 0
  45. collate_fn: ''
  46. validate:
  47. dataset:
  48. type: DetDataset
  49. args:
  50. data_path:
  51. - ''
  52. pre_processes:
  53. - type: ResizeShortSize
  54. args:
  55. short_size: 736
  56. resize_text_polys: false
  57. transforms:
  58. - type: ToTensor
  59. args: {}
  60. - type: Normalize
  61. args:
  62. mean: [0.485, 0.456, 0.406]
  63. std: [0.229, 0.224, 0.225]
  64. img_mode: RGB
  65. load_char_annotation: false # 是否加载字符级标注
  66. expand_one_char: false # 是否对只有一个字符的框进行宽度扩充,扩充后w = w+h
  67. filter_keys: []
  68. ignore_tags: ['*', '###']
  69. loader:
  70. batch_size: 1
  71. shuffle: true
  72. num_workers: 0
  73. collate_fn: ICDARCollectFN