configs/pose/hand/hrnet_w18_coco_wholebody_hand_256x256_dark.py [92:189]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        shift_heatmap=True,
        modulate_kernel=11))

data_root = 'data/coco'

data_cfg = dict(
    image_size=[256, 256],
    heatmap_size=[64, 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'],
)

train_pipeline = [
    # dict(type='TopDownGetBboxCenterScale', padding=1.25),
    dict(type='TopDownRandomFlip', flip_prob=0.5),
    dict(
        type='TopDownGetRandomScaleRotation', rot_factor=30,
        scale_factor=0.25),
    dict(type='TopDownAffine'),
    dict(type='MMToTensor'),
    dict(
        type='NormalizeTensor',
        mean=[0.485, 0.456, 0.406],
        std=[0.229, 0.224, 0.225]),
    dict(type='TopDownGenerateTarget', sigma=3),
    dict(
        type='PoseCollect',
        keys=['img', 'target', 'target_weight'],
        meta_keys=[
            'image_file', 'image_id', 'joints_3d', 'joints_3d_visible',
            'center', 'scale', 'rotation', 'flip_pairs'
        ])
]

val_pipeline = [
    dict(type='TopDownAffine'),
    dict(type='MMToTensor'),
    dict(
        type='NormalizeTensor',
        mean=[0.485, 0.456, 0.406],
        std=[0.229, 0.224, 0.225]),
    dict(
        type='PoseCollect',
        keys=['img'],
        meta_keys=[
            'image_file', 'image_id', 'center', 'scale', 'rotation',
            'flip_pairs'
        ])
]

test_pipeline = val_pipeline
data_source_cfg = dict(type='HandCocoPoseTopDownSource', data_cfg=data_cfg)

data = dict(
    imgs_per_gpu=32,  # for train
    workers_per_gpu=2,  # for train
    # imgs_per_gpu=1,  # for test
    # workers_per_gpu=1,  # for test
    val_dataloader=dict(samples_per_gpu=32),
    test_dataloader=dict(samples_per_gpu=32),
    train=dict(
        type='HandCocoWholeBodyDataset',
        data_source=dict(
            ann_file=f'{data_root}/annotations/coco_wholebody_train_v1.0.json',
            img_prefix=f'{data_root}/train2017/',
            **data_source_cfg),
        pipeline=train_pipeline),
    val=dict(
        type='HandCocoWholeBodyDataset',
        data_source=dict(
            ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json',
            img_prefix=f'{data_root}/val2017/',
            test_mode=True,
            **data_source_cfg),
        pipeline=val_pipeline),
    test=dict(
        type='HandCocoWholeBodyDataset',
        data_source=dict(
            ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json',
            img_prefix=f'{data_root}/val2017/',
            test_mode=True,
            **data_source_cfg),
        pipeline=val_pipeline),
)

eval_config = dict(interval=10, metric='PCK', save_best='PCK')
evaluator_args = dict(
    metric_names=['PCK', 'AUC', 'EPE', 'NME'], pck_thr=0.2, auc_nor=30)
eval_pipelines = [
    dict(
        mode='test',
        data=dict(**data['val'], imgs_per_gpu=1),
        evaluators=[dict(type='KeyPointEvaluator', **evaluator_args)])
]
export = dict(use_jit=False)
checkpoint_sync_export = True
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



