@ -0,0 +1,166 @@ |
|||||
|
_base_ = [ |
||||
|
'../../../../_base_/default_runtime.py', |
||||
|
'../../../../_base_/datasets/coco.py' |
||||
|
] |
||||
|
evaluation = dict(interval=10, metric='mAP', save_best='AP') |
||||
|
|
||||
|
optimizer = dict( |
||||
|
type='Adam', |
||||
|
lr=5e-4, |
||||
|
) |
||||
|
optimizer_config = dict(grad_clip=None) |
||||
|
# learning policy |
||||
|
lr_config = dict( |
||||
|
policy='step', |
||||
|
warmup='linear', |
||||
|
warmup_iters=500, |
||||
|
warmup_ratio=0.001, |
||||
|
step=[170, 200]) |
||||
|
total_epochs = 210 |
||||
|
channel_cfg = dict( |
||||
|
num_output_channels=17, |
||||
|
dataset_joints=17, |
||||
|
dataset_channel=[ |
||||
|
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16], |
||||
|
], |
||||
|
inference_channel=[ |
||||
|
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 |
||||
|
]) |
||||
|
|
||||
|
# model settings |
||||
|
model = dict( |
||||
|
type='TopDown', |
||||
|
pretrained='https://download.openmmlab.com/mmpose/' |
||||
|
'pretrain_models/hrnet_w32-36af842e.pth', |
||||
|
backbone=dict( |
||||
|
type='HRNet', |
||||
|
in_channels=3, |
||||
|
extra=dict( |
||||
|
stage1=dict( |
||||
|
num_modules=1, |
||||
|
num_branches=1, |
||||
|
block='BOTTLENECK', |
||||
|
num_blocks=(4, ), |
||||
|
num_channels=(64, )), |
||||
|
stage2=dict( |
||||
|
num_modules=1, |
||||
|
num_branches=2, |
||||
|
block='BASIC', |
||||
|
num_blocks=(4, 4), |
||||
|
num_channels=(32, 64)), |
||||
|
stage3=dict( |
||||
|
num_modules=4, |
||||
|
num_branches=3, |
||||
|
block='BASIC', |
||||
|
num_blocks=(4, 4, 4), |
||||
|
num_channels=(32, 64, 128)), |
||||
|
stage4=dict( |
||||
|
num_modules=3, |
||||
|
num_branches=4, |
||||
|
block='BASIC', |
||||
|
num_blocks=(4, 4, 4, 4), |
||||
|
num_channels=(32, 64, 128, 256))), |
||||
|
), |
||||
|
keypoint_head=dict( |
||||
|
type='TopdownHeatmapSimpleHead', |
||||
|
in_channels=32, |
||||
|
out_channels=channel_cfg['num_output_channels'], |
||||
|
num_deconv_layers=0, |
||||
|
extra=dict(final_conv_kernel=1, ), |
||||
|
loss_keypoint=dict(type='JointsMSELoss', use_target_weight=True)), |
||||
|
train_cfg=dict(), |
||||
|
test_cfg=dict( |
||||
|
flip_test=True, |
||||
|
post_process='default', |
||||
|
shift_heatmap=True, |
||||
|
modulate_kernel=11)) |
||||
|
|
||||
|
data_root = '/root/autodl-tmp/dataset/hengdian' |
||||
|
|
||||
|
data_cfg = dict( |
||||
|
image_size=[192, 256], |
||||
|
heatmap_size=[48, 64], |
||||
|
num_output_channels=channel_cfg['num_output_channels'], |
||||
|
num_joints=channel_cfg['dataset_joints'], |
||||
|
dataset_channel=channel_cfg['dataset_channel'], |
||||
|
inference_channel=channel_cfg['inference_channel'], |
||||
|
soft_nms=False, |
||||
|
nms_thr=1.0, |
||||
|
oks_thr=0.9, |
||||
|
vis_thr=0.2, |
||||
|
use_gt_bbox=True, |
||||
|
det_bbox_thr=0.0, |
||||
|
bbox_file='', |
||||
|
) |
||||
|
|
||||
|
train_pipeline = [ |
||||
|
dict(type='LoadImageFromFile'), |
||||
|
dict(type='TopDownRandomFlip', flip_prob=0.5), |
||||
|
dict( |
||||
|
type='TopDownHalfBodyTransform', |
||||
|
num_joints_half_body=8, |
||||
|
prob_half_body=0.3), |
||||
|
dict( |
||||
|
type='TopDownGetRandomScaleRotation', rot_factor=40, scale_factor=0.5), |
||||
|
dict(type='TopDownAffine'), |
||||
|
dict(type='ToTensor'), |
||||
|
dict( |
||||
|
type='NormalizeTensor', |
||||
|
mean=[0.485, 0.456, 0.406], |
||||
|
std=[0.229, 0.224, 0.225]), |
||||
|
dict(type='TopDownGenerateTarget', sigma=2), |
||||
|
dict( |
||||
|
type='Collect', |
||||
|
keys=['img', 'target', 'target_weight'], |
||||
|
meta_keys=[ |
||||
|
'image_file', 'joints_3d', 'joints_3d_visible', 'center', 'scale', |
||||
|
'rotation', 'bbox_score', 'flip_pairs' |
||||
|
]), |
||||
|
] |
||||
|
|
||||
|
val_pipeline = [ |
||||
|
dict(type='LoadImageFromFile'), |
||||
|
dict(type='TopDownAffine'), |
||||
|
dict(type='ToTensor'), |
||||
|
dict( |
||||
|
type='NormalizeTensor', |
||||
|
mean=[0.485, 0.456, 0.406], |
||||
|
std=[0.229, 0.224, 0.225]), |
||||
|
dict( |
||||
|
type='Collect', |
||||
|
keys=['img'], |
||||
|
meta_keys=[ |
||||
|
'image_file', 'center', 'scale', 'rotation', 'bbox_score', |
||||
|
'flip_pairs' |
||||
|
]), |
||||
|
] |
||||
|
|
||||
|
test_pipeline = val_pipeline |
||||
|
|
||||
|
data = dict( |
||||
|
samples_per_gpu=64, |
||||
|
workers_per_gpu=2, |
||||
|
val_dataloader=dict(samples_per_gpu=32), |
||||
|
test_dataloader=dict(samples_per_gpu=32), |
||||
|
train=dict( |
||||
|
type='TopDownCocoDataset', |
||||
|
ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', |
||||
|
img_prefix=f'{data_root}/train2017/', |
||||
|
data_cfg=data_cfg, |
||||
|
pipeline=train_pipeline, |
||||
|
dataset_info={{_base_.dataset_info}}), |
||||
|
val=dict( |
||||
|
type='TopDownCocoDataset', |
||||
|
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', |
||||
|
img_prefix=f'{data_root}/val2017/', |
||||
|
data_cfg=data_cfg, |
||||
|
pipeline=val_pipeline, |
||||
|
dataset_info={{_base_.dataset_info}}), |
||||
|
test=dict( |
||||
|
type='TopDownCocoDataset', |
||||
|
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', |
||||
|
img_prefix=f'{data_root}/val2017/', |
||||
|
data_cfg=data_cfg, |
||||
|
pipeline=test_pipeline, |
||||
|
dataset_info={{_base_.dataset_info}}), |
||||
|
) |
||||
@ -0,0 +1,166 @@ |
|||||
|
_base_ = [ |
||||
|
'../../../../_base_/default_runtime.py', |
||||
|
'../../../../_base_/datasets/coco.py' |
||||
|
] |
||||
|
evaluation = dict(interval=10, metric='mAP', save_best='AP') |
||||
|
|
||||
|
optimizer = dict( |
||||
|
type='Adam', |
||||
|
lr=5e-4, |
||||
|
) |
||||
|
optimizer_config = dict(grad_clip=None) |
||||
|
# learning policy |
||||
|
lr_config = dict( |
||||
|
policy='step', |
||||
|
warmup='linear', |
||||
|
warmup_iters=500, |
||||
|
warmup_ratio=0.001, |
||||
|
step=[170, 200]) |
||||
|
total_epochs = 210 |
||||
|
channel_cfg = dict( |
||||
|
num_output_channels=17, |
||||
|
dataset_joints=17, |
||||
|
dataset_channel=[ |
||||
|
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16], |
||||
|
], |
||||
|
inference_channel=[ |
||||
|
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 |
||||
|
]) |
||||
|
|
||||
|
# model settings |
||||
|
model = dict( |
||||
|
type='TopDown', |
||||
|
pretrained='https://download.openmmlab.com/mmpose/' |
||||
|
'pretrain_models/hrnet_w32-36af842e.pth', |
||||
|
backbone=dict( |
||||
|
type='HRNet', |
||||
|
in_channels=3, |
||||
|
extra=dict( |
||||
|
stage1=dict( |
||||
|
num_modules=1, |
||||
|
num_branches=1, |
||||
|
block='BOTTLENECK', |
||||
|
num_blocks=(4, ), |
||||
|
num_channels=(64, )), |
||||
|
stage2=dict( |
||||
|
num_modules=1, |
||||
|
num_branches=2, |
||||
|
block='BASIC', |
||||
|
num_blocks=(4, 4), |
||||
|
num_channels=(32, 64)), |
||||
|
stage3=dict( |
||||
|
num_modules=4, |
||||
|
num_branches=3, |
||||
|
block='BASIC', |
||||
|
num_blocks=(4, 4, 4), |
||||
|
num_channels=(32, 64, 128)), |
||||
|
stage4=dict( |
||||
|
num_modules=3, |
||||
|
num_branches=4, |
||||
|
block='BASIC', |
||||
|
num_blocks=(4, 4, 4, 4), |
||||
|
num_channels=(32, 64, 128, 256))), |
||||
|
), |
||||
|
keypoint_head=dict( |
||||
|
type='TopdownHeatmapSimpleHead', |
||||
|
in_channels=32, |
||||
|
out_channels=channel_cfg['num_output_channels'], |
||||
|
num_deconv_layers=0, |
||||
|
extra=dict(final_conv_kernel=1, ), |
||||
|
loss_keypoint=dict(type='JointsMSELoss', use_target_weight=True)), |
||||
|
train_cfg=dict(), |
||||
|
test_cfg=dict( |
||||
|
flip_test=True, |
||||
|
post_process='default', |
||||
|
shift_heatmap=True, |
||||
|
modulate_kernel=11)) |
||||
|
|
||||
|
data_root = '/root/autodl-tmp/dataset/hengdian' |
||||
|
|
||||
|
data_cfg = dict( |
||||
|
image_size=[288, 384], |
||||
|
heatmap_size=[72, 96], |
||||
|
num_output_channels=channel_cfg['num_output_channels'], |
||||
|
num_joints=channel_cfg['dataset_joints'], |
||||
|
dataset_channel=channel_cfg['dataset_channel'], |
||||
|
inference_channel=channel_cfg['inference_channel'], |
||||
|
soft_nms=False, |
||||
|
nms_thr=1.0, |
||||
|
oks_thr=0.9, |
||||
|
vis_thr=0.2, |
||||
|
use_gt_bbox=True, |
||||
|
det_bbox_thr=0.0, |
||||
|
bbox_file='', |
||||
|
) |
||||
|
|
||||
|
train_pipeline = [ |
||||
|
dict(type='LoadImageFromFile'), |
||||
|
dict(type='TopDownRandomFlip', flip_prob=0.5), |
||||
|
dict( |
||||
|
type='TopDownHalfBodyTransform', |
||||
|
num_joints_half_body=8, |
||||
|
prob_half_body=0.3), |
||||
|
dict( |
||||
|
type='TopDownGetRandomScaleRotation', rot_factor=40, scale_factor=0.5), |
||||
|
dict(type='TopDownAffine'), |
||||
|
dict(type='ToTensor'), |
||||
|
dict( |
||||
|
type='NormalizeTensor', |
||||
|
mean=[0.485, 0.456, 0.406], |
||||
|
std=[0.229, 0.224, 0.225]), |
||||
|
dict(type='TopDownGenerateTarget', sigma=3), |
||||
|
dict( |
||||
|
type='Collect', |
||||
|
keys=['img', 'target', 'target_weight'], |
||||
|
meta_keys=[ |
||||
|
'image_file', 'joints_3d', 'joints_3d_visible', 'center', 'scale', |
||||
|
'rotation', 'bbox_score', 'flip_pairs' |
||||
|
]), |
||||
|
] |
||||
|
|
||||
|
val_pipeline = [ |
||||
|
dict(type='LoadImageFromFile'), |
||||
|
dict(type='TopDownAffine'), |
||||
|
dict(type='ToTensor'), |
||||
|
dict( |
||||
|
type='NormalizeTensor', |
||||
|
mean=[0.485, 0.456, 0.406], |
||||
|
std=[0.229, 0.224, 0.225]), |
||||
|
dict( |
||||
|
type='Collect', |
||||
|
keys=['img'], |
||||
|
meta_keys=[ |
||||
|
'image_file', 'center', 'scale', 'rotation', 'bbox_score', |
||||
|
'flip_pairs' |
||||
|
]), |
||||
|
] |
||||
|
|
||||
|
test_pipeline = val_pipeline |
||||
|
|
||||
|
data = dict( |
||||
|
samples_per_gpu=64, |
||||
|
workers_per_gpu=2, |
||||
|
val_dataloader=dict(samples_per_gpu=32), |
||||
|
test_dataloader=dict(samples_per_gpu=32), |
||||
|
train=dict( |
||||
|
type='TopDownCocoDataset', |
||||
|
ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', |
||||
|
img_prefix=f'{data_root}/train2017/', |
||||
|
data_cfg=data_cfg, |
||||
|
pipeline=train_pipeline, |
||||
|
dataset_info={{_base_.dataset_info}}), |
||||
|
val=dict( |
||||
|
type='TopDownCocoDataset', |
||||
|
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', |
||||
|
img_prefix=f'{data_root}/val2017/', |
||||
|
data_cfg=data_cfg, |
||||
|
pipeline=val_pipeline, |
||||
|
dataset_info={{_base_.dataset_info}}), |
||||
|
test=dict( |
||||
|
type='TopDownCocoDataset', |
||||
|
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', |
||||
|
img_prefix=f'{data_root}/val2017/', |
||||
|
data_cfg=data_cfg, |
||||
|
pipeline=test_pipeline, |
||||
|
dataset_info={{_base_.dataset_info}}), |
||||
|
) |
||||
@ -0,0 +1,166 @@ |
|||||
|
_base_ = [ |
||||
|
'../../../../_base_/default_runtime.py', |
||||
|
'../../../../_base_/datasets/coco.py' |
||||
|
] |
||||
|
evaluation = dict(interval=10, metric='mAP', save_best='AP') |
||||
|
|
||||
|
optimizer = dict( |
||||
|
type='Adam', |
||||
|
lr=5e-4, |
||||
|
) |
||||
|
optimizer_config = dict(grad_clip=None) |
||||
|
# learning policy |
||||
|
lr_config = dict( |
||||
|
policy='step', |
||||
|
warmup='linear', |
||||
|
warmup_iters=500, |
||||
|
warmup_ratio=0.001, |
||||
|
step=[170, 200]) |
||||
|
total_epochs = 210 |
||||
|
channel_cfg = dict( |
||||
|
num_output_channels=17, |
||||
|
dataset_joints=17, |
||||
|
dataset_channel=[ |
||||
|
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16], |
||||
|
], |
||||
|
inference_channel=[ |
||||
|
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 |
||||
|
]) |
||||
|
|
||||
|
# model settings |
||||
|
model = dict( |
||||
|
type='TopDown', |
||||
|
pretrained='https://download.openmmlab.com/mmpose/' |
||||
|
'pretrain_models/hrnet_w48-8ef0771d.pth', |
||||
|
backbone=dict( |
||||
|
type='HRNet', |
||||
|
in_channels=3, |
||||
|
extra=dict( |
||||
|
stage1=dict( |
||||
|
num_modules=1, |
||||
|
num_branches=1, |
||||
|
block='BOTTLENECK', |
||||
|
num_blocks=(4, ), |
||||
|
num_channels=(64, )), |
||||
|
stage2=dict( |
||||
|
num_modules=1, |
||||
|
num_branches=2, |
||||
|
block='BASIC', |
||||
|
num_blocks=(4, 4), |
||||
|
num_channels=(48, 96)), |
||||
|
stage3=dict( |
||||
|
num_modules=4, |
||||
|
num_branches=3, |
||||
|
block='BASIC', |
||||
|
num_blocks=(4, 4, 4), |
||||
|
num_channels=(48, 96, 192)), |
||||
|
stage4=dict( |
||||
|
num_modules=3, |
||||
|
num_branches=4, |
||||
|
block='BASIC', |
||||
|
num_blocks=(4, 4, 4, 4), |
||||
|
num_channels=(48, 96, 192, 384))), |
||||
|
), |
||||
|
keypoint_head=dict( |
||||
|
type='TopdownHeatmapSimpleHead', |
||||
|
in_channels=48, |
||||
|
out_channels=channel_cfg['num_output_channels'], |
||||
|
num_deconv_layers=0, |
||||
|
extra=dict(final_conv_kernel=1, ), |
||||
|
loss_keypoint=dict(type='JointsMSELoss', use_target_weight=True)), |
||||
|
train_cfg=dict(), |
||||
|
test_cfg=dict( |
||||
|
flip_test=True, |
||||
|
post_process='default', |
||||
|
shift_heatmap=True, |
||||
|
modulate_kernel=11)) |
||||
|
|
||||
|
data_root = '/root/autodl-tmp/dataset/hengdian' |
||||
|
|
||||
|
data_cfg = dict( |
||||
|
image_size=[192, 256], |
||||
|
heatmap_size=[48, 64], |
||||
|
num_output_channels=channel_cfg['num_output_channels'], |
||||
|
num_joints=channel_cfg['dataset_joints'], |
||||
|
dataset_channel=channel_cfg['dataset_channel'], |
||||
|
inference_channel=channel_cfg['inference_channel'], |
||||
|
soft_nms=False, |
||||
|
nms_thr=1.0, |
||||
|
oks_thr=0.9, |
||||
|
vis_thr=0.2, |
||||
|
use_gt_bbox=True, |
||||
|
det_bbox_thr=0.0, |
||||
|
bbox_file='', |
||||
|
) |
||||
|
|
||||
|
train_pipeline = [ |
||||
|
dict(type='LoadImageFromFile'), |
||||
|
dict(type='TopDownRandomFlip', flip_prob=0.5), |
||||
|
dict( |
||||
|
type='TopDownHalfBodyTransform', |
||||
|
num_joints_half_body=8, |
||||
|
prob_half_body=0.3), |
||||
|
dict( |
||||
|
type='TopDownGetRandomScaleRotation', rot_factor=40, scale_factor=0.5), |
||||
|
dict(type='TopDownAffine'), |
||||
|
dict(type='ToTensor'), |
||||
|
dict( |
||||
|
type='NormalizeTensor', |
||||
|
mean=[0.485, 0.456, 0.406], |
||||
|
std=[0.229, 0.224, 0.225]), |
||||
|
dict(type='TopDownGenerateTarget', sigma=2), |
||||
|
dict( |
||||
|
type='Collect', |
||||
|
keys=['img', 'target', 'target_weight'], |
||||
|
meta_keys=[ |
||||
|
'image_file', 'joints_3d', 'joints_3d_visible', 'center', 'scale', |
||||
|
'rotation', 'bbox_score', 'flip_pairs' |
||||
|
]), |
||||
|
] |
||||
|
|
||||
|
val_pipeline = [ |
||||
|
dict(type='LoadImageFromFile'), |
||||
|
dict(type='TopDownAffine'), |
||||
|
dict(type='ToTensor'), |
||||
|
dict( |
||||
|
type='NormalizeTensor', |
||||
|
mean=[0.485, 0.456, 0.406], |
||||
|
std=[0.229, 0.224, 0.225]), |
||||
|
dict( |
||||
|
type='Collect', |
||||
|
keys=['img'], |
||||
|
meta_keys=[ |
||||
|
'image_file', 'center', 'scale', 'rotation', 'bbox_score', |
||||
|
'flip_pairs' |
||||
|
]), |
||||
|
] |
||||
|
|
||||
|
test_pipeline = val_pipeline |
||||
|
|
||||
|
data = dict( |
||||
|
samples_per_gpu=32, |
||||
|
workers_per_gpu=2, |
||||
|
val_dataloader=dict(samples_per_gpu=32), |
||||
|
test_dataloader=dict(samples_per_gpu=32), |
||||
|
train=dict( |
||||
|
type='TopDownCocoDataset', |
||||
|
ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', |
||||
|
img_prefix=f'{data_root}/train2017/', |
||||
|
data_cfg=data_cfg, |
||||
|
pipeline=train_pipeline, |
||||
|
dataset_info={{_base_.dataset_info}}), |
||||
|
val=dict( |
||||
|
type='TopDownCocoDataset', |
||||
|
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', |
||||
|
img_prefix=f'{data_root}/val2017/', |
||||
|
data_cfg=data_cfg, |
||||
|
pipeline=val_pipeline, |
||||
|
dataset_info={{_base_.dataset_info}}), |
||||
|
test=dict( |
||||
|
type='TopDownCocoDataset', |
||||
|
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', |
||||
|
img_prefix=f'{data_root}/val2017/', |
||||
|
data_cfg=data_cfg, |
||||
|
pipeline=test_pipeline, |
||||
|
dataset_info={{_base_.dataset_info}}), |
||||
|
) |
||||
@ -0,0 +1,166 @@ |
|||||
|
_base_ = [ |
||||
|
'../../../../_base_/default_runtime.py', |
||||
|
'../../../../_base_/datasets/coco.py' |
||||
|
] |
||||
|
evaluation = dict(interval=10, metric='mAP', save_best='AP') |
||||
|
|
||||
|
optimizer = dict( |
||||
|
type='Adam', |
||||
|
lr=5e-4, |
||||
|
) |
||||
|
optimizer_config = dict(grad_clip=None) |
||||
|
# learning policy |
||||
|
lr_config = dict( |
||||
|
policy='step', |
||||
|
warmup='linear', |
||||
|
warmup_iters=500, |
||||
|
warmup_ratio=0.001, |
||||
|
step=[170, 200]) |
||||
|
total_epochs = 210 |
||||
|
channel_cfg = dict( |
||||
|
num_output_channels=17, |
||||
|
dataset_joints=17, |
||||
|
dataset_channel=[ |
||||
|
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16], |
||||
|
], |
||||
|
inference_channel=[ |
||||
|
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 |
||||
|
]) |
||||
|
|
||||
|
# model settings |
||||
|
model = dict( |
||||
|
type='TopDown', |
||||
|
pretrained='https://download.openmmlab.com/mmpose/' |
||||
|
'pretrain_models/hrnet_w48-8ef0771d.pth', |
||||
|
backbone=dict( |
||||
|
type='HRNet', |
||||
|
in_channels=3, |
||||
|
extra=dict( |
||||
|
stage1=dict( |
||||
|
num_modules=1, |
||||
|
num_branches=1, |
||||
|
block='BOTTLENECK', |
||||
|
num_blocks=(4, ), |
||||
|
num_channels=(64, )), |
||||
|
stage2=dict( |
||||
|
num_modules=1, |
||||
|
num_branches=2, |
||||
|
block='BASIC', |
||||
|
num_blocks=(4, 4), |
||||
|
num_channels=(48, 96)), |
||||
|
stage3=dict( |
||||
|
num_modules=4, |
||||
|
num_branches=3, |
||||
|
block='BASIC', |
||||
|
num_blocks=(4, 4, 4), |
||||
|
num_channels=(48, 96, 192)), |
||||
|
stage4=dict( |
||||
|
num_modules=3, |
||||
|
num_branches=4, |
||||
|
block='BASIC', |
||||
|
num_blocks=(4, 4, 4, 4), |
||||
|
num_channels=(48, 96, 192, 384))), |
||||
|
), |
||||
|
keypoint_head=dict( |
||||
|
type='TopdownHeatmapSimpleHead', |
||||
|
in_channels=48, |
||||
|
out_channels=channel_cfg['num_output_channels'], |
||||
|
num_deconv_layers=0, |
||||
|
extra=dict(final_conv_kernel=1, ), |
||||
|
loss_keypoint=dict(type='JointsMSELoss', use_target_weight=True)), |
||||
|
train_cfg=dict(), |
||||
|
test_cfg=dict( |
||||
|
flip_test=True, |
||||
|
post_process='default', |
||||
|
shift_heatmap=True, |
||||
|
modulate_kernel=11)) |
||||
|
|
||||
|
data_root = '/root/autodl-tmp/dataset/hengdian' |
||||
|
|
||||
|
data_cfg = dict( |
||||
|
image_size=[288, 384], |
||||
|
heatmap_size=[72, 96], |
||||
|
num_output_channels=channel_cfg['num_output_channels'], |
||||
|
num_joints=channel_cfg['dataset_joints'], |
||||
|
dataset_channel=channel_cfg['dataset_channel'], |
||||
|
inference_channel=channel_cfg['inference_channel'], |
||||
|
soft_nms=False, |
||||
|
nms_thr=1.0, |
||||
|
oks_thr=0.9, |
||||
|
vis_thr=0.2, |
||||
|
use_gt_bbox=True, |
||||
|
det_bbox_thr=0.0, |
||||
|
bbox_file='', |
||||
|
) |
||||
|
|
||||
|
train_pipeline = [ |
||||
|
dict(type='LoadImageFromFile'), |
||||
|
dict(type='TopDownRandomFlip', flip_prob=0.5), |
||||
|
dict( |
||||
|
type='TopDownHalfBodyTransform', |
||||
|
num_joints_half_body=8, |
||||
|
prob_half_body=0.3), |
||||
|
dict( |
||||
|
type='TopDownGetRandomScaleRotation', rot_factor=40, scale_factor=0.5), |
||||
|
dict(type='TopDownAffine'), |
||||
|
dict(type='ToTensor'), |
||||
|
dict( |
||||
|
type='NormalizeTensor', |
||||
|
mean=[0.485, 0.456, 0.406], |
||||
|
std=[0.229, 0.224, 0.225]), |
||||
|
dict(type='TopDownGenerateTarget', sigma=3), |
||||
|
dict( |
||||
|
type='Collect', |
||||
|
keys=['img', 'target', 'target_weight'], |
||||
|
meta_keys=[ |
||||
|
'image_file', 'joints_3d', 'joints_3d_visible', 'center', 'scale', |
||||
|
'rotation', 'bbox_score', 'flip_pairs' |
||||
|
]), |
||||
|
] |
||||
|
|
||||
|
val_pipeline = [ |
||||
|
dict(type='LoadImageFromFile'), |
||||
|
dict(type='TopDownAffine'), |
||||
|
dict(type='ToTensor'), |
||||
|
dict( |
||||
|
type='NormalizeTensor', |
||||
|
mean=[0.485, 0.456, 0.406], |
||||
|
std=[0.229, 0.224, 0.225]), |
||||
|
dict( |
||||
|
type='Collect', |
||||
|
keys=['img'], |
||||
|
meta_keys=[ |
||||
|
'image_file', 'center', 'scale', 'rotation', 'bbox_score', |
||||
|
'flip_pairs' |
||||
|
]), |
||||
|
] |
||||
|
|
||||
|
test_pipeline = val_pipeline |
||||
|
|
||||
|
data = dict( |
||||
|
samples_per_gpu=32, |
||||
|
workers_per_gpu=2, |
||||
|
val_dataloader=dict(samples_per_gpu=32), |
||||
|
test_dataloader=dict(samples_per_gpu=32), |
||||
|
train=dict( |
||||
|
type='TopDownCocoDataset', |
||||
|
ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', |
||||
|
img_prefix=f'{data_root}/train2017/', |
||||
|
data_cfg=data_cfg, |
||||
|
pipeline=train_pipeline, |
||||
|
dataset_info={{_base_.dataset_info}}), |
||||
|
val=dict( |
||||
|
type='TopDownCocoDataset', |
||||
|
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', |
||||
|
img_prefix=f'{data_root}/val2017/', |
||||
|
data_cfg=data_cfg, |
||||
|
pipeline=val_pipeline, |
||||
|
dataset_info={{_base_.dataset_info}}), |
||||
|
test=dict( |
||||
|
type='TopDownCocoDataset', |
||||
|
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', |
||||
|
img_prefix=f'{data_root}/val2017/', |
||||
|
data_cfg=data_cfg, |
||||
|
pipeline=test_pipeline, |
||||
|
dataset_info={{_base_.dataset_info}}), |
||||
|
) |
||||
|
After Width: | Height: | Size: 1.4 MiB |
|
After Width: | Height: | Size: 1.4 MiB |
|
After Width: | Height: | Size: 1.4 MiB |
|
After Width: | Height: | Size: 1.4 MiB |
|
After Width: | Height: | Size: 413 KiB |
|
After Width: | Height: | Size: 435 KiB |
|
After Width: | Height: | Size: 427 KiB |
|
After Width: | Height: | Size: 451 KiB |
@ -0,0 +1,252 @@ |
|||||
|
{ |
||||
|
"info": { |
||||
|
"description": "For testing hengdian dataset only.", |
||||
|
"year": 2024, |
||||
|
"date_created": "2020/06/20" |
||||
|
}, |
||||
|
"licenses": [], |
||||
|
"categories": [ |
||||
|
{ |
||||
|
"supercategory": "person", |
||||
|
"id": 1, |
||||
|
"name": "person", |
||||
|
"keypoints": [ |
||||
|
"nose", |
||||
|
"left_eye", |
||||
|
"right_eye", |
||||
|
"left_ear", |
||||
|
"right_ear", |
||||
|
"left_shoulder", |
||||
|
"right_shoulder", |
||||
|
"left_elbow", |
||||
|
"right_elbow", |
||||
|
"left_wrist", |
||||
|
"right_wrist", |
||||
|
"left_hip", |
||||
|
"right_hip", |
||||
|
"left_knee", |
||||
|
"right_knee", |
||||
|
"left_ankle", |
||||
|
"right_ankle" |
||||
|
], |
||||
|
"skeleton": [ |
||||
|
[ |
||||
|
16, |
||||
|
14 |
||||
|
], |
||||
|
[ |
||||
|
14, |
||||
|
12 |
||||
|
], |
||||
|
[ |
||||
|
17, |
||||
|
15 |
||||
|
], |
||||
|
[ |
||||
|
15, |
||||
|
13 |
||||
|
], |
||||
|
[ |
||||
|
12, |
||||
|
13 |
||||
|
], |
||||
|
[ |
||||
|
6, |
||||
|
12 |
||||
|
], |
||||
|
[ |
||||
|
7, |
||||
|
13 |
||||
|
], |
||||
|
[ |
||||
|
6, |
||||
|
7 |
||||
|
], |
||||
|
[ |
||||
|
6, |
||||
|
8 |
||||
|
], |
||||
|
[ |
||||
|
7, |
||||
|
9 |
||||
|
], |
||||
|
[ |
||||
|
8, |
||||
|
10 |
||||
|
], |
||||
|
[ |
||||
|
9, |
||||
|
11 |
||||
|
], |
||||
|
[ |
||||
|
2, |
||||
|
3 |
||||
|
], |
||||
|
[ |
||||
|
1, |
||||
|
2 |
||||
|
], |
||||
|
[ |
||||
|
1, |
||||
|
3 |
||||
|
], |
||||
|
[ |
||||
|
2, |
||||
|
4 |
||||
|
], |
||||
|
[ |
||||
|
3, |
||||
|
5 |
||||
|
], |
||||
|
[ |
||||
|
4, |
||||
|
6 |
||||
|
], |
||||
|
[ |
||||
|
5, |
||||
|
7 |
||||
|
] |
||||
|
] |
||||
|
} |
||||
|
], |
||||
|
"images": [ |
||||
|
{ |
||||
|
"file_name": "1.png", |
||||
|
"height": 766, |
||||
|
"width": 1022, |
||||
|
"id": 1 |
||||
|
}, |
||||
|
{ |
||||
|
"file_name": "2.png", |
||||
|
"height": 753, |
||||
|
"width": 1006, |
||||
|
"id": 2 |
||||
|
}, |
||||
|
{ |
||||
|
"file_name": "3.png", |
||||
|
"height": 754, |
||||
|
"width": 1009, |
||||
|
"id": 3 |
||||
|
}, |
||||
|
{ |
||||
|
"file_name": "4.png", |
||||
|
"height": 754, |
||||
|
"width": 1003, |
||||
|
"id": 4 |
||||
|
}, |
||||
|
{ |
||||
|
"file_name": "5.png", |
||||
|
"height": 750, |
||||
|
"width": 1007, |
||||
|
"id": 5 |
||||
|
}, |
||||
|
{ |
||||
|
"file_name": "6.png", |
||||
|
"height": 756, |
||||
|
"width": 1008, |
||||
|
"id": 6 |
||||
|
}, |
||||
|
{ |
||||
|
"file_name": "7.png", |
||||
|
"height": 754, |
||||
|
"width": 1001, |
||||
|
"id": 7 |
||||
|
}, |
||||
|
{ |
||||
|
"file_name": "8.png", |
||||
|
"height": 757, |
||||
|
"width": 1008, |
||||
|
"id": 8 |
||||
|
} |
||||
|
], |
||||
|
"annotations": [ |
||||
|
{ |
||||
|
"image_id": 1, |
||||
|
"bbox": [ |
||||
|
361, |
||||
|
268, |
||||
|
209, |
||||
|
390 |
||||
|
], |
||||
|
"category_id": 1, |
||||
|
"id": 1 |
||||
|
}, |
||||
|
{ |
||||
|
"image_id": 2, |
||||
|
"bbox": [ |
||||
|
422, |
||||
|
260, |
||||
|
136, |
||||
|
399 |
||||
|
], |
||||
|
"category_id": 1, |
||||
|
"id": 2 |
||||
|
}, |
||||
|
{ |
||||
|
"image_id": 3, |
||||
|
"bbox": [ |
||||
|
423, |
||||
|
251, |
||||
|
205, |
||||
|
432 |
||||
|
], |
||||
|
"category_id": 1, |
||||
|
"id": 3 |
||||
|
}, |
||||
|
{ |
||||
|
"image_id": 4, |
||||
|
"bbox": [ |
||||
|
501, |
||||
|
288, |
||||
|
145, |
||||
|
388 |
||||
|
], |
||||
|
"category_id": 1, |
||||
|
"id": 4 |
||||
|
}, |
||||
|
{ |
||||
|
"image_id": 5, |
||||
|
"bbox": [ |
||||
|
343, |
||||
|
249, |
||||
|
233, |
||||
|
409 |
||||
|
], |
||||
|
"category_id": 1, |
||||
|
"id": 5 |
||||
|
}, |
||||
|
{ |
||||
|
"image_id": 6, |
||||
|
"bbox": [ |
||||
|
500, |
||||
|
275, |
||||
|
155, |
||||
|
405 |
||||
|
], |
||||
|
"category_id": 1, |
||||
|
"id": 6 |
||||
|
}, |
||||
|
{ |
||||
|
"image_id": 7, |
||||
|
"bbox": [ |
||||
|
417, |
||||
|
252, |
||||
|
150, |
||||
|
413 |
||||
|
], |
||||
|
"category_id": 1, |
||||
|
"id": 7 |
||||
|
}, |
||||
|
{ |
||||
|
"image_id": 8, |
||||
|
"bbox": [ |
||||
|
425, |
||||
|
220, |
||||
|
216, |
||||
|
470 |
||||
|
], |
||||
|
"category_id": 1, |
||||
|
"id": 8 |
||||
|
} |
||||
|
] |
||||
|
} |
||||
@ -0,0 +1,212 @@ |
|||||
|
{ |
||||
|
"info": { |
||||
|
"description": "For testing hengdian dataset only.", |
||||
|
"year": 2024, |
||||
|
"date_created": "2020/06/20" |
||||
|
}, |
||||
|
"licenses": [], |
||||
|
"categories": [ |
||||
|
{ |
||||
|
"supercategory": "person", |
||||
|
"id": 1, |
||||
|
"name": "person", |
||||
|
"keypoints": [ |
||||
|
"nose", |
||||
|
"left_eye", |
||||
|
"right_eye", |
||||
|
"left_ear", |
||||
|
"right_ear", |
||||
|
"left_shoulder", |
||||
|
"right_shoulder", |
||||
|
"left_elbow", |
||||
|
"right_elbow", |
||||
|
"left_wrist", |
||||
|
"right_wrist", |
||||
|
"left_hip", |
||||
|
"right_hip", |
||||
|
"left_knee", |
||||
|
"right_knee", |
||||
|
"left_ankle", |
||||
|
"right_ankle" |
||||
|
], |
||||
|
"skeleton": [ |
||||
|
[ |
||||
|
16, |
||||
|
14 |
||||
|
], |
||||
|
[ |
||||
|
14, |
||||
|
12 |
||||
|
], |
||||
|
[ |
||||
|
17, |
||||
|
15 |
||||
|
], |
||||
|
[ |
||||
|
15, |
||||
|
13 |
||||
|
], |
||||
|
[ |
||||
|
12, |
||||
|
13 |
||||
|
], |
||||
|
[ |
||||
|
6, |
||||
|
12 |
||||
|
], |
||||
|
[ |
||||
|
7, |
||||
|
13 |
||||
|
], |
||||
|
[ |
||||
|
6, |
||||
|
7 |
||||
|
], |
||||
|
[ |
||||
|
6, |
||||
|
8 |
||||
|
], |
||||
|
[ |
||||
|
7, |
||||
|
9 |
||||
|
], |
||||
|
[ |
||||
|
8, |
||||
|
10 |
||||
|
], |
||||
|
[ |
||||
|
9, |
||||
|
11 |
||||
|
], |
||||
|
[ |
||||
|
2, |
||||
|
3 |
||||
|
], |
||||
|
[ |
||||
|
1, |
||||
|
2 |
||||
|
], |
||||
|
[ |
||||
|
1, |
||||
|
3 |
||||
|
], |
||||
|
[ |
||||
|
2, |
||||
|
4 |
||||
|
], |
||||
|
[ |
||||
|
3, |
||||
|
5 |
||||
|
], |
||||
|
[ |
||||
|
4, |
||||
|
6 |
||||
|
], |
||||
|
[ |
||||
|
5, |
||||
|
7 |
||||
|
] |
||||
|
] |
||||
|
} |
||||
|
], |
||||
|
"images": [ |
||||
|
{ |
||||
|
"file_name": "1.png", |
||||
|
"height": 766, |
||||
|
"width": 1022, |
||||
|
"id": 1 |
||||
|
}, |
||||
|
{ |
||||
|
"file_name": "2.png", |
||||
|
"height": 753, |
||||
|
"width": 1006, |
||||
|
"id": 2 |
||||
|
}, |
||||
|
{ |
||||
|
"file_name": "3.png", |
||||
|
"height": 754, |
||||
|
"width": 1009, |
||||
|
"id": 3 |
||||
|
}, |
||||
|
{ |
||||
|
"file_name": "4.png", |
||||
|
"height": 754, |
||||
|
"width": 1003, |
||||
|
"id": 4 |
||||
|
}, |
||||
|
{ |
||||
|
"file_name": "5.png", |
||||
|
"height": 750, |
||||
|
"width": 1007, |
||||
|
"id": 5 |
||||
|
}, |
||||
|
{ |
||||
|
"file_name": "6.png", |
||||
|
"height": 756, |
||||
|
"width": 1008, |
||||
|
"id": 6 |
||||
|
}, |
||||
|
{ |
||||
|
"file_name": "7.png", |
||||
|
"height": 754, |
||||
|
"width": 1001, |
||||
|
"id": 7 |
||||
|
}, |
||||
|
{ |
||||
|
"file_name": "8.png", |
||||
|
"height": 757, |
||||
|
"width": 1008, |
||||
|
"id": 8 |
||||
|
} |
||||
|
], |
||||
|
"annotations": [ |
||||
|
{ |
||||
|
"image_id": 1, |
||||
|
"bbox": [0, 0, 1022, 766], |
||||
|
"category_id": 1, |
||||
|
"id": 1 |
||||
|
}, |
||||
|
{ |
||||
|
"image_id": 2, |
||||
|
"bbox": [0, 0, 1006, 753], |
||||
|
"category_id": 1, |
||||
|
"id": 2 |
||||
|
}, |
||||
|
{ |
||||
|
"image_id": 3, |
||||
|
"bbox": [0, 0, 1009, 754], |
||||
|
"category_id": 1, |
||||
|
"id": 3 |
||||
|
}, |
||||
|
{ |
||||
|
"image_id": 4, |
||||
|
"bbox": [0, 0, 1003, 754], |
||||
|
"category_id": 1, |
||||
|
"id": 4 |
||||
|
}, |
||||
|
{ |
||||
|
"image_id": 5, |
||||
|
"bbox": [0, 0, 1007, 750], |
||||
|
"category_id": 1, |
||||
|
"id": 5 |
||||
|
}, |
||||
|
{ |
||||
|
"image_id": 6, |
||||
|
"bbox": [0, 0, 1008, 756], |
||||
|
"category_id": 1, |
||||
|
"id": 6 |
||||
|
}, |
||||
|
{ |
||||
|
"image_id": 7, |
||||
|
"bbox": [0, 0, 1001, 754], |
||||
|
"category_id": 1, |
||||
|
"id": 7 |
||||
|
}, |
||||
|
{ |
||||
|
"image_id": 8, |
||||
|
"bbox": [0, 0, 1008, 757], |
||||
|
"category_id": 1, |
||||
|
"id": 8 |
||||
|
} |
||||
|
] |
||||
|
} |
||||