更换文档检测模型
This commit is contained in:
@@ -0,0 +1,141 @@
|
||||
use_gpu: true
|
||||
log_iter: 5
|
||||
save_dir: output
|
||||
snapshot_epoch: 10
|
||||
weights: output/hrnet_w32_256x192/model_final
|
||||
epoch: 210
|
||||
num_joints: &num_joints 17
|
||||
pixel_std: &pixel_std 200
|
||||
metric: KeyPointTopDownCOCOEval
|
||||
num_classes: 1
|
||||
train_height: &train_height 256
|
||||
train_width: &train_width 192
|
||||
trainsize: &trainsize [*train_width, *train_height]
|
||||
hmsize: &hmsize [48, 64]
|
||||
flip_perm: &flip_perm [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, 14], [15, 16]]
|
||||
|
||||
|
||||
#####model
|
||||
architecture: TopDownHRNet
|
||||
pretrain_weights: https://paddledet.bj.bcebos.com/models/pretrained/Trunc_HRNet_W32_C_pretrained.pdparams
|
||||
|
||||
TopDownHRNet:
|
||||
backbone: HRNet
|
||||
post_process: HRNetPostProcess
|
||||
flip_perm: *flip_perm
|
||||
num_joints: *num_joints
|
||||
width: &width 32
|
||||
loss: KeyPointMSELoss
|
||||
|
||||
HRNet:
|
||||
width: *width
|
||||
freeze_at: -1
|
||||
freeze_norm: false
|
||||
return_idx: [0]
|
||||
|
||||
KeyPointMSELoss:
|
||||
use_target_weight: true
|
||||
|
||||
|
||||
#####optimizer
|
||||
LearningRate:
|
||||
base_lr: 0.0005
|
||||
schedulers:
|
||||
- !PiecewiseDecay
|
||||
milestones: [170, 200]
|
||||
gamma: 0.1
|
||||
- !LinearWarmup
|
||||
start_factor: 0.001
|
||||
steps: 1000
|
||||
|
||||
OptimizerBuilder:
|
||||
optimizer:
|
||||
type: Adam
|
||||
regularizer:
|
||||
factor: 0.0
|
||||
type: L2
|
||||
|
||||
|
||||
#####data
|
||||
TrainDataset:
|
||||
!KeypointTopDownCocoDataset
|
||||
image_dir: train2017
|
||||
anno_path: annotations/person_keypoints_train2017.json
|
||||
dataset_dir: dataset/coco
|
||||
num_joints: *num_joints
|
||||
trainsize: *trainsize
|
||||
pixel_std: *pixel_std
|
||||
use_gt_bbox: True
|
||||
|
||||
|
||||
EvalDataset:
|
||||
!KeypointTopDownCocoDataset
|
||||
image_dir: val2017
|
||||
anno_path: annotations/person_keypoints_val2017.json
|
||||
dataset_dir: dataset/coco
|
||||
bbox_file: bbox.json
|
||||
num_joints: *num_joints
|
||||
trainsize: *trainsize
|
||||
pixel_std: *pixel_std
|
||||
use_gt_bbox: True
|
||||
image_thre: 0.0
|
||||
|
||||
|
||||
TestDataset:
|
||||
!ImageFolder
|
||||
anno_path: dataset/coco/keypoint_imagelist.txt
|
||||
|
||||
worker_num: 2
|
||||
global_mean: &global_mean [0.485, 0.456, 0.406]
|
||||
global_std: &global_std [0.229, 0.224, 0.225]
|
||||
TrainReader:
|
||||
sample_transforms:
|
||||
- RandomFlipHalfBodyTransform:
|
||||
scale: 0.5
|
||||
rot: 40
|
||||
num_joints_half_body: 8
|
||||
prob_half_body: 0.3
|
||||
pixel_std: *pixel_std
|
||||
trainsize: *trainsize
|
||||
upper_body_ids: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
|
||||
flip_pairs: *flip_perm
|
||||
- TopDownAffine:
|
||||
trainsize: *trainsize
|
||||
- ToHeatmapsTopDown_DARK:
|
||||
hmsize: *hmsize
|
||||
sigma: 2
|
||||
batch_transforms:
|
||||
- NormalizeImage:
|
||||
mean: *global_mean
|
||||
std: *global_std
|
||||
is_scale: true
|
||||
- Permute: {}
|
||||
batch_size: 64
|
||||
shuffle: true
|
||||
drop_last: false
|
||||
|
||||
EvalReader:
|
||||
sample_transforms:
|
||||
- TopDownAffine:
|
||||
trainsize: *trainsize
|
||||
batch_transforms:
|
||||
- NormalizeImage:
|
||||
mean: *global_mean
|
||||
std: *global_std
|
||||
is_scale: true
|
||||
- Permute: {}
|
||||
batch_size: 16
|
||||
|
||||
TestReader:
|
||||
inputs_def:
|
||||
image_shape: [3, *train_height, *train_width]
|
||||
sample_transforms:
|
||||
- Decode: {}
|
||||
- TopDownEvalAffine:
|
||||
trainsize: *trainsize
|
||||
- NormalizeImage:
|
||||
mean: *global_mean
|
||||
std: *global_std
|
||||
is_scale: true
|
||||
- Permute: {}
|
||||
batch_size: 1
|
||||
@@ -0,0 +1,145 @@
|
||||
use_gpu: true
|
||||
log_iter: 5
|
||||
save_dir: output
|
||||
snapshot_epoch: 10
|
||||
weights: output/hrnet_w32_384x288/model_final
|
||||
epoch: 210
|
||||
num_joints: &num_joints 17
|
||||
pixel_std: &pixel_std 200
|
||||
metric: KeyPointTopDownCOCOEval
|
||||
num_classes: 1
|
||||
train_height: &train_height 384
|
||||
train_width: &train_width 288
|
||||
trainsize: &trainsize [*train_width, *train_height]
|
||||
hmsize: &hmsize [72, 96]
|
||||
flip_perm: &flip_perm [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, 14], [15, 16]]
|
||||
|
||||
|
||||
#####model
|
||||
architecture: TopDownHRNet
|
||||
pretrain_weights: https://paddledet.bj.bcebos.com/models/pretrained/Trunc_HRNet_W32_C_pretrained.pdparams
|
||||
|
||||
TopDownHRNet:
|
||||
backbone: HRNet
|
||||
post_process: HRNetPostProcess
|
||||
flip_perm: *flip_perm
|
||||
num_joints: *num_joints
|
||||
width: &width 32
|
||||
loss: KeyPointMSELoss
|
||||
flip: true
|
||||
|
||||
HRNet:
|
||||
width: *width
|
||||
freeze_at: -1
|
||||
freeze_norm: false
|
||||
return_idx: [0]
|
||||
|
||||
KeyPointMSELoss:
|
||||
use_target_weight: true
|
||||
|
||||
|
||||
#####optimizer
|
||||
LearningRate:
|
||||
base_lr: 0.0005
|
||||
schedulers:
|
||||
- !PiecewiseDecay
|
||||
milestones: [170, 200]
|
||||
gamma: 0.1
|
||||
- !LinearWarmup
|
||||
start_factor: 0.001
|
||||
steps: 1000
|
||||
|
||||
OptimizerBuilder:
|
||||
optimizer:
|
||||
type: Adam
|
||||
regularizer:
|
||||
factor: 0.0
|
||||
type: L2
|
||||
|
||||
|
||||
#####data
|
||||
TrainDataset:
|
||||
!KeypointTopDownCocoDataset
|
||||
image_dir: train2017
|
||||
anno_path: annotations/person_keypoints_train2017.json
|
||||
dataset_dir: dataset/coco
|
||||
num_joints: *num_joints
|
||||
trainsize: *trainsize
|
||||
pixel_std: *pixel_std
|
||||
use_gt_bbox: True
|
||||
|
||||
|
||||
EvalDataset:
|
||||
!KeypointTopDownCocoDataset
|
||||
image_dir: val2017
|
||||
anno_path: annotations/person_keypoints_val2017.json
|
||||
dataset_dir: dataset/coco
|
||||
bbox_file: bbox.json
|
||||
num_joints: *num_joints
|
||||
trainsize: *trainsize
|
||||
pixel_std: *pixel_std
|
||||
use_gt_bbox: True
|
||||
image_thre: 0.0
|
||||
|
||||
|
||||
TestDataset:
|
||||
!ImageFolder
|
||||
anno_path: dataset/coco/keypoint_imagelist.txt
|
||||
|
||||
worker_num: 2
|
||||
global_mean: &global_mean [0.485, 0.456, 0.406]
|
||||
global_std: &global_std [0.229, 0.224, 0.225]
|
||||
TrainReader:
|
||||
sample_transforms:
|
||||
- RandomFlipHalfBodyTransform:
|
||||
scale: 0.5
|
||||
rot: 40
|
||||
num_joints_half_body: 8
|
||||
prob_half_body: 0.3
|
||||
pixel_std: *pixel_std
|
||||
trainsize: *trainsize
|
||||
upper_body_ids: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
|
||||
flip_pairs: *flip_perm
|
||||
- TopDownAffine:
|
||||
trainsize: *trainsize
|
||||
- ToHeatmapsTopDown_DARK:
|
||||
hmsize: *hmsize
|
||||
sigma: 2
|
||||
batch_transforms:
|
||||
- NormalizeImage:
|
||||
mean: *global_mean
|
||||
std: *global_std
|
||||
is_scale: true
|
||||
- Permute: {}
|
||||
batch_size: 32
|
||||
shuffle: true
|
||||
drop_last: false
|
||||
|
||||
EvalReader:
|
||||
sample_transforms:
|
||||
- TopDownAffine:
|
||||
trainsize: *trainsize
|
||||
- ToHeatmapsTopDown_DARK:
|
||||
hmsize: *hmsize
|
||||
sigma: 2
|
||||
batch_transforms:
|
||||
- NormalizeImage:
|
||||
mean: *global_mean
|
||||
std: *global_std
|
||||
is_scale: true
|
||||
- Permute: {}
|
||||
batch_size: 16
|
||||
|
||||
TestReader:
|
||||
inputs_def:
|
||||
image_shape: [3, *train_height, *train_width]
|
||||
sample_transforms:
|
||||
- Decode: {}
|
||||
- TopDownEvalAffine:
|
||||
trainsize: *trainsize
|
||||
- NormalizeImage:
|
||||
mean: *global_mean
|
||||
std: *global_std
|
||||
is_scale: true
|
||||
- Permute: {}
|
||||
batch_size: 1
|
||||
@@ -0,0 +1,141 @@
|
||||
use_gpu: true
|
||||
log_iter: 5
|
||||
save_dir: output
|
||||
snapshot_epoch: 10
|
||||
weights: output/hrnet_w48_256x192/model_final
|
||||
epoch: 210
|
||||
num_joints: &num_joints 17
|
||||
pixel_std: &pixel_std 200
|
||||
metric: KeyPointTopDownCOCOEval
|
||||
num_classes: 1
|
||||
train_height: &train_height 256
|
||||
train_width: &train_width 192
|
||||
trainsize: &trainsize [*train_width, *train_height]
|
||||
hmsize: &hmsize [48, 64]
|
||||
flip_perm: &flip_perm [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, 14], [15, 16]]
|
||||
|
||||
|
||||
#####model
|
||||
architecture: TopDownHRNet
|
||||
pretrain_weights: https://paddledet.bj.bcebos.com/models/pretrained/Trunc_HRNet_W48_C_pretrained.pdparams
|
||||
|
||||
TopDownHRNet:
|
||||
backbone: HRNet
|
||||
post_process: HRNetPostProcess
|
||||
flip_perm: *flip_perm
|
||||
num_joints: *num_joints
|
||||
width: &width 48
|
||||
loss: KeyPointMSELoss
|
||||
|
||||
HRNet:
|
||||
width: *width
|
||||
freeze_at: -1
|
||||
freeze_norm: false
|
||||
return_idx: [0]
|
||||
|
||||
KeyPointMSELoss:
|
||||
use_target_weight: true
|
||||
|
||||
|
||||
#####optimizer
|
||||
LearningRate:
|
||||
base_lr: 0.0005
|
||||
schedulers:
|
||||
- !PiecewiseDecay
|
||||
milestones: [170, 200]
|
||||
gamma: 0.1
|
||||
- !LinearWarmup
|
||||
start_factor: 0.001
|
||||
steps: 1000
|
||||
|
||||
OptimizerBuilder:
|
||||
optimizer:
|
||||
type: Adam
|
||||
regularizer:
|
||||
factor: 0.0
|
||||
type: L2
|
||||
|
||||
|
||||
#####data
|
||||
TrainDataset:
|
||||
!KeypointTopDownCocoDataset
|
||||
image_dir: train2017
|
||||
anno_path: annotations/person_keypoints_train2017.json
|
||||
dataset_dir: dataset/coco
|
||||
num_joints: *num_joints
|
||||
trainsize: *trainsize
|
||||
pixel_std: *pixel_std
|
||||
use_gt_bbox: True
|
||||
|
||||
|
||||
EvalDataset:
|
||||
!KeypointTopDownCocoDataset
|
||||
image_dir: val2017
|
||||
anno_path: annotations/person_keypoints_val2017.json
|
||||
dataset_dir: dataset/coco
|
||||
bbox_file: bbox.json
|
||||
num_joints: *num_joints
|
||||
trainsize: *trainsize
|
||||
pixel_std: *pixel_std
|
||||
use_gt_bbox: True
|
||||
image_thre: 0.0
|
||||
|
||||
|
||||
TestDataset:
|
||||
!ImageFolder
|
||||
anno_path: dataset/coco/keypoint_imagelist.txt
|
||||
|
||||
worker_num: 2
|
||||
global_mean: &global_mean [0.485, 0.456, 0.406]
|
||||
global_std: &global_std [0.229, 0.224, 0.225]
|
||||
TrainReader:
|
||||
sample_transforms:
|
||||
- RandomFlipHalfBodyTransform:
|
||||
scale: 0.5
|
||||
rot: 40
|
||||
num_joints_half_body: 8
|
||||
prob_half_body: 0.3
|
||||
pixel_std: *pixel_std
|
||||
trainsize: *trainsize
|
||||
upper_body_ids: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
|
||||
flip_pairs: *flip_perm
|
||||
- TopDownAffine:
|
||||
trainsize: *trainsize
|
||||
- ToHeatmapsTopDown_DARK:
|
||||
hmsize: *hmsize
|
||||
sigma: 2
|
||||
batch_transforms:
|
||||
- NormalizeImage:
|
||||
mean: *global_mean
|
||||
std: *global_std
|
||||
is_scale: true
|
||||
- Permute: {}
|
||||
batch_size: 64
|
||||
shuffle: true
|
||||
drop_last: false
|
||||
|
||||
EvalReader:
|
||||
sample_transforms:
|
||||
- TopDownAffine:
|
||||
trainsize: *trainsize
|
||||
batch_transforms:
|
||||
- NormalizeImage:
|
||||
mean: *global_mean
|
||||
std: *global_std
|
||||
is_scale: true
|
||||
- Permute: {}
|
||||
batch_size: 16
|
||||
|
||||
TestReader:
|
||||
inputs_def:
|
||||
image_shape: [3, *train_height, *train_width]
|
||||
sample_transforms:
|
||||
- Decode: {}
|
||||
- TopDownEvalAffine:
|
||||
trainsize: *trainsize
|
||||
- NormalizeImage:
|
||||
mean: *global_mean
|
||||
std: *global_std
|
||||
is_scale: true
|
||||
- Permute: {}
|
||||
batch_size: 1
|
||||
142
paddle_detection/configs/keypoint/hrnet/hrnet_w32_256x192.yml
Normal file
142
paddle_detection/configs/keypoint/hrnet/hrnet_w32_256x192.yml
Normal file
@@ -0,0 +1,142 @@
|
||||
use_gpu: true
|
||||
log_iter: 5
|
||||
save_dir: output
|
||||
snapshot_epoch: 10
|
||||
weights: output/hrnet_w32_256x192/model_final
|
||||
epoch: 210
|
||||
num_joints: &num_joints 17
|
||||
pixel_std: &pixel_std 200
|
||||
metric: KeyPointTopDownCOCOEval
|
||||
num_classes: 1
|
||||
train_height: &train_height 256
|
||||
train_width: &train_width 192
|
||||
trainsize: &trainsize [*train_width, *train_height]
|
||||
hmsize: &hmsize [48, 64]
|
||||
flip_perm: &flip_perm [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, 14], [15, 16]]
|
||||
|
||||
|
||||
#####model
|
||||
architecture: TopDownHRNet
|
||||
pretrain_weights: https://paddledet.bj.bcebos.com/models/pretrained/Trunc_HRNet_W32_C_pretrained.pdparams
|
||||
|
||||
TopDownHRNet:
|
||||
backbone: HRNet
|
||||
post_process: HRNetPostProcess
|
||||
flip_perm: *flip_perm
|
||||
num_joints: *num_joints
|
||||
width: &width 32
|
||||
loss: KeyPointMSELoss
|
||||
|
||||
HRNet:
|
||||
width: *width
|
||||
freeze_at: -1
|
||||
freeze_norm: false
|
||||
return_idx: [0]
|
||||
|
||||
KeyPointMSELoss:
|
||||
use_target_weight: true
|
||||
|
||||
|
||||
#####optimizer
|
||||
LearningRate:
|
||||
base_lr: 0.0005
|
||||
schedulers:
|
||||
- !PiecewiseDecay
|
||||
milestones: [170, 200]
|
||||
gamma: 0.1
|
||||
- !LinearWarmup
|
||||
start_factor: 0.001
|
||||
steps: 1000
|
||||
|
||||
OptimizerBuilder:
|
||||
optimizer:
|
||||
type: Adam
|
||||
regularizer:
|
||||
factor: 0.0
|
||||
type: L2
|
||||
|
||||
|
||||
#####data
|
||||
TrainDataset:
|
||||
!KeypointTopDownCocoDataset
|
||||
image_dir: train2017
|
||||
anno_path: annotations/person_keypoints_train2017.json
|
||||
dataset_dir: dataset/coco
|
||||
num_joints: *num_joints
|
||||
trainsize: *trainsize
|
||||
pixel_std: *pixel_std
|
||||
use_gt_bbox: True
|
||||
|
||||
|
||||
EvalDataset:
|
||||
!KeypointTopDownCocoDataset
|
||||
image_dir: val2017
|
||||
anno_path: annotations/person_keypoints_val2017.json
|
||||
dataset_dir: dataset/coco
|
||||
bbox_file: bbox.json
|
||||
num_joints: *num_joints
|
||||
trainsize: *trainsize
|
||||
pixel_std: *pixel_std
|
||||
use_gt_bbox: True
|
||||
image_thre: 0.0
|
||||
|
||||
|
||||
TestDataset:
|
||||
!ImageFolder
|
||||
anno_path: dataset/coco/keypoint_imagelist.txt
|
||||
|
||||
worker_num: 2
|
||||
global_mean: &global_mean [0.485, 0.456, 0.406]
|
||||
global_std: &global_std [0.229, 0.224, 0.225]
|
||||
TrainReader:
|
||||
sample_transforms:
|
||||
- RandomFlipHalfBodyTransform:
|
||||
scale: 0.5
|
||||
rot: 40
|
||||
num_joints_half_body: 8
|
||||
prob_half_body: 0.3
|
||||
pixel_std: *pixel_std
|
||||
trainsize: *trainsize
|
||||
upper_body_ids: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
|
||||
flip_pairs: *flip_perm
|
||||
- TopDownAffine:
|
||||
trainsize: *trainsize
|
||||
- ToHeatmapsTopDown:
|
||||
hmsize: *hmsize
|
||||
sigma: 2
|
||||
batch_transforms:
|
||||
- NormalizeImage:
|
||||
mean: *global_mean
|
||||
std: *global_std
|
||||
is_scale: true
|
||||
- Permute: {}
|
||||
batch_size: 64
|
||||
shuffle: true
|
||||
drop_last: false
|
||||
|
||||
EvalReader:
|
||||
sample_transforms:
|
||||
- TopDownAffine:
|
||||
trainsize: *trainsize
|
||||
batch_transforms:
|
||||
- NormalizeImage:
|
||||
mean: *global_mean
|
||||
std: *global_std
|
||||
is_scale: true
|
||||
- Permute: {}
|
||||
batch_size: 16
|
||||
|
||||
TestReader:
|
||||
inputs_def:
|
||||
image_shape: [3, *train_height, *train_width]
|
||||
sample_transforms:
|
||||
- Decode: {}
|
||||
- TopDownEvalAffine:
|
||||
trainsize: *trainsize
|
||||
- NormalizeImage:
|
||||
mean: *global_mean
|
||||
std: *global_std
|
||||
is_scale: true
|
||||
- Permute: {}
|
||||
batch_size: 1
|
||||
fuse_normalize: false #whether to fuse normalize layer into model while export model
|
||||
@@ -0,0 +1,132 @@
|
||||
use_gpu: true
|
||||
log_iter: 5
|
||||
save_dir: output
|
||||
snapshot_epoch: 10
|
||||
weights: output/hrnet_w32_256x256_mpii/model_final
|
||||
epoch: 210
|
||||
num_joints: &num_joints 16
|
||||
pixel_std: &pixel_std 200
|
||||
metric: KeyPointTopDownMPIIEval
|
||||
num_classes: 1
|
||||
train_height: &train_height 256
|
||||
train_width: &train_width 256
|
||||
trainsize: &trainsize [*train_width, *train_height]
|
||||
hmsize: &hmsize [64, 64]
|
||||
flip_perm: &flip_perm [[0, 5], [1, 4], [2, 3], [10, 15], [11, 14], [12, 13]]
|
||||
|
||||
#####model
|
||||
architecture: TopDownHRNet
|
||||
pretrain_weights: https://paddledet.bj.bcebos.com/models/pretrained/Trunc_HRNet_W32_C_pretrained.pdparams
|
||||
|
||||
TopDownHRNet:
|
||||
backbone: HRNet
|
||||
post_process: HRNetPostProcess
|
||||
flip_perm: *flip_perm
|
||||
num_joints: *num_joints
|
||||
width: &width 32
|
||||
loss: KeyPointMSELoss
|
||||
|
||||
HRNet:
|
||||
width: *width
|
||||
freeze_at: -1
|
||||
freeze_norm: false
|
||||
return_idx: [0]
|
||||
|
||||
KeyPointMSELoss:
|
||||
use_target_weight: true
|
||||
|
||||
|
||||
#####optimizer
|
||||
LearningRate:
|
||||
base_lr: 0.0005
|
||||
schedulers:
|
||||
- !PiecewiseDecay
|
||||
milestones: [170, 200]
|
||||
gamma: 0.1
|
||||
- !LinearWarmup
|
||||
start_factor: 0.001
|
||||
steps: 1000
|
||||
|
||||
OptimizerBuilder:
|
||||
optimizer:
|
||||
type: Adam
|
||||
regularizer:
|
||||
factor: 0.0
|
||||
type: L2
|
||||
|
||||
|
||||
#####data
|
||||
TrainDataset:
|
||||
!KeypointTopDownMPIIDataset
|
||||
image_dir: images
|
||||
anno_path: annotations/mpii_train.json
|
||||
dataset_dir: dataset/mpii
|
||||
num_joints: *num_joints
|
||||
|
||||
|
||||
EvalDataset:
|
||||
!KeypointTopDownMPIIDataset
|
||||
image_dir: images
|
||||
anno_path: annotations/mpii_val.json
|
||||
dataset_dir: dataset/mpii
|
||||
num_joints: *num_joints
|
||||
|
||||
|
||||
TestDataset:
|
||||
!ImageFolder
|
||||
anno_path: dataset/coco/keypoint_imagelist.txt
|
||||
|
||||
worker_num: 4
|
||||
global_mean: &global_mean [0.485, 0.456, 0.406]
|
||||
global_std: &global_std [0.229, 0.224, 0.225]
|
||||
TrainReader:
|
||||
sample_transforms:
|
||||
- RandomFlipHalfBodyTransform:
|
||||
scale: 0.5
|
||||
rot: 40
|
||||
num_joints_half_body: 8
|
||||
prob_half_body: 0.3
|
||||
pixel_std: *pixel_std
|
||||
trainsize: *trainsize
|
||||
upper_body_ids: [7, 8, 9, 10, 11, 12, 13, 14, 15]
|
||||
flip_pairs: *flip_perm
|
||||
- TopDownAffine:
|
||||
trainsize: *trainsize
|
||||
- ToHeatmapsTopDown:
|
||||
hmsize: *hmsize
|
||||
sigma: 2
|
||||
batch_transforms:
|
||||
- NormalizeImage:
|
||||
mean: *global_mean
|
||||
std: *global_std
|
||||
is_scale: true
|
||||
- Permute: {}
|
||||
batch_size: 64
|
||||
shuffle: true
|
||||
drop_last: false
|
||||
|
||||
EvalReader:
|
||||
sample_transforms:
|
||||
- TopDownAffine:
|
||||
trainsize: *trainsize
|
||||
batch_transforms:
|
||||
- NormalizeImage:
|
||||
mean: *global_mean
|
||||
std: *global_std
|
||||
is_scale: true
|
||||
- Permute: {}
|
||||
batch_size: 16
|
||||
|
||||
TestReader:
|
||||
inputs_def:
|
||||
image_shape: [3, *train_height, *train_width]
|
||||
sample_transforms:
|
||||
- Decode: {}
|
||||
- TopDownEvalAffine:
|
||||
trainsize: *trainsize
|
||||
- NormalizeImage:
|
||||
mean: *global_mean
|
||||
std: *global_std
|
||||
is_scale: true
|
||||
- Permute: {}
|
||||
batch_size: 1
|
||||
142
paddle_detection/configs/keypoint/hrnet/hrnet_w32_384x288.yml
Normal file
142
paddle_detection/configs/keypoint/hrnet/hrnet_w32_384x288.yml
Normal file
@@ -0,0 +1,142 @@
|
||||
use_gpu: true
|
||||
log_iter: 5
|
||||
save_dir: output
|
||||
snapshot_epoch: 10
|
||||
weights: output/hrnet_w32_384x288/model_final
|
||||
epoch: 210
|
||||
num_joints: &num_joints 17
|
||||
pixel_std: &pixel_std 200
|
||||
metric: KeyPointTopDownCOCOEval
|
||||
num_classes: 1
|
||||
train_height: &train_height 384
|
||||
train_width: &train_width 288
|
||||
trainsize: &trainsize [*train_width, *train_height]
|
||||
hmsize: &hmsize [72, 96]
|
||||
flip_perm: &flip_perm [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, 14], [15, 16]]
|
||||
|
||||
|
||||
#####model
|
||||
architecture: TopDownHRNet
|
||||
pretrain_weights: https://paddledet.bj.bcebos.com/models/pretrained/Trunc_HRNet_W32_C_pretrained.pdparams
|
||||
|
||||
TopDownHRNet:
|
||||
backbone: HRNet
|
||||
post_process: HRNetPostProcess
|
||||
flip_perm: *flip_perm
|
||||
num_joints: *num_joints
|
||||
width: &width 32
|
||||
loss: KeyPointMSELoss
|
||||
flip: true
|
||||
|
||||
HRNet:
|
||||
width: *width
|
||||
freeze_at: -1
|
||||
freeze_norm: false
|
||||
return_idx: [0]
|
||||
|
||||
KeyPointMSELoss:
|
||||
use_target_weight: true
|
||||
|
||||
|
||||
#####optimizer
|
||||
LearningRate:
|
||||
base_lr: 0.0005
|
||||
schedulers:
|
||||
- !PiecewiseDecay
|
||||
milestones: [170, 200]
|
||||
gamma: 0.1
|
||||
- !LinearWarmup
|
||||
start_factor: 0.001
|
||||
steps: 1000
|
||||
|
||||
OptimizerBuilder:
|
||||
optimizer:
|
||||
type: Adam
|
||||
regularizer:
|
||||
factor: 0.0
|
||||
type: L2
|
||||
|
||||
|
||||
#####data
|
||||
TrainDataset:
|
||||
!KeypointTopDownCocoDataset
|
||||
image_dir: train2017
|
||||
anno_path: annotations/person_keypoints_train2017.json
|
||||
dataset_dir: dataset/coco
|
||||
num_joints: *num_joints
|
||||
trainsize: *trainsize
|
||||
pixel_std: *pixel_std
|
||||
use_gt_bbox: True
|
||||
|
||||
|
||||
EvalDataset:
|
||||
!KeypointTopDownCocoDataset
|
||||
image_dir: val2017
|
||||
anno_path: annotations/person_keypoints_val2017.json
|
||||
dataset_dir: dataset/coco
|
||||
bbox_file: bbox.json
|
||||
num_joints: *num_joints
|
||||
trainsize: *trainsize
|
||||
pixel_std: *pixel_std
|
||||
use_gt_bbox: True
|
||||
image_thre: 0.0
|
||||
|
||||
|
||||
TestDataset:
|
||||
!ImageFolder
|
||||
anno_path: dataset/coco/keypoint_imagelist.txt
|
||||
|
||||
worker_num: 2
|
||||
global_mean: &global_mean [0.485, 0.456, 0.406]
|
||||
global_std: &global_std [0.229, 0.224, 0.225]
|
||||
TrainReader:
|
||||
sample_transforms:
|
||||
- RandomFlipHalfBodyTransform:
|
||||
scale: 0.5
|
||||
rot: 40
|
||||
num_joints_half_body: 8
|
||||
prob_half_body: 0.3
|
||||
pixel_std: *pixel_std
|
||||
trainsize: *trainsize
|
||||
upper_body_ids: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
|
||||
flip_pairs: *flip_perm
|
||||
- TopDownAffine:
|
||||
trainsize: *trainsize
|
||||
- ToHeatmapsTopDown:
|
||||
hmsize: *hmsize
|
||||
sigma: 2
|
||||
batch_transforms:
|
||||
- NormalizeImage:
|
||||
mean: *global_mean
|
||||
std: *global_std
|
||||
is_scale: true
|
||||
- Permute: {}
|
||||
batch_size: 64
|
||||
shuffle: true
|
||||
drop_last: false
|
||||
|
||||
EvalReader:
|
||||
sample_transforms:
|
||||
- TopDownAffine:
|
||||
trainsize: *trainsize
|
||||
batch_transforms:
|
||||
- NormalizeImage:
|
||||
mean: *global_mean
|
||||
std: *global_std
|
||||
is_scale: true
|
||||
- Permute: {}
|
||||
batch_size: 16
|
||||
|
||||
TestReader:
|
||||
inputs_def:
|
||||
image_shape: [3, *train_height, *train_width]
|
||||
sample_transforms:
|
||||
- Decode: {}
|
||||
- TopDownEvalAffine:
|
||||
trainsize: *trainsize
|
||||
- NormalizeImage:
|
||||
mean: *global_mean
|
||||
std: *global_std
|
||||
is_scale: true
|
||||
- Permute: {}
|
||||
batch_size: 1
|
||||
Reference in New Issue
Block a user