blazeface.yml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. architecture: BlazeFace
  2. max_iters: 5000
  3. use_gpu: true
  4. log_iter: 20
  5. metric: WIDERFACE
  6. save_dir: nas_checkpoint
  7. # 1(label_class) + 1(background)
  8. num_classes: 2
  9. # nas config start
  10. reduce_rate: 0.85
  11. init_temperature: 10.24
  12. is_server: true
  13. search_steps: 300
  14. server_ip: ""
  15. server_port: 8999
  16. search_space: BlazeFaceNasSpace
  17. Constraint:
  18. # choice: flops, latency
  19. ctype: latency
  20. max_constraint: 57489
  21. min_constraint: 18000
  22. # only need in latency search
  23. table_file: latency_855.txt
  24. # nas config end
  25. LearningRate:
  26. base_lr: 0.001
  27. schedulers:
  28. - !PiecewiseDecay
  29. gamma: 0.1
  30. milestones: [240000, 300000]
  31. OptimizerBuilder:
  32. optimizer:
  33. momentum: 0.0
  34. type: RMSPropOptimizer
  35. regularizer:
  36. factor: 0.0005
  37. type: L2
  38. TrainReader:
  39. inputs_def:
  40. image_shape: [3, 640, 640]
  41. fields: ['image', 'gt_bbox', 'gt_class']
  42. dataset:
  43. !WIDERFaceDataSet
  44. dataset_dir: dataset/wider_face
  45. anno_path: wider_face_split/wider_face_train_bbx_gt.txt
  46. image_dir: WIDER_train/images
  47. sample_transforms:
  48. - !DecodeImage
  49. to_rgb: true
  50. - !NormalizeBox {}
  51. - !RandomDistort
  52. brightness_lower: 0.875
  53. brightness_upper: 1.125
  54. is_order: true
  55. - !ExpandImage
  56. max_ratio: 4
  57. prob: 0.5
  58. - !RandomInterpImage
  59. target_size: 640
  60. - !RandomFlipImage
  61. is_normalized: true
  62. - !Permute {}
  63. - !NormalizeImage
  64. is_scale: false
  65. mean: [104, 117, 123]
  66. std: [127.502231, 127.502231, 127.502231]
  67. batch_size: 8
  68. use_process: True
  69. worker_num: 8
  70. shuffle: true
  71. memsize: 6G
  72. EvalReader:
  73. inputs_def:
  74. fields: ['image', 'im_id', 'im_shape', 'gt_bbox']
  75. dataset:
  76. !WIDERFaceDataSet
  77. dataset_dir: dataset/wider_face
  78. anno_path: wider_face_split/wider_face_val_bbx_gt.txt
  79. image_dir: WIDER_val/images
  80. sample_transforms:
  81. - !DecodeImage
  82. to_rgb: true
  83. - !NormalizeBox {}
  84. - !Permute {}
  85. - !NormalizeImage
  86. is_scale: false
  87. mean: [104, 117, 123]
  88. std: [127.502231, 127.502231, 127.502231]
  89. batch_size: 1
  90. TestReader:
  91. inputs_def:
  92. fields: ['image', 'im_id', 'im_shape']
  93. dataset:
  94. !ImageFolder
  95. use_default_label: true
  96. sample_transforms:
  97. - !DecodeImage
  98. to_rgb: true
  99. - !NormalizeImage
  100. is_channel_first: false
  101. is_scale: false
  102. mean: [123, 117, 104]
  103. std: [127.502231, 127.502231, 127.502231]
  104. - !Permute {}
  105. batch_size: 1