def METHOD_NAME(self):
    from mmpose.apis import init_model
    from mmpose.structures import PoseDataSample
    for device in ('cpu', 'cuda'):
        if device == 'cuda' and not torch.cuda.is_available():
            # Skip the test if cuda is required but unavailable
            continue
        project_dir = osp.abspath(osp.dirname(osp.dirname(__file__)))
        project_dir = osp.join(project_dir, '..')
        det_config = 'demo/demo_configs/faster-rcnn_r50_fpn_2x_coco_infer.py'  # noqa: E501
        det_ckpt = 'http://download.openmmlab.com/mmdetection/' \
                   'v2.0/faster_rcnn/faster_rcnn_r50_fpn_2x_coco/faster_rcnn_r50_fpn_2x_coco_bbox_mAP-0.384_20200504_210434-a5d8aa15.pth'  # noqa: E501
        pose_config = 'demo/demo_configs/' \
                      'td-hm_hrnet-w32_8xb64-210e_coco-256x192_infer.py'
        pose_ckpt = 'https://download.openmmlab.com/mmpose/top_down/' \
                    'hrnet/hrnet_w32_coco_256x192-c78dce93_20200708.pth'
        video_path = 'demo/demo_skeleton.mp4'
        video_path = osp.join(project_dir, video_path)
        pose_config = osp.join(project_dir, pose_config)
        with TemporaryDirectory() as tmpdir:
            frm_paths, _ = frame_extract(video_path, out_dir=tmpdir)
            # skip remaining frames to speed up ut
            frm_paths = frm_paths[:10]
            det_results, _ = detection_inference(
                det_config, det_ckpt, frm_paths, device=device)
            results, data_samples = pose_inference(
                pose_config,
                pose_ckpt,
                frm_paths,
                det_results,
                device=device)
            assert_dict_has_keys(results[0], ('keypoints', 'bbox_scores',
                                              'bboxes', 'keypoint_scores'))
            self.assertIsInstance(data_samples[0], PoseDataSample)
            # test inference with model object
            model = init_model(
                config=pose_config, checkpoint=pose_ckpt, device=device)
            results, data_samples = pose_inference(
                model, None, frm_paths, det_results, device=device)
            assert_dict_has_keys(results[0], ('keypoints', 'bbox_scores',
                                              'bboxes', 'keypoint_scores'))
            self.assertIsInstance(data_samples[0], PoseDataSample)