Closed yiweike closed 2 years ago
i have trained 147 epoch yesterday, but AP(M) still is -1.
It is normal that AP(M)=-1, M means medium size. This is because your dataset does have medium size objects.
But in other datasets, AP(M) and AR(M) are not -1. For example, HRNetw48 in MSCOCO ,AP(M) = 0.723. Should i correct any code or annotations to get different value ?
As I have explained, MSCOCO dataset contains medium sized person, but your dataset does not. Medium size means: the area size of the object is between [32 2, 96 2]. So you do not need to worry about it. That is normal.
Thanks for your explanation ! The issue has been solved!
The Log: 2022-07-29 10:34:45,983 - mmpose - INFO - workflow: [('train', 1)], max: 210 epochs 2022-07-29 10:35:08,868 - mmpose - INFO - Epoch [1][50/681] lr: 4.945e-05, eta: 18:10:25, time: 0.458, data_time: 0.053, memory: 3339, heatmap_loss: 0.0025, acc_pose: 0.0500, loss: 0.0025 2022-07-29 10:35:28,349 - mmpose - INFO - Epoch [1][100/681] lr: 9.940e-05, eta: 16:49:01, time: 0.390, data_time: 0.000, memory: 3339, heatmap_loss: 0.0022, acc_pose: 0.2586, loss: 0.0022 2022-07-29 10:35:47,940 - mmpose - INFO - Epoch [1][150/681] lr: 1.494e-04, eta: 16:23:25, time: 0.392, data_time: 0.000, memory: 3339, heatmap_loss: 0.0021, acc_pose: 0.3422, loss: 0.0021 2022-07-29 10:36:07,555 - mmpose - INFO - Epoch [1][200/681] lr: 1.993e-04, eta: 16:10:44, time: 0.392, data_time: 0.000, memory: 3339, heatmap_loss: 0.0019, acc_pose: 0.3838, loss: 0.0019 2022-07-29 10:36:27,240 - mmpose - INFO - Epoch [1][250/681] lr: 2.493e-04, eta: 16:03:39, time: 0.394, data_time: 0.000, memory: 3339, heatmap_loss: 0.0019, acc_pose: 0.4057, loss: 0.0019 2022-07-29 10:36:46,977 - mmpose - INFO - Epoch [1][300/681] lr: 2.992e-04, eta: 15:59:15, time: 0.395, data_time: 0.000, memory: 3339, heatmap_loss: 0.0019, acc_pose: 0.4364, loss: 0.0019 2022-07-29 10:37:06,868 - mmpose - INFO - Epoch [1][350/681] lr: 3.492e-04, eta: 15:57:03, time: 0.398, data_time: 0.000, memory: 3339, heatmap_loss: 0.0018, acc_pose: 0.4224, loss: 0.0018 2022-07-29 10:37:26,812 - mmpose - INFO - Epoch [1][400/681] lr: 3.991e-04, eta: 15:55:38, time: 0.399, data_time: 0.000, memory: 3339, heatmap_loss: 0.0019, acc_pose: 0.3990, loss: 0.0019 2022-07-29 10:37:46,708 - mmpose - INFO - Epoch [1][450/681] lr: 4.491e-04, eta: 15:54:12, time: 0.398, data_time: 0.000, memory: 3339, heatmap_loss: 0.0018, acc_pose: 0.4572, loss: 0.0018 2022-07-29 10:38:06,729 - mmpose - INFO - Epoch [1][500/681] lr: 4.990e-04, eta: 15:53:35, time: 0.400, data_time: 0.000, memory: 3339, heatmap_loss: 0.0018, acc_pose: 0.4405, loss: 0.0018 2022-07-29 10:38:26,745 - mmpose - INFO - Epoch [1][550/681] lr: 5.000e-04, eta: 15:53:00, time: 0.400, data_time: 0.000, memory: 3339, heatmap_loss: 0.0019, acc_pose: 0.4313, loss: 0.0019 2022-07-29 10:38:46,964 - mmpose - INFO - Epoch [1][600/681] lr: 5.000e-04, eta: 15:53:15, time: 0.404, data_time: 0.000, memory: 3339, heatmap_loss: 0.0018, acc_pose: 0.4833, loss: 0.0018 2022-07-29 10:39:06,820 - mmpose - INFO - Epoch [1][650/681] lr: 5.000e-04, eta: 15:52:06, time: 0.397, data_time: 0.000, memory: 3339, heatmap_loss: 0.0017, acc_pose: 0.4723, loss: 0.0017 [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] 1341/1341, 64.8 task/s, elapsed: 21s, ETA: 0sLoading and preparing results... DONE (t=0.04s) creating index... index created! Running per image evaluation... Evaluate annotation type keypoints DONE (t=0.23s). Accumulating evaluation results... DONE (t=0.01s). Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets= 20 ] = 0.545 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets= 20 ] = 0.709 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets= 20 ] = 0.628 Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets= 20 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets= 20 ] = 0.546 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 20 ] = 0.682 Average Recall (AR) @[ IoU=0.50 | area= all | maxDets= 20 ] = 0.831 Average Recall (AR) @[ IoU=0.75 | area= all | maxDets= 20 ] = 0.761 Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets= 20 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets= 20 ] = 0.682 2022-07-29 10:39:45,769 - mmpose - INFO - Now best checkpoint is saved as best_AP_epoch_1.pth. 2022-07-29 10:39:45,770 - mmpose - INFO - Best AP is 0.5454 at 1 epoch. 2022-07-29 10:39:45,771 - mmpose - INFO - Epoch(val) [1][112] AP: 0.5454, AP .5: 0.7086, AP .75: 0.6276, AP (M): -1.0000, AP (L): 0.5456, AR: 0.6823, AR .5: 0.8315, AR .75: 0.7606, AR (M): -1.0000, AR (L): 0.6823 2022-07-29 10:40:08,990 - mmpose - INFO - Epoch [2][50/681] lr: 5.000e-04, eta: 15:21:24, time: 0.464, data_time: 0.055, memory: 3339, heatmap_loss: 0.0017, acc_pose: 0.4634, loss: 0.0017 2022-07-29 10:40:29,085 - mmpose - INFO - Epoch [2][100/681] lr: 5.000e-04, eta: 15:23:06, time: 0.402, data_time: 0.000, memory: 3339, heatmap_loss: 0.0017, acc_pose: 0.4723, loss: 0.0017 2022-07-29 10:40:49,159 - mmpose - INFO - Epoch [2][150/681] lr: 5.000e-04, eta: 15:24:29, time: 0.401, data_time: 0.000, memory: 3339, heatmap_loss: 0.0017, acc_pose: 0.5011, loss: 0.0017 2022-07-29 10:41:09,300 - mmpose - INFO - Epoch [2][200/681] lr: 5.000e-04, eta: 15:25:52, time: 0.403, data_time: 0.000, memory: 3339, heatmap_loss: 0.0017, acc_pose: 0.4972, loss: 0.0017 2022-07-29 10:41:29,062 - mmpose - INFO - Epoch [2][250/681] lr: 5.000e-04, eta: 15:26:06, time: 0.395, data_time: 0.000, memory: 3339, heatmap_loss: 0.0016, acc_pose: 0.5101, loss: 0.0016 2022-07-29 10:41:48,816 - mmpose - INFO - Epoch [2][300/681] lr: 5.000e-04, eta: 15:26:15, time: 0.395, data_time: 0.000, memory: 3339, heatmap_loss: 0.0017, acc_pose: 0.4938, loss: 0.0017 2022-07-29 10:42:08,604 - mmpose - INFO - Epoch [2][350/681] lr: 5.000e-04, eta: 15:26:26, time: 0.396, data_time: 0.000, memory: 3339, heatmap_loss: 0.0016, acc_pose: 0.5200, loss: 0.0016 2022-07-29 10:42:28,386 - mmpose - INFO - Epoch [2][400/681] lr: 5.000e-04, eta: 15:26:34, time: 0.396, data_time: 0.000, memory: 3339, heatmap_loss: 0.0016, acc_pose: 0.5062, loss: 0.0016 2022-07-29 10:42:48,263 - mmpose - INFO - Epoch [2][450/681] lr: 5.000e-04, eta: 15:26:51, time: 0.398, data_time: 0.000, memory: 3339, heatmap_loss: 0.0016, acc_pose: 0.5255, loss: 0.0016 2022-07-29 10:43:08,082 - mmpose - INFO - Epoch [2][500/681] lr: 5.000e-04, eta: 15:26:58, time: 0.396, data_time: 0.000, memory: 3339, heatmap_loss: 0.0016, acc_pose: 0.4934, loss: 0.0016 2022-07-29 10:43:27,819 - mmpose - INFO - Epoch [2][550/681] lr: 5.000e-04, eta: 15:26:53, time: 0.395, data_time: 0.000, memory: 3339, heatmap_loss: 0.0016, acc_pose: 0.5283, loss: 0.0016 2022-07-29 10:43:47,607 - mmpose - INFO - Epoch [2][600/681] lr: 5.000e-04, eta: 15:26:53, time: 0.396, data_time: 0.000, memory: 3339, heatmap_loss: 0.0016, acc_pose: 0.5343, loss: 0.0016 2022-07-29 10:44:07,352 - mmpose - INFO - Epoch [2][650/681] lr: 5.000e-04, eta: 15:26:46, time: 0.395, data_time: 0.000, memory: 3339, heatmap_loss: 0.0016, acc_pose: 0.5247, loss: 0.0016 [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] 1341/1341, 64.7 task/s, elapsed: 21s, ETA: 0sLoading and preparing results... DONE (t=0.04s) creating index... index created! Running per image evaluation... Evaluate annotation type keypoints DONE (t=0.23s). Accumulating evaluation results... DONE (t=0.01s). Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets= 20 ] = 0.610 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets= 20 ] = 0.707 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets= 20 ] = 0.666 Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets= 20 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets= 20 ] = 0.611 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 20 ] = 0.742 Average Recall (AR) @[ IoU=0.50 | area= all | maxDets= 20 ] = 0.837 Average Recall (AR) @[ IoU=0.75 | area= all | maxDets= 20 ] = 0.799 Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets= 20 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets= 20 ] = 0.742 2022-07-29 10:44:41,510 - mmpose - INFO - Now best checkpoint is saved as best_AP_epoch_2.pth. 2022-07-29 10:44:41,510 - mmpose - INFO - Best AP is 0.6100 at 2 epoch. 2022-07-29 10:44:41,511 - mmpose - INFO - Epoch(val) [2][112] AP: 0.6100, AP .5: 0.7075, AP .75: 0.6658, AP (M): -1.0000, AP (L): 0.6109, AR: 0.7416, AR .5: 0.8367, AR .75: 0.7994, AR (M): -1.0000, AR (L): 0.7416 2022-07-29 10:45:04,147 - mmpose - INFO - Epoch [3][50/681] lr: 5.000e-04, eta: 15:10:56, time: 0.453, data_time: 0.055, memory: 3339, heatmap_loss: 0.0016, acc_pose: 0.5422, loss: 0.0016 2022-07-29 10:45:23,897 - mmpose - INFO - Epoch [3][100/681] lr: 5.000e-04, eta: 15:11:20, time: 0.395, data_time: 0.000, memory: 3339, heatmap_loss: 0.0015, acc_pose: 0.5370, loss: 0.0015 2022-07-29 10:45:43,752 - mmpose - INFO - Epoch [3][150/681] lr: 5.000e-04, eta: 15:11:52, time: 0.397, data_time: 0.000, memory: 3339, heatmap_loss: 0.0016, acc_pose: 0.5497, loss: 0.0016 2022-07-29 10:46:03,570 - mmpose - INFO - Epoch [3][200/681] lr: 5.000e-04, eta: 15:12:16, time: 0.396, data_time: 0.000, memory: 3339, heatmap_loss: 0.0015, acc_pose: 0.5488, loss: 0.0015 2022-07-29 10:46:23,292 - mmpose - INFO - Epoch [3][250/681] lr: 5.000e-04, eta: 15:12:29, time: 0.394, data_time: 0.000, memory: 3339, heatmap_loss: 0.0015, acc_pose: 0.5221, loss: 0.0015 2022-07-29 10:46:43,291 - mmpose - INFO - Epoch [3][300/681] lr: 5.000e-04, eta: 15:13:04, time: 0.400, data_time: 0.000, memory: 3339, heatmap_loss: 0.0015, acc_pose: 0.5530, loss: 0.0015 2022-07-29 10:47:03,448 - mmpose - INFO - Epoch [3][350/681] lr: 5.000e-04, eta: 15:13:49, time: 0.403, data_time: 0.000, memory: 3339, heatmap_loss: 0.0015, acc_pose: 0.5574, loss: 0.0015 2022-07-29 10:47:23,273 - mmpose - INFO - Epoch [3][400/681] lr: 5.000e-04, eta: 15:14:04, time: 0.396, data_time: 0.000, memory: 3339, heatmap_loss: 0.0015, acc_pose: 0.5513, loss: 0.0015 2022-07-29 10:47:43,072 - mmpose - INFO - Epoch [3][450/681] lr: 5.000e-04, eta: 15:14:14, time: 0.396, data_time: 0.000, memory: 3339, heatmap_loss: 0.0016, acc_pose: 0.5351, loss: 0.0016 2022-07-29 10:48:02,773 - mmpose - INFO - Epoch [3][500/681] lr: 5.000e-04, eta: 15:14:16, time: 0.394, data_time: 0.000, memory: 3339, heatmap_loss: 0.0015, acc_pose: 0.5379, loss: 0.0015 2022-07-29 10:48:22,557 - mmpose - INFO - Epoch [3][550/681] lr: 5.000e-04, eta: 15:14:22, time: 0.396, data_time: 0.000, memory: 3339, heatmap_loss: 0.0015, acc_pose: 0.5792, loss: 0.0015 2022-07-29 10:48:42,336 - mmpose - INFO - Epoch [3][600/681] lr: 5.000e-04, eta: 15:14:27, time: 0.396, data_time: 0.000, memory: 3339, heatmap_loss: 0.0015, acc_pose: 0.5483, loss: 0.0015 2022-07-29 10:49:02,178 - mmpose - INFO - Epoch [3][650/681] lr: 5.000e-04, eta: 15:14:35, time: 0.397, data_time: 0.000, memory: 3339, heatmap_loss: 0.0015, acc_pose: 0.5280, loss: 0.0015 [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] 1341/1341, 64.6 task/s, elapsed: 21s, ETA: 0sLoading and preparing results... DONE (t=0.04s) creating index... index created! Running per image evaluation... Evaluate annotation type keypoints DONE (t=0.30s). Accumulating evaluation results... DONE (t=0.01s). Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets= 20 ] = 0.613 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets= 20 ] = 0.709 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets= 20 ] = 0.664 Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets= 20 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets= 20 ] = 0.613 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 20 ] = 0.746 Average Recall (AR) @[ IoU=0.50 | area= all | maxDets= 20 ] = 0.836 Average Recall (AR) @[ IoU=0.75 | area= all | maxDets= 20 ] = 0.793 Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets= 20 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets= 20 ] = 0.746 2022-07-29 10:49:36,440 - mmpose - INFO - Now best checkpoint is saved as best_AP_epoch_3.pth. 2022-07-29 10:49:36,440 - mmpose - INFO - Best AP is 0.6131 at 3 epoch.
configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/custom/hrnet_w48_custom_256x192.py base = [ '../../../../base/default_runtime.py', '../../../../base/datasets/coco.py' ] evaluation = dict(interval=1, 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_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=False, det_bbox_thr=0.0, bbox_file='data/custom/person_detection_results/' 'bbox_results.json', )
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_root = 'data/custom' data = dict( samples_per_gpu=12, workers_per_gpu=12, val_dataloader=dict(samples_per_gpu=12), test_dataloader=dict(samples_per_gpu=12), train=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train/', 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}/val/', 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}/val/', data_cfg=data_cfg, pipeline=test_pipeline, dataset_info={{base.dataset_info}}), )
configs/base/dataset/custom.py dataset_info = dict( dataset_name='custom', paper_info=dict( author='Me' title='my custom dataset', container='my dataset in school', year='2022', homepage='None', ), keypoint_info={ 0: dict(name='nose', id=0, color=[51, 153, 255], type='upper', swap=''), 1: dict( name='left_eye', id=1, color=[51, 153, 255], type='upper', swap='right_eye'), 2: dict( name='right_eye', id=2, color=[51, 153, 255], type='upper', swap='left_eye'), 3: dict( name='left_ear', id=3, color=[51, 153, 255], type='upper', swap='right_ear'), 4: dict( name='right_ear', id=4, color=[51, 153, 255], type='upper', swap='left_ear'), 5: dict( name='left_shoulder', id=5, color=[0, 255, 0], type='upper', swap='right_shoulder'), 6: dict( name='right_shoulder', id=6, color=[255, 128, 0], type='upper', swap='left_shoulder'), 7: dict( name='left_elbow', id=7, color=[0, 255, 0], type='upper', swap='right_elbow'), 8: dict( name='right_elbow', id=8, color=[255, 128, 0], type='upper', swap='left_elbow'), 9: dict( name='left_wrist', id=9, color=[0, 255, 0], type='upper', swap='right_wrist'), 10: dict( name='right_wrist', id=10, color=[255, 128, 0], type='upper', swap='left_wrist'), 11: dict( name='left_hip', id=11, color=[0, 255, 0], type='lower', swap='right_hip'), 12: dict( name='right_hip', id=12, color=[255, 128, 0], type='lower', swap='left_hip'), 13: dict( name='left_knee', id=13, color=[0, 255, 0], type='lower', swap='right_knee'), 14: dict( name='right_knee', id=14, color=[255, 128, 0], type='lower', swap='left_knee'), 15: dict( name='left_ankle', id=15, color=[0, 255, 0], type='lower', swap='right_ankle'), 16: dict( name='right_ankle', id=16, color=[255, 128, 0], type='lower', swap='left_ankle') }, skeleton_info={ 0: dict(link=('left_ankle', 'left_knee'), id=0, color=[0, 255, 0]), 1: dict(link=('left_knee', 'left_hip'), id=1, color=[0, 255, 0]), 2: dict(link=('right_ankle', 'right_knee'), id=2, color=[255, 128, 0]), 3: dict(link=('right_knee', 'right_hip'), id=3, color=[255, 128, 0]), 4: dict(link=('left_hip', 'right_hip'), id=4, color=[51, 153, 255]), 5: dict(link=('left_shoulder', 'left_hip'), id=5, color=[51, 153, 255]), 6: dict(link=('right_shoulder', 'right_hip'), id=6, color=[51, 153, 255]), 7: dict( link=('left_shoulder', 'right_shoulder'), id=7, color=[51, 153, 255]), 8: dict(link=('left_shoulder', 'left_elbow'), id=8, color=[0, 255, 0]), 9: dict( link=('right_shoulder', 'right_elbow'), id=9, color=[255, 128, 0]), 10: dict(link=('left_elbow', 'left_wrist'), id=10, color=[0, 255, 0]), 11: dict(link=('right_elbow', 'right_wrist'), id=11, color=[255, 128, 0]), 12: dict(link=('left_eye', 'right_eye'), id=12, color=[51, 153, 255]), 13: dict(link=('nose', 'left_eye'), id=13, color=[51, 153, 255]), 14: dict(link=('nose', 'right_eye'), id=14, color=[51, 153, 255]), 15: dict(link=('left_eye', 'left_ear'), id=15, color=[51, 153, 255]), 16: dict(link=('right_eye', 'right_ear'), id=16, color=[51, 153, 255]), 17: dict(link=('left_ear', 'left_shoulder'), id=17, color=[51, 153, 255]), 18: dict( link=('right_ear', 'right_shoulder'), id=18, color=[51, 153, 255]) }, joint_weights=[ 1., 1., 1., 1., 1., 1., 1., 1.2, 1.2, 1.5, 1.5, 1., 1., 1.2, 1.2, 1.5, 1.5 ], sigmas=[ 0.026, 0.025, 0.025, 0.035, 0.035, 0.079, 0.079, 0.072, 0.072, 0.062, 0.062, 0.107, 0.107, 0.087, 0.087, 0.089, 0.089 ])
mmpose/datasets/datasets/top_down/topdown_custom_dataset.py
Copyright (c) OpenMMLab. All rights reserved.
import os.path as osp import tempfile import warnings from collections import OrderedDict, defaultdict
import json_tricks as json import numpy as np from mmcv import Config, deprecated_api_warning from xtcocotools.cocoeval import COCOeval
from ....core.post_processing import oks_nms, soft_oks_nms from ...builder import DATASETS from ..base import Kpt2dSviewRgbImgTopDownDataset
@DATASETS.register_module() class TopDownCustomDataset(Kpt2dSviewRgbImgTopDownDataset): """CocoDataset dataset for top-down pose estimation.