maap3d
model-zoo
animal
birds
ModelZoo / ape /pose /ape-pose.py
alexhang's picture
Publish MAAP3D model zoo draft with pretrained bird and ape models
11da341 verified
Raw History Blame Contribute Delete
26.9 kB
auto_scale_lr = dict(base_batch_size=512) backend_args = dict(backend='local') codec = dict( heatmap_size=( 64, 64, ), input_size=( 256, 256, ), sigma=2, type='MSRAHeatmap') custom_hooks = [ dict(type='SyncBuffersHook'), ] data_mode = 'topdown' data_root = '/media/alexchan/RavenBackup/Bonobo/Annotations/KeypointAnnotation/COCO_July/images' dataset_type = 'CocoDataset' default_hooks = dict( badcase=dict( badcase_thr=5, enable=False, metric_type='loss', out_dir='badcase', type='BadCaseAnalysisHook'), checkpoint=dict( interval=1, rule='greater', save_best='PCK', type='CheckpointHook'), logger=dict(interval=50, type='LoggerHook'), param_scheduler=dict(type='ParamSchedulerHook'), sampler_seed=dict(type='DistSamplerSeedHook'), timer=dict(type='IterTimerHook'), visualization=dict(enable=False, type='PoseVisualizationHook')) default_scope = 'mmpose' env_cfg = dict( cudnn_benchmark=False, dist_cfg=dict(backend='nccl'), mp_cfg=dict(mp_start_method='fork', opencv_num_threads=0)) load_from = '/media/alexchan/DataSSD/SuperApeDataset/Chimact_OAP_Weights/best_PCK_epoch_80.pth' log_level = 'INFO' log_processor = dict( by_epoch=True, num_digits=6, type='LogProcessor', window_size=50) model = dict( backbone=dict( extra=dict( stage1=dict( block='BOTTLENECK', num_blocks=(4, ), num_branches=1, num_channels=(64, ), num_modules=1), stage2=dict( block='BASIC', num_blocks=( 4, 4, ), num_branches=2, num_channels=( 32, 64, ), num_modules=1), stage3=dict( block='BASIC', num_blocks=( 4, 4, 4, ), num_branches=3, num_channels=( 32, 64, 128, ), num_modules=4), stage4=dict( block='BASIC', num_blocks=( 4, 4, 4, 4, ), num_branches=4, num_channels=( 32, 64, 128, 256, ), num_modules=3)), in_channels=3, init_cfg=dict( checkpoint= 'https://download.openmmlab.com/mmpose/pretrain_models/hrnet_w32-36af842e.pth', type='Pretrained'), type='HRNet'), data_preprocessor=dict( bgr_to_rgb=True, mean=[ 123.675, 116.28, 103.53, ], std=[ 58.395, 57.12, 57.375, ], type='PoseDataPreprocessor'), head=dict( decoder=dict( heatmap_size=( 64, 64, ), input_size=( 256, 256, ), sigma=2, type='MSRAHeatmap'), deconv_out_channels=None, in_channels=32, loss=dict(type='KeypointMSELoss', use_target_weight=True), out_channels=16, type='HeatmapHead'), test_cfg=dict(flip_mode='heatmap', flip_test=True, shift_heatmap=True), type='TopdownPoseEstimator') optim_wrapper = dict(optimizer=dict(lr=0.0005, type='AdamW')) param_scheduler = [ dict( begin=0, by_epoch=False, end=500, start_factor=0.001, type='LinearLR'), dict( begin=0, by_epoch=True, end=210, gamma=0.1, milestones=[ 170, 200, ], type='MultiStepLR'), ] resume = False test_cfg = dict() test_dataloader = dict( batch_size=24, dataset=dict( ann_file= '/media/alexchan/RavenBackup/Bonobo/Annotations/KeypointAnnotation/COCO_July/annotations/val_labels.json', bbox_file=None, data_mode='topdown', data_prefix=dict(img=''), data_root= '/media/alexchan/RavenBackup/Bonobo/Annotations/KeypointAnnotation/COCO_July/images', metainfo=dict( dataset_name='coco', joint_weights=[ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, ], keypoint_info=dict({ 0: dict(color=[ 255, 0, 0, ], id=0, name='root', swap=''), 1: dict(color=[ 255, 0, 0, ], id=1, name='rankle', swap='lankle'), 10: dict(color=[ 255, 0, 0, ], id=10, name='rshoul', swap='lshoul'), 11: dict(color=[ 255, 0, 0, ], id=11, name='relbow', swap='lelbow'), 12: dict(color=[ 255, 0, 0, ], id=12, name='rwrist', swap='lwrist'), 13: dict(color=[ 255, 0, 0, ], id=13, name='lshoul', swap='rshoul'), 14: dict(color=[ 255, 0, 0, ], id=14, name='lelbow', swap='relbow'), 15: dict(color=[ 255, 0, 0, ], id=15, name='lwrist', swap='rwrist'), 2: dict(color=[ 255, 0, 0, ], id=2, name='rknee', swap='lknee'), 3: dict(color=[ 255, 0, 0, ], id=3, name='lknee', swap='rknee'), 4: dict(color=[ 255, 0, 0, ], id=4, name='lankle', swap='rankle'), 5: dict(color=[ 255, 0, 0, ], id=5, name='neck', swap=''), 6: dict(color=[ 255, 0, 0, ], id=6, name='ulip', swap=''), 7: dict(color=[ 255, 0, 0, ], id=7, name='llip', swap=''), 8: dict(color=[ 255, 0, 0, ], id=8, name='reye', swap='leye'), 9: dict(color=[ 255, 0, 0, ], id=9, name='leye', swap='reye') }), sigmas=[ 0.025, 0.025, 0.025, 0.025, 0.025, 0.025, 0.025, 0.025, 0.025, 0.025, 0.025, 0.025, 0.025, 0.025, 0.025, 0.025, ], skeleton_info=dict({ 0: dict(color=[ 255, 0, 0, ], link=( 'root', 'neck', )), 1: dict(color=[ 255, 0, 0, ], link=( 'neck', 'rshoul', )), 10: dict(color=[ 255, 0, 0, ], link=( 'lknee', 'lankle', )), 2: dict(color=[ 255, 0, 0, ], link=( 'rshoul', 'relbow', )), 3: dict(color=[ 255, 0, 0, ], link=( 'relbow', 'rwrist', )), 4: dict(color=[ 255, 0, 0, ], link=( 'neck', 'lshoul', )), 5: dict(color=[ 255, 0, 0, ], link=( 'lshoul', 'lelbow', )), 6: dict(color=[ 255, 0, 0, ], link=( 'lelbow', 'lwrist', )), 7: dict(color=[ 255, 0, 0, ], link=( 'root', 'rknee', )), 8: dict(color=[ 255, 0, 0, ], link=( 'rknee', 'rankle', )), 9: dict(color=[ 255, 0, 0, ], link=( 'root', 'lknee', )) })), pipeline=[ dict(type='LoadImage'), dict(type='GetBBoxCenterScale'), dict(input_size=( 256, 256, ), type='TopdownAffine'), dict(type='PackPoseInputs'), ], test_mode=True, type='CocoDataset'), drop_last=False, num_workers=2, persistent_workers=True, sampler=dict(round_up=False, shuffle=False, type='DefaultSampler')) test_evaluator = [ dict(thr=0.05, type='PCKAccuracy'), dict(type='AUC'), ] train_cfg = dict(by_epoch=True, max_epochs=50, val_interval=1) train_dataloader = dict( batch_size=32, dataset=dict( ann_file= '/media/alexchan/RavenBackup/Bonobo/Annotations/KeypointAnnotation/COCO_July/annotations/train_labels.json', data_mode='topdown', data_prefix=dict(img=''), data_root= '/media/alexchan/RavenBackup/Bonobo/Annotations/KeypointAnnotation/COCO_July/images', metainfo=dict( dataset_name='coco', joint_weights=[ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, ], keypoint_info=dict({ 0: dict(color=[ 255, 0, 0, ], id=0, name='root', swap=''), 1: dict(color=[ 255, 0, 0, ], id=1, name='rankle', swap='lankle'), 10: dict(color=[ 255, 0, 0, ], id=10, name='rshoul', swap='lshoul'), 11: dict(color=[ 255, 0, 0, ], id=11, name='relbow', swap='lelbow'), 12: dict(color=[ 255, 0, 0, ], id=12, name='rwrist', swap='lwrist'), 13: dict(color=[ 255, 0, 0, ], id=13, name='lshoul', swap='rshoul'), 14: dict(color=[ 255, 0, 0, ], id=14, name='lelbow', swap='relbow'), 15: dict(color=[ 255, 0, 0, ], id=15, name='lwrist', swap='rwrist'), 2: dict(color=[ 255, 0, 0, ], id=2, name='rknee', swap='lknee'), 3: dict(color=[ 255, 0, 0, ], id=3, name='lknee', swap='rknee'), 4: dict(color=[ 255, 0, 0, ], id=4, name='lankle', swap='rankle'), 5: dict(color=[ 255, 0, 0, ], id=5, name='neck', swap=''), 6: dict(color=[ 255, 0, 0, ], id=6, name='ulip', swap=''), 7: dict(color=[ 255, 0, 0, ], id=7, name='llip', swap=''), 8: dict(color=[ 255, 0, 0, ], id=8, name='reye', swap='leye'), 9: dict(color=[ 255, 0, 0, ], id=9, name='leye', swap='reye') }), sigmas=[ 0.025, 0.025, 0.025, 0.025, 0.025, 0.025, 0.025, 0.025, 0.025, 0.025, 0.025, 0.025, 0.025, 0.025, 0.025, 0.025, ], skeleton_info=dict({ 0: dict(color=[ 255, 0, 0, ], link=( 'root', 'neck', )), 1: dict(color=[ 255, 0, 0, ], link=( 'neck', 'rshoul', )), 10: dict(color=[ 255, 0, 0, ], link=( 'lknee', 'lankle', )), 2: dict(color=[ 255, 0, 0, ], link=( 'rshoul', 'relbow', )), 3: dict(color=[ 255, 0, 0, ], link=( 'relbow', 'rwrist', )), 4: dict(color=[ 255, 0, 0, ], link=( 'neck', 'lshoul', )), 5: dict(color=[ 255, 0, 0, ], link=( 'lshoul', 'lelbow', )), 6: dict(color=[ 255, 0, 0, ], link=( 'lelbow', 'lwrist', )), 7: dict(color=[ 255, 0, 0, ], link=( 'root', 'rknee', )), 8: dict(color=[ 255, 0, 0, ], link=( 'rknee', 'rankle', )), 9: dict(color=[ 255, 0, 0, ], link=( 'root', 'lknee', )) })), pipeline=[ dict(type='LoadImage'), dict(type='GetBBoxCenterScale'), dict(direction='horizontal', type='RandomFlip'), dict(type='RandomHalfBody'), dict(type='RandomBBoxTransform'), dict(input_size=( 256, 256, ), type='TopdownAffine'), dict( encoder=dict( heatmap_size=( 64, 64, ), input_size=( 256, 256, ), sigma=2, type='MSRAHeatmap'), type='GenerateTarget'), dict(type='PackPoseInputs'), ], type='CocoDataset'), num_workers=2, persistent_workers=True, sampler=dict(shuffle=True, type='DefaultSampler')) train_pipeline = [ dict(type='LoadImage'), dict(type='GetBBoxCenterScale'), dict(direction='horizontal', type='RandomFlip'), dict(type='RandomHalfBody'), dict(type='RandomBBoxTransform'), dict(input_size=( 256, 256, ), type='TopdownAffine'), dict( encoder=dict( heatmap_size=( 64, 64, ), input_size=( 256, 256, ), sigma=2, type='MSRAHeatmap'), type='GenerateTarget'), dict(type='PackPoseInputs'), ] val_cfg = dict() val_dataloader = dict( batch_size=24, dataset=dict( ann_file= '/media/alexchan/RavenBackup/Bonobo/Annotations/KeypointAnnotation/COCO_July/annotations/val_labels.json', bbox_file=None, data_mode='topdown', data_prefix=dict(img=''), data_root= '/media/alexchan/RavenBackup/Bonobo/Annotations/KeypointAnnotation/COCO_July/images', metainfo=dict( dataset_name='coco', joint_weights=[ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, ], keypoint_info=dict({ 0: dict(color=[ 255, 0, 0, ], id=0, name='root', swap=''), 1: dict(color=[ 255, 0, 0, ], id=1, name='rankle', swap='lankle'), 10: dict(color=[ 255, 0, 0, ], id=10, name='rshoul', swap='lshoul'), 11: dict(color=[ 255, 0, 0, ], id=11, name='relbow', swap='lelbow'), 12: dict(color=[ 255, 0, 0, ], id=12, name='rwrist', swap='lwrist'), 13: dict(color=[ 255, 0, 0, ], id=13, name='lshoul', swap='rshoul'), 14: dict(color=[ 255, 0, 0, ], id=14, name='lelbow', swap='relbow'), 15: dict(color=[ 255, 0, 0, ], id=15, name='lwrist', swap='rwrist'), 2: dict(color=[ 255, 0, 0, ], id=2, name='rknee', swap='lknee'), 3: dict(color=[ 255, 0, 0, ], id=3, name='lknee', swap='rknee'), 4: dict(color=[ 255, 0, 0, ], id=4, name='lankle', swap='rankle'), 5: dict(color=[ 255, 0, 0, ], id=5, name='neck', swap=''), 6: dict(color=[ 255, 0, 0, ], id=6, name='ulip', swap=''), 7: dict(color=[ 255, 0, 0, ], id=7, name='llip', swap=''), 8: dict(color=[ 255, 0, 0, ], id=8, name='reye', swap='leye'), 9: dict(color=[ 255, 0, 0, ], id=9, name='leye', swap='reye') }), sigmas=[ 0.025, 0.025, 0.025, 0.025, 0.025, 0.025, 0.025, 0.025, 0.025, 0.025, 0.025, 0.025, 0.025, 0.025, 0.025, 0.025, ], skeleton_info=dict({ 0: dict(color=[ 255, 0, 0, ], link=( 'root', 'neck', )), 1: dict(color=[ 255, 0, 0, ], link=( 'neck', 'rshoul', )), 10: dict(color=[ 255, 0, 0, ], link=( 'lknee', 'lankle', )), 2: dict(color=[ 255, 0, 0, ], link=( 'rshoul', 'relbow', )), 3: dict(color=[ 255, 0, 0, ], link=( 'relbow', 'rwrist', )), 4: dict(color=[ 255, 0, 0, ], link=( 'neck', 'lshoul', )), 5: dict(color=[ 255, 0, 0, ], link=( 'lshoul', 'lelbow', )), 6: dict(color=[ 255, 0, 0, ], link=( 'lelbow', 'lwrist', )), 7: dict(color=[ 255, 0, 0, ], link=( 'root', 'rknee', )), 8: dict(color=[ 255, 0, 0, ], link=( 'rknee', 'rankle', )), 9: dict(color=[ 255, 0, 0, ], link=( 'root', 'lknee', )) })), pipeline=[ dict(type='LoadImage'), dict(type='GetBBoxCenterScale'), dict(input_size=( 256, 256, ), type='TopdownAffine'), dict(type='PackPoseInputs'), ], test_mode=True, type='CocoDataset'), drop_last=False, num_workers=2, persistent_workers=True, sampler=dict(round_up=False, shuffle=False, type='DefaultSampler')) val_evaluator = [ dict(thr=0.05, type='PCKAccuracy'), dict(type='AUC'), ] val_pipeline = [ dict(type='LoadImage'), dict(type='GetBBoxCenterScale'), dict(input_size=( 256, 256, ), type='TopdownAffine'), dict(type='PackPoseInputs'), ] vis_backends = [ dict(type='LocalVisBackend'), ] visualizer = dict( name='visualizer', type='PoseLocalVisualizer', vis_backends=[ dict(type='LocalVisBackend'), ]) work_dir = '/media/alexchan/DataSSD/SuperApeDataset/FineTuned_bonobo_weights'
auto_scale_lr = dict(base_batch_size=512)
backend_args = dict(backend='local')
codec = dict(
heatmap_size=(
64,
64,
),
input_size=(
256,
256,
),
sigma=2,
type='MSRAHeatmap')
custom_hooks = [
dict(type='SyncBuffersHook'),
]
data_mode = 'topdown'
data_root = '/media/alexchan/RavenBackup/Bonobo/Annotations/KeypointAnnotation/COCO_July/images'
dataset_type = 'CocoDataset'
default_hooks = dict(
badcase=dict(
badcase_thr=5,
enable=False,
metric_type='loss',
out_dir='badcase',
type='BadCaseAnalysisHook'),
checkpoint=dict(
interval=1, rule='greater', save_best='PCK', type='CheckpointHook'),
logger=dict(interval=50, type='LoggerHook'),
param_scheduler=dict(type='ParamSchedulerHook'),
sampler_seed=dict(type='DistSamplerSeedHook'),
timer=dict(type='IterTimerHook'),
visualization=dict(enable=False, type='PoseVisualizationHook'))
default_scope = 'mmpose'
env_cfg = dict(
cudnn_benchmark=False,
dist_cfg=dict(backend='nccl'),
mp_cfg=dict(mp_start_method='fork', opencv_num_threads=0))
load_from = '/media/alexchan/DataSSD/SuperApeDataset/Chimact_OAP_Weights/best_PCK_epoch_80.pth'
log_level = 'INFO'
log_processor = dict(
by_epoch=True, num_digits=6, type='LogProcessor', window_size=50)
model = dict(
backbone=dict(
extra=dict(
stage1=dict(
block='BOTTLENECK',
num_blocks=(4, ),
num_branches=1,
num_channels=(64, ),
num_modules=1),
stage2=dict(
block='BASIC',
num_blocks=(
4,
4,
),
num_branches=2,
num_channels=(
32,
64,
),
num_modules=1),
stage3=dict(
block='BASIC',
num_blocks=(
4,
4,
4,
),
num_branches=3,
num_channels=(
32,
64,
128,
),
num_modules=4),
stage4=dict(
block='BASIC',
num_blocks=(
4,
4,
4,
4,
),
num_branches=4,
num_channels=(
32,
64,
128,
256,
),
num_modules=3)),
in_channels=3,
init_cfg=dict(
checkpoint=
'https://download.openmmlab.com/mmpose/pretrain_models/hrnet_w32-36af842e.pth',
type='Pretrained'),
type='HRNet'),
data_preprocessor=dict(