欢迎光临散文网 会员登陆 & 注册

MMPOSE

2023-03-17 09:36 作者:熊二爱光头强丫  | 我要投稿

MMPOSE是一个基于PyTorch实现的目标姿态估计框架,configs文件主要是用于配置训练和测试的参数,包括网络架构、数据集路径、学习率、批量大小等等。下面简单介绍一下MMPOSE的configs文件。

MMPOSE的configs文件通常由两个主要部分组成:default和具体任务的配置。default是基础配置,包含了各种共享的参数,如数据集、模型架构、训练优化器、调试模式等。而任务特定的配置则包含了特定任务的参数,如数据增强方式、训练数据集路径、评估方式等。


# fp16 settingsfp16 = Noneoptimizer_config = dict(type='adam', lr=0.001) optimizer = dict(type='Adam', lr=0.001, weight_decay=0.0001) lr_config = dict(policy='step', step=[6, 8]) total_epochs = 10# data settingsdata_root = 'data/coco/'data = dict(    samples_per_gpu=4,    workers_per_gpu=4,    train=dict(        type='TopDownCocoDataset',        ann_file=data_root + 'annotations/person_keypoints_train2017.json',        img_prefix=data_root + 'train2017/',        data_cfg=dict(            num_joints=17,            heatmap_size=[64, 64],            num_output_channels=17,            joint_names=[                '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'            ],            coco_dir=data_root),        pipeline=[            dict(type='LoadImageFromFile'),            dict(type='TopDownRandomFlip', flip_prob=0.5),            dict(                type='TopDownRandomAffine',                scale_range=[0.7, 1.3],                rot_range=[-40, 40],                shear_range=[-40, 40]),            dict(                type='TopDownGetRandomColor',                color_jitter=dict(                    brightness=0.3,                    contrast=0.3,                    saturation=0.3,                    hue=0.1)),            dict(                type='TopDownGenerateTarget', sigma=2),            dict(                type='Collect',                keys=['img', 'target', 'target_weight'],                meta_keys=[                    'image_file', 'joints_3d', 'joints_3d_visibility', 'center', 'scale',                    'rotation', 'flip_pairs', 'flip_index']),            dict(type='ToTensor', keys=['img', 'target', 'target_weight'])        ]),    val=dict(        type='TopDownCocoDataset',        ann_file=data_root + 'annotations/person_keypoints_val2017.json',        img_prefix=data_root + 'val2017/',        data_cfg=dict(            num_joints=17,            heatmap_size=[64, 64],            num_output_channels=17,            joint_names=[                'nose', 'left_eye', 'right_eye',


MMPOSE的评论 (共 条)

分享到微博请遵守国家法律