Download Weights/hrnet/hrnet.py from MAAP3D/SampleData: direct link, hf CLI and curl.
- Browser
- Download file 15.4 kB
-
https://huggingface.co/datasets/MAAP3D/SampleData/resolve/main/Weights/hrnet/hrnet.py
- Command line
-
hf download hf://datasets/MAAP3D/SampleData/Weights/hrnet/hrnet.py
-
curl -L -o hrnet.py https://huggingface.co/datasets/MAAP3D/SampleData/resolve/main/Weights/hrnet/hrnet.py
15.4 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 = '/home/alexchan/Documents/MAAP3D_Toolbox/data/SampleAnnotations/' | |
| dataset_type = 'CocoDataset' | |
| default_hooks = dict( | |
| badcase=dict( | |
| badcase_thr=5, | |
| enable=False, | |
| metric_type='loss', | |
| out_dir='badcase', | |
| type='BadCaseAnalysisHook'), | |
| checkpoint=dict( | |
| interval=10, 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 = None | |
| 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=8, | |
| 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=5, | |
| dataset=dict( | |
| ann_file= | |
| '/home/alexchan/Documents/MAAP3D_Toolbox/data/SampleAnnotations/COCO_Val.json', | |
| bbox_file=None, | |
| data_mode='topdown', | |
| data_prefix=dict(img=''), | |
| data_root= | |
| '/home/alexchan/Documents/MAAP3D_Toolbox/data/SampleAnnotations/', | |
| metainfo=dict( | |
| dataset_name='coco', | |
| joint_weights=[ | |
| 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='bd_shoulder_left', | |
| swap='bd_shoulder_right'), | |
| 1: | |
| dict( | |
| color=[ | |
| 255, | |
| 0, | |
| 0, | |
| ], | |
| id=1, | |
| name='bd_shoulder_right', | |
| swap='bd_shoulder_left'), | |
| 2: | |
| dict(color=[ | |
| 255, | |
| 0, | |
| 0, | |
| ], id=2, name='bd_tail_base', swap=''), | |
| 3: | |
| dict(color=[ | |
| 255, | |
| 0, | |
| 0, | |
| ], id=3, name='bd_tail_tip', swap=''), | |
| 4: | |
| dict(color=[ | |
| 255, | |
| 0, | |
| 0, | |
| ], id=4, name='hd_bill_base', swap=''), | |
| 5: | |
| dict(color=[ | |
| 255, | |
| 0, | |
| 0, | |
| ], id=5, name='hd_bill_tip', swap=''), | |
| 6: | |
| dict( | |
| color=[ | |
| 255, | |
| 0, | |
| 0, | |
| ], | |
| id=6, | |
| name='hd_eye_left', | |
| swap='hd_eye_right'), | |
| 7: | |
| dict( | |
| color=[ | |
| 255, | |
| 0, | |
| 0, | |
| ], | |
| id=7, | |
| name='hd_eye_right', | |
| swap='hd_eye_left') | |
| }), | |
| sigmas=[ | |
| 0.025, | |
| 0.025, | |
| 0.025, | |
| 0.025, | |
| 0.025, | |
| 0.025, | |
| 0.025, | |
| 0.025, | |
| ], | |
| skeleton_info=dict()), | |
| 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=10) | |
| train_dataloader = dict( | |
| batch_size=5, | |
| dataset=dict( | |
| ann_file= | |
| '/home/alexchan/Documents/MAAP3D_Toolbox/data/SampleAnnotations/COCO_Train.json', | |
| data_mode='topdown', | |
| data_prefix=dict(img=''), | |
| data_root= | |
| '/home/alexchan/Documents/MAAP3D_Toolbox/data/SampleAnnotations/', | |
| metainfo=dict( | |
| dataset_name='coco', | |
| joint_weights=[ | |
| 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='bd_shoulder_left', | |
| swap='bd_shoulder_right'), | |
| 1: | |
| dict( | |
| color=[ | |
| 255, | |
| 0, | |
| 0, | |
| ], | |
| id=1, | |
| name='bd_shoulder_right', | |
| swap='bd_shoulder_left'), | |
| 2: | |
| dict(color=[ | |
| 255, | |
| 0, | |
| 0, | |
| ], id=2, name='bd_tail_base', swap=''), | |
| 3: | |
| dict(color=[ | |
| 255, | |
| 0, | |
| 0, | |
| ], id=3, name='bd_tail_tip', swap=''), | |
| 4: | |
| dict(color=[ | |
| 255, | |
| 0, | |
| 0, | |
| ], id=4, name='hd_bill_base', swap=''), | |
| 5: | |
| dict(color=[ | |
| 255, | |
| 0, | |
| 0, | |
| ], id=5, name='hd_bill_tip', swap=''), | |
| 6: | |
| dict( | |
| color=[ | |
| 255, | |
| 0, | |
| 0, | |
| ], | |
| id=6, | |
| name='hd_eye_left', | |
| swap='hd_eye_right'), | |
| 7: | |
| dict( | |
| color=[ | |
| 255, | |
| 0, | |
| 0, | |
| ], | |
| id=7, | |
| name='hd_eye_right', | |
| swap='hd_eye_left') | |
| }), | |
| sigmas=[ | |
| 0.025, | |
| 0.025, | |
| 0.025, | |
| 0.025, | |
| 0.025, | |
| 0.025, | |
| 0.025, | |
| 0.025, | |
| ], | |
| skeleton_info=dict()), | |
| 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=5, | |
| dataset=dict( | |
| ann_file= | |
| '/home/alexchan/Documents/MAAP3D_Toolbox/data/SampleAnnotations/COCO_Val.json', | |
| bbox_file=None, | |
| data_mode='topdown', | |
| data_prefix=dict(img=''), | |
| data_root= | |
| '/home/alexchan/Documents/MAAP3D_Toolbox/data/SampleAnnotations/', | |
| metainfo=dict( | |
| dataset_name='coco', | |
| joint_weights=[ | |
| 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='bd_shoulder_left', | |
| swap='bd_shoulder_right'), | |
| 1: | |
| dict( | |
| color=[ | |
| 255, | |
| 0, | |
| 0, | |
| ], | |
| id=1, | |
| name='bd_shoulder_right', | |
| swap='bd_shoulder_left'), | |
| 2: | |
| dict(color=[ | |
| 255, | |
| 0, | |
| 0, | |
| ], id=2, name='bd_tail_base', swap=''), | |
| 3: | |
| dict(color=[ | |
| 255, | |
| 0, | |
| 0, | |
| ], id=3, name='bd_tail_tip', swap=''), | |
| 4: | |
| dict(color=[ | |
| 255, | |
| 0, | |
| 0, | |
| ], id=4, name='hd_bill_base', swap=''), | |
| 5: | |
| dict(color=[ | |
| 255, | |
| 0, | |
| 0, | |
| ], id=5, name='hd_bill_tip', swap=''), | |
| 6: | |
| dict( | |
| color=[ | |
| 255, | |
| 0, | |
| 0, | |
| ], | |
| id=6, | |
| name='hd_eye_left', | |
| swap='hd_eye_right'), | |
| 7: | |
| dict( | |
| color=[ | |
| 255, | |
| 0, | |
| 0, | |
| ], | |
| id=7, | |
| name='hd_eye_right', | |
| swap='hd_eye_left') | |
| }), | |
| sigmas=[ | |
| 0.025, | |
| 0.025, | |
| 0.025, | |
| 0.025, | |
| 0.025, | |
| 0.025, | |
| 0.025, | |
| 0.025, | |
| ], | |
| skeleton_info=dict()), | |
| 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 = './data/Weights/hrnet' | |