當前位置: 首頁>>代碼示例>>Python>>正文


Python json_dataset_evaluator.evaluate_keypoints方法代碼示例

本文整理匯總了Python中datasets.json_dataset_evaluator.evaluate_keypoints方法的典型用法代碼示例。如果您正苦於以下問題:Python json_dataset_evaluator.evaluate_keypoints方法的具體用法?Python json_dataset_evaluator.evaluate_keypoints怎麽用?Python json_dataset_evaluator.evaluate_keypoints使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在datasets.json_dataset_evaluator的用法示例。


在下文中一共展示了json_dataset_evaluator.evaluate_keypoints方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: evaluate_all

# 需要導入模塊: from datasets import json_dataset_evaluator [as 別名]
# 或者: from datasets.json_dataset_evaluator import evaluate_keypoints [as 別名]
def evaluate_all(
    dataset, all_boxes, all_segms, all_keyps, output_dir, use_matlab=False
):
    """Evaluate "all" tasks, where "all" includes box detection, instance
    segmentation, and keypoint detection.
    """
    all_results = evaluate_boxes(
        dataset, all_boxes, output_dir, use_matlab=use_matlab
    )
    logger.info('Evaluating bounding boxes is done!')
    if cfg.MODEL.MASK_ON:
        results = evaluate_masks(dataset, all_boxes, all_segms, output_dir)
        all_results[dataset.name].update(results[dataset.name])
        logger.info('Evaluating segmentations is done!')
    if cfg.MODEL.KEYPOINTS_ON:
        results = evaluate_keypoints(dataset, all_boxes, all_keyps, output_dir)
        all_results[dataset.name].update(results[dataset.name])
        logger.info('Evaluating keypoints is done!')
    return all_results 
開發者ID:roytseng-tw,項目名稱:Detectron.pytorch,代碼行數:21,代碼來源:task_evaluation.py

示例2: evaluate_keypoints

# 需要導入模塊: from datasets import json_dataset_evaluator [as 別名]
# 或者: from datasets.json_dataset_evaluator import evaluate_keypoints [as 別名]
def evaluate_keypoints(dataset, all_boxes, all_keyps, output_dir):
    """Evaluate human keypoint detection (i.e., 2D pose estimation)."""
    logger.info('Evaluating detections')
    not_comp = not cfg.TEST.COMPETITION_MODE
    assert dataset.name.startswith('keypoints_coco_'), \
        'Only COCO keypoints are currently supported'
    coco_eval = json_dataset_evaluator.evaluate_keypoints(
        dataset,
        all_boxes,
        all_keyps,
        output_dir,
        use_salt=not_comp,
        cleanup=not_comp
    )
    keypoint_results = _coco_eval_to_keypoint_results(coco_eval)
    return OrderedDict([(dataset.name, keypoint_results)]) 
開發者ID:roytseng-tw,項目名稱:Detectron.pytorch,代碼行數:18,代碼來源:task_evaluation.py

示例3: evaluate_keypoints

# 需要導入模塊: from datasets import json_dataset_evaluator [as 別名]
# 或者: from datasets.json_dataset_evaluator import evaluate_keypoints [as 別名]
def evaluate_keypoints(dataset, all_boxes, all_keyps, output_dir):
    """Evaluate human keypoint detection (i.e., 2D pose estimation)."""
    logger.info('Evaluating detections')
    not_comp = not cfg.TEST.COMPETITION_MODE
    # assert dataset.name.startswith('keypoints_coco_'), \
    #     'Only COCO keypoints are currently supported'
    coco_eval = json_dataset_evaluator.evaluate_keypoints(
        dataset,
        all_boxes,
        all_keyps,
        output_dir,
        use_salt=not_comp,
        cleanup=not_comp
    )
    keypoint_results = _coco_eval_to_keypoint_results(coco_eval)
    return OrderedDict([(dataset.name, keypoint_results)]) 
開發者ID:bobwan1995,項目名稱:PMFNet,代碼行數:18,代碼來源:task_evaluation.py

示例4: evaluate_all

# 需要導入模塊: from datasets import json_dataset_evaluator [as 別名]
# 或者: from datasets.json_dataset_evaluator import evaluate_keypoints [as 別名]
def evaluate_all(
    dataset, all_boxes, all_segms, all_keyps, all_hois, all_keyps_vcoco, output_dir, use_matlab=False
):
    """Evaluate "all" tasks, where "all" includes box detection, instance
    segmentation, and keypoint detection.
    """
    all_results = evaluate_boxes(
        dataset, all_boxes, output_dir, use_matlab=use_matlab
    )
    logger.info('Evaluating bounding boxes is done!')
    if cfg.MODEL.MASK_ON:
        results = evaluate_masks(dataset, all_boxes, all_segms, output_dir)
        all_results[dataset.name].update(results[dataset.name])
        logger.info('Evaluating segmentations is done!')
    if cfg.MODEL.KEYPOINTS_ON:
        results = evaluate_keypoints(dataset, all_boxes, all_keyps, output_dir)
        all_results[dataset.name].update(results[dataset.name])
        logger.info('Evaluating keypoints is done!')
    if cfg.MODEL.VCOCO_ON:
        results = evaluate_hoi_vcoco(dataset, all_hois, output_dir)
        #all_results[dataset.name].update(results[dataset.name])
        # if cfg.VCOCO.KEYPOINTS_ON:
            # results = evaluate_keypoints(dataset, all_boxes, all_keyps_vcoco, output_dir)
            # all_results[dataset.name].update(results[dataset.name])
        logger.info('Evaluating hois is done!')
    return all_results 
開發者ID:bobwan1995,項目名稱:PMFNet,代碼行數:28,代碼來源:task_evaluation.py

示例5: evaluate_keypoints

# 需要導入模塊: from datasets import json_dataset_evaluator [as 別名]
# 或者: from datasets.json_dataset_evaluator import evaluate_keypoints [as 別名]
def evaluate_keypoints(dataset, all_boxes, all_keyps, output_dir):
    logger.info('Evaluating detections')
    not_comp = not cfg.TEST.COMPETITION_MODE
    if dataset.name.startswith('keypoints_coco_'):
        import datasets.json_dataset_evaluator as json_dataset_evaluator
        json_dataset_evaluator.evaluate_keypoints(
            dataset, all_boxes, all_keyps, output_dir,
            use_salt=not_comp, cleanup=not_comp)
    else:
        raise NotImplementedError(
            'No evaluator for dataset: {}'.format(dataset.name)) 
開發者ID:facebookresearch,項目名稱:DetectAndTrack,代碼行數:13,代碼來源:test_engine.py

示例6: evaluate_all

# 需要導入模塊: from datasets import json_dataset_evaluator [as 別名]
# 或者: from datasets.json_dataset_evaluator import evaluate_keypoints [as 別名]
def evaluate_all(
        dataset, all_boxes, all_segms, all_keyps, output_dir, use_matlab=False):
    evaluate_detections(dataset, all_boxes, output_dir, use_matlab=use_matlab)
    logger.info('Evaluating bounding boxes is done!')
    if cfg.MODEL.MASK_ON:
        evaluate_segmentations(dataset, all_boxes, all_segms, output_dir)
        logger.info('Evaluating segmentations is done!')
    if cfg.MODEL.KEYPOINTS_ON:
        evaluate_keypoints(dataset, all_boxes, all_keyps, output_dir)
        logger.info('Evaluating keypoints is done!') 
開發者ID:facebookresearch,項目名稱:DetectAndTrack,代碼行數:12,代碼來源:test_engine.py


注:本文中的datasets.json_dataset_evaluator.evaluate_keypoints方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。