dark_hrnet_w48_256x192.yml 3.0 KB

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