higherhrnet_hrnet_w32_640.yml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. use_gpu: true
  2. log_iter: 10
  3. save_dir: output
  4. snapshot_epoch: 10
  5. weights: output/higherhrnet_hrnet_w32_640/model_final
  6. epoch: 300
  7. num_joints: &num_joints 17
  8. flip_perm: &flip_perm [0, 2, 1, 4, 3, 6, 5, 8, 7, 10, 9, 12, 11, 14, 13, 16, 15]
  9. input_size: &input_size 640
  10. hm_size: &hm_size 160
  11. hm_size_2x: &hm_size_2x 320
  12. max_people: &max_people 30
  13. metric: COCO
  14. IouType: keypoints
  15. num_classes: 1
  16. #####model
  17. architecture: HigherHRNet
  18. pretrain_weights: https://paddledet.bj.bcebos.com/models/pretrained/Trunc_HRNet_W32_C_pretrained.pdparams
  19. HigherHRNet:
  20. backbone: HRNet
  21. hrhrnet_head: HrHRNetHead
  22. post_process: HrHRNetPostProcess
  23. flip_perm: *flip_perm
  24. eval_flip: true
  25. HRNet:
  26. width: &width 32
  27. freeze_at: -1
  28. freeze_norm: false
  29. return_idx: [0]
  30. HrHRNetHead:
  31. num_joints: *num_joints
  32. width: *width
  33. loss: HrHRNetLoss
  34. swahr: false
  35. HrHRNetLoss:
  36. num_joints: *num_joints
  37. swahr: false
  38. #####optimizer
  39. LearningRate:
  40. base_lr: 0.001
  41. schedulers:
  42. - !PiecewiseDecay
  43. milestones: [200, 260]
  44. gamma: 0.1
  45. - !LinearWarmup
  46. start_factor: 0.001
  47. steps: 1000
  48. OptimizerBuilder:
  49. optimizer:
  50. type: Adam
  51. regularizer: None
  52. #####data
  53. TrainDataset:
  54. !KeypointBottomUpCocoDataset
  55. image_dir: train2017
  56. anno_path: annotations/person_keypoints_train2017.json
  57. dataset_dir: dataset/coco
  58. num_joints: *num_joints
  59. EvalDataset:
  60. !KeypointBottomUpCocoDataset
  61. image_dir: val2017
  62. anno_path: annotations/person_keypoints_val2017.json
  63. dataset_dir: dataset/coco
  64. num_joints: *num_joints
  65. test_mode: true
  66. TestDataset:
  67. !ImageFolder
  68. anno_path: dataset/coco/keypoint_imagelist.txt
  69. worker_num: 0
  70. global_mean: &global_mean [0.485, 0.456, 0.406]
  71. global_std: &global_std [0.229, 0.224, 0.225]
  72. TrainReader:
  73. sample_transforms:
  74. - RandomAffine:
  75. max_degree: 30
  76. scale: [0.75, 1.5]
  77. max_shift: 0.2
  78. trainsize: *input_size
  79. hmsize: [*hm_size, *hm_size_2x]
  80. - KeyPointFlip:
  81. flip_prob: 0.5
  82. flip_permutation: *flip_perm
  83. hmsize: [*hm_size, *hm_size_2x]
  84. - ToHeatmaps:
  85. num_joints: *num_joints
  86. hmsize: [*hm_size, *hm_size_2x]
  87. sigma: 2
  88. - TagGenerate:
  89. num_joints: *num_joints
  90. max_people: *max_people
  91. - NormalizePermute:
  92. mean: *global_mean
  93. std: *global_std
  94. batch_size: 20
  95. shuffle: true
  96. drop_last: true
  97. use_shared_memory: true
  98. EvalReader:
  99. sample_transforms:
  100. - EvalAffine:
  101. size: *input_size
  102. - NormalizeImage:
  103. mean: *global_mean
  104. std: *global_std
  105. is_scale: true
  106. - Permute: {}
  107. batch_size: 1
  108. TestReader:
  109. sample_transforms:
  110. - Decode: {}
  111. - EvalAffine:
  112. size: *input_size
  113. - NormalizeImage:
  114. mean: *global_mean
  115. std: *global_std
  116. is_scale: true
  117. - Permute: {}
  118. batch_size: 1