hrnet_w32_384x288.yml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. use_gpu: true
  2. log_iter: 5
  3. save_dir: output
  4. snapshot_epoch: 10
  5. weights: output/hrnet_w32_384x288/model_final
  6. epoch: 210
  7. num_joints: &num_joints 17
  8. pixel_std: &pixel_std 200
  9. metric: KeyPointTopDownCOCOEval
  10. num_classes: 1
  11. train_height: &train_height 384
  12. train_width: &train_width 288
  13. trainsize: &trainsize [*train_width, *train_height]
  14. hmsize: &hmsize [72, 96]
  15. flip_perm: &flip_perm [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, 14], [15, 16]]
  16. #####model
  17. architecture: TopDownHRNet
  18. pretrain_weights: https://paddledet.bj.bcebos.com/models/pretrained/Trunc_HRNet_W32_C_pretrained.pdparams
  19. TopDownHRNet:
  20. backbone: HRNet
  21. post_process: HRNetPostProcess
  22. flip_perm: *flip_perm
  23. num_joints: *num_joints
  24. width: &width 32
  25. loss: KeyPointMSELoss
  26. flip: true
  27. HRNet:
  28. width: *width
  29. freeze_at: -1
  30. freeze_norm: false
  31. return_idx: [0]
  32. KeyPointMSELoss:
  33. use_target_weight: true
  34. #####optimizer
  35. LearningRate:
  36. base_lr: 0.0005
  37. schedulers:
  38. - !PiecewiseDecay
  39. milestones: [170, 200]
  40. gamma: 0.1
  41. - !LinearWarmup
  42. start_factor: 0.001
  43. steps: 1000
  44. OptimizerBuilder:
  45. optimizer:
  46. type: Adam
  47. regularizer:
  48. factor: 0.0
  49. type: L2
  50. #####data
  51. TrainDataset:
  52. !KeypointTopDownCocoDataset
  53. image_dir: train2017
  54. anno_path: annotations/person_keypoints_train2017.json
  55. dataset_dir: dataset/coco
  56. num_joints: *num_joints
  57. trainsize: *trainsize
  58. pixel_std: *pixel_std
  59. use_gt_bbox: True
  60. EvalDataset:
  61. !KeypointTopDownCocoDataset
  62. image_dir: val2017
  63. anno_path: annotations/person_keypoints_val2017.json
  64. dataset_dir: dataset/coco
  65. bbox_file: bbox.json
  66. num_joints: *num_joints
  67. trainsize: *trainsize
  68. pixel_std: *pixel_std
  69. use_gt_bbox: True
  70. image_thre: 0.0
  71. TestDataset:
  72. !ImageFolder
  73. anno_path: dataset/coco/keypoint_imagelist.txt
  74. worker_num: 2
  75. global_mean: &global_mean [0.485, 0.456, 0.406]
  76. global_std: &global_std [0.229, 0.224, 0.225]
  77. TrainReader:
  78. sample_transforms:
  79. - RandomFlipHalfBodyTransform:
  80. scale: 0.5
  81. rot: 40
  82. num_joints_half_body: 8
  83. prob_half_body: 0.3
  84. pixel_std: *pixel_std
  85. trainsize: *trainsize
  86. upper_body_ids: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
  87. flip_pairs: *flip_perm
  88. - TopDownAffine:
  89. trainsize: *trainsize
  90. - ToHeatmapsTopDown:
  91. hmsize: *hmsize
  92. sigma: 2
  93. batch_transforms:
  94. - NormalizeImage:
  95. mean: *global_mean
  96. std: *global_std
  97. is_scale: true
  98. - Permute: {}
  99. batch_size: 64
  100. shuffle: true
  101. drop_last: false
  102. EvalReader:
  103. sample_transforms:
  104. - TopDownAffine:
  105. trainsize: *trainsize
  106. batch_transforms:
  107. - NormalizeImage:
  108. mean: *global_mean
  109. std: *global_std
  110. is_scale: true
  111. - Permute: {}
  112. batch_size: 16
  113. TestReader:
  114. inputs_def:
  115. image_shape: [3, *train_height, *train_width]
  116. sample_transforms:
  117. - Decode: {}
  118. - TopDownEvalAffine:
  119. trainsize: *trainsize
  120. - NormalizeImage:
  121. mean: *global_mean
  122. std: *global_std
  123. is_scale: true
  124. - Permute: {}
  125. batch_size: 1