tinypose_128x96.yml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. use_gpu: true
  2. log_iter: 5
  3. save_dir: output
  4. snapshot_epoch: 10
  5. weights: output/tinypose_128x96/model_final
  6. epoch: 420
  7. num_joints: &num_joints 17
  8. pixel_std: &pixel_std 200
  9. metric: KeyPointTopDownCOCOEval
  10. num_classes: 1
  11. train_height: &train_height 128
  12. train_width: &train_width 96
  13. trainsize: &trainsize [*train_width, *train_height]
  14. hmsize: &hmsize [24, 32]
  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: true
  26. LiteHRNet:
  27. network_type: wider_naive
  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.008
  37. schedulers:
  38. - !PiecewiseDecay
  39. milestones: [380, 410]
  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.5
  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.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. - AugmentationbyInformantionDropping:
  88. prob_cutout: 0.5
  89. offset_factor: 0.05
  90. num_patch: 1
  91. trainsize: *trainsize
  92. - TopDownAffine:
  93. trainsize: *trainsize
  94. use_udp: true
  95. - ToHeatmapsTopDown_DARK:
  96. hmsize: *hmsize
  97. sigma: 1
  98. batch_transforms:
  99. - NormalizeImage:
  100. mean: *global_mean
  101. std: *global_std
  102. is_scale: true
  103. - Permute: {}
  104. batch_size: 512
  105. shuffle: true
  106. drop_last: false
  107. EvalReader:
  108. sample_transforms:
  109. - TopDownAffine:
  110. trainsize: *trainsize
  111. use_udp: true
  112. batch_transforms:
  113. - NormalizeImage:
  114. mean: *global_mean
  115. std: *global_std
  116. is_scale: true
  117. - Permute: {}
  118. batch_size: 16
  119. TestReader:
  120. inputs_def:
  121. image_shape: [3, *train_height, *train_width]
  122. sample_transforms:
  123. - Decode: {}
  124. - TopDownEvalAffine:
  125. trainsize: *trainsize
  126. - NormalizeImage:
  127. mean: *global_mean
  128. std: *global_std
  129. is_scale: true
  130. - Permute: {}
  131. batch_size: 1
  132. fuse_normalize: false