lite_hrnet_30_256x192_coco.yml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. use_gpu: true
  2. log_iter: 5
  3. save_dir: output
  4. snapshot_epoch: 10
  5. weights: output/lite_hrnet_30_256x192_coco/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. TopDownHRNet:
  19. backbone: LiteHRNet
  20. post_process: HRNetPostProcess
  21. flip_perm: *flip_perm
  22. num_joints: *num_joints
  23. width: &width 40
  24. loss: KeyPointMSELoss
  25. use_dark: false
  26. LiteHRNet:
  27. network_type: lite_30
  28. freeze_at: -1
  29. freeze_norm: false
  30. return_idx: [0]
  31. KeyPointMSELoss:
  32. use_target_weight: true
  33. loss_scale: 1.0
  34. #####optimizer
  35. LearningRate:
  36. base_lr: 0.002
  37. schedulers:
  38. - !PiecewiseDecay
  39. milestones: [170, 200]
  40. gamma: 0.1
  41. - !LinearWarmup
  42. start_factor: 0.001
  43. steps: 500
  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. 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: 4
  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.25
  80. rot: 30
  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:
  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