cls_mv3.yml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. Global:
  2. use_gpu: true
  3. epoch_num: 100
  4. log_smooth_window: 20
  5. print_batch_step: 10
  6. save_model_dir: ./output/cls/mv3/
  7. save_epoch_step: 3
  8. # evaluation is run every 5000 iterations after the 4000th iteration
  9. eval_batch_step: [0, 1000]
  10. cal_metric_during_train: True
  11. pretrained_model:
  12. checkpoints:
  13. save_inference_dir:
  14. use_visualdl: False
  15. infer_img: doc/imgs_words_en/word_10.png
  16. label_list: ['0','180']
  17. Architecture:
  18. model_type: cls
  19. algorithm: CLS
  20. Transform:
  21. Backbone:
  22. name: MobileNetV3
  23. scale: 0.35
  24. model_name: small
  25. Neck:
  26. Head:
  27. name: ClsHead
  28. class_dim: 2
  29. Loss:
  30. name: ClsLoss
  31. Optimizer:
  32. name: Adam
  33. beta1: 0.9
  34. beta2: 0.999
  35. lr:
  36. name: Cosine
  37. learning_rate: 0.001
  38. regularizer:
  39. name: 'L2'
  40. factor: 0
  41. PostProcess:
  42. name: ClsPostProcess
  43. Metric:
  44. name: ClsMetric
  45. main_indicator: acc
  46. Train:
  47. dataset:
  48. name: SimpleDataSet
  49. data_dir: ./train_data/cls
  50. label_file_list:
  51. - ./train_data/cls/train.txt
  52. transforms:
  53. - DecodeImage: # load image
  54. img_mode: BGR
  55. channel_first: False
  56. - ClsLabelEncode: # Class handling label
  57. - BaseDataAugmentation:
  58. - RandAugment:
  59. - ClsResizeImg:
  60. image_shape: [3, 48, 192]
  61. - KeepKeys:
  62. keep_keys: ['image', 'label'] # dataloader will return list in this order
  63. loader:
  64. shuffle: True
  65. batch_size_per_card: 512
  66. drop_last: True
  67. num_workers: 8
  68. Eval:
  69. dataset:
  70. name: SimpleDataSet
  71. data_dir: ./train_data/cls
  72. label_file_list:
  73. - ./train_data/cls/test.txt
  74. transforms:
  75. - DecodeImage: # load image
  76. img_mode: BGR
  77. channel_first: False
  78. - ClsLabelEncode: # Class handling label
  79. - ClsResizeImg:
  80. image_shape: [3, 48, 192]
  81. - KeepKeys:
  82. keep_keys: ['image', 'label'] # dataloader will return list in this order
  83. loader:
  84. shuffle: False
  85. drop_last: False
  86. batch_size_per_card: 512
  87. num_workers: 4