当前位置: 首页>>代码示例>>Python>>正文


Python voc_dataset_evaluator.evaluate_boxes方法代码示例

本文整理汇总了Python中datasets.voc_dataset_evaluator.evaluate_boxes方法的典型用法代码示例。如果您正苦于以下问题:Python voc_dataset_evaluator.evaluate_boxes方法的具体用法?Python voc_dataset_evaluator.evaluate_boxes怎么用?Python voc_dataset_evaluator.evaluate_boxes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在datasets.voc_dataset_evaluator的用法示例。


在下文中一共展示了voc_dataset_evaluator.evaluate_boxes方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: evaluate_all

# 需要导入模块: from datasets import voc_dataset_evaluator [as 别名]
# 或者: from datasets.voc_dataset_evaluator import evaluate_boxes [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_boxes

# 需要导入模块: from datasets import voc_dataset_evaluator [as 别名]
# 或者: from datasets.voc_dataset_evaluator import evaluate_boxes [as 别名]
def evaluate_boxes(dataset, all_boxes, output_dir, test_corloc=False, use_matlab=False):
    """Evaluate bounding box detection."""
    logger.info('Evaluating detections')
    not_comp = not cfg.TEST.COMPETITION_MODE
    if _use_json_dataset_evaluator(dataset):
        coco_eval = json_dataset_evaluator.evaluate_boxes(
            dataset, all_boxes, output_dir, use_salt=not_comp, cleanup=not_comp
        )
        box_results = _coco_eval_to_box_results(coco_eval)
    elif _use_voc_evaluator(dataset):
        # For VOC, always use salt and always cleanup because results are
        # written to the shared VOCdevkit results directory
        voc_eval = voc_dataset_evaluator.evaluate_boxes(
            dataset, all_boxes, output_dir, test_corloc=test_corloc,
            use_matlab=use_matlab
        )
        box_results = _voc_eval_to_box_results(voc_eval)
    else:
        raise NotImplementedError(
            'No evaluator for dataset: {}'.format(dataset.name)
        )
    return OrderedDict([(dataset.name, box_results)]) 
开发者ID:ppengtang,项目名称:pcl.pytorch,代码行数:24,代码来源:task_evaluation.py

示例3: evaluate_boxes

# 需要导入模块: from datasets import voc_dataset_evaluator [as 别名]
# 或者: from datasets.voc_dataset_evaluator import evaluate_boxes [as 别名]
def evaluate_boxes(dataset, all_boxes, output_dir, use_matlab=False):
    """Evaluate bounding box detection."""
    logger.info('Evaluating detections')
    not_comp = not cfg.TEST.COMPETITION_MODE
    if _use_json_dataset_evaluator(dataset):
        coco_eval = json_dataset_evaluator.evaluate_boxes(
            dataset, all_boxes, output_dir, use_salt=not_comp, cleanup=not_comp
        )
        box_results = _coco_eval_to_box_results(coco_eval)
    elif _use_cityscapes_evaluator(dataset):
        logger.warn('Cityscapes bbox evaluated using COCO metrics/conversions')
        coco_eval = json_dataset_evaluator.evaluate_boxes(
            dataset, all_boxes, output_dir, use_salt=not_comp, cleanup=not_comp
        )
        box_results = _coco_eval_to_box_results(coco_eval)
    elif _use_voc_evaluator(dataset):
        # For VOC, always use salt and always cleanup because results are
        # written to the shared VOCdevkit results directory
        voc_eval = voc_dataset_evaluator.evaluate_boxes(
            dataset, all_boxes, output_dir, use_matlab=use_matlab
        )
        box_results = _voc_eval_to_box_results(voc_eval)
    else:
        raise NotImplementedError(
            'No evaluator for dataset: {}'.format(dataset.name)
        )
    return OrderedDict([(dataset.name, box_results)]) 
开发者ID:roytseng-tw,项目名称:Detectron.pytorch,代码行数:29,代码来源:task_evaluation.py

示例4: evaluate_all

# 需要导入模块: from datasets import voc_dataset_evaluator [as 别名]
# 或者: from datasets.voc_dataset_evaluator import evaluate_boxes [as 别名]
def evaluate_all(
    dataset, all_boxes, output_dir, test_corloc=False, 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, test_corloc=test_corloc,
        use_matlab=use_matlab
    )
    logger.info('Evaluating bounding boxes is done!')
    return all_results 
开发者ID:ppengtang,项目名称:pcl.pytorch,代码行数:14,代码来源:task_evaluation.py

示例5: evaluate_boxes

# 需要导入模块: from datasets import voc_dataset_evaluator [as 别名]
# 或者: from datasets.voc_dataset_evaluator import evaluate_boxes [as 别名]
def evaluate_boxes(dataset, all_boxes, output_dir, use_matlab=False):
    """Evaluate bounding box detection."""
    logger.info('Evaluating detections')
    not_comp = not cfg.TEST.COMPETITION_MODE
    if _use_json_dataset_evaluator(dataset):
        coco_eval = json_dataset_evaluator.evaluate_boxes(
            dataset, all_boxes, output_dir, use_salt=not_comp, cleanup=not_comp
        )
        box_results = _coco_eval_to_box_results(coco_eval)
    elif _use_cityscapes_evaluator(dataset):
        logger.warn('Cityscapes bbox evaluated using COCO metrics/conversions')
        coco_eval = json_dataset_evaluator.evaluate_boxes(
            dataset, all_boxes, output_dir, use_salt=not_comp, cleanup=not_comp
        )
        box_results = _coco_eval_to_box_results(coco_eval)
    elif _use_vg_evaluator(dataset):
        logger.warn('Visual Genome bbox evaluated using COCO metrics/conversions')
        coco_eval = json_dataset_evaluator.evaluate_boxes(
            dataset, all_boxes, output_dir, use_salt=not_comp, cleanup=not_comp
        )
        box_results = _coco_eval_to_box_results(coco_eval)
    elif _use_voc_evaluator(dataset):
        # For VOC, always use salt and always cleanup because results are
        # written to the shared VOCdevkit results directory
        voc_eval = voc_dataset_evaluator.evaluate_boxes(
            dataset, all_boxes, output_dir, use_matlab=use_matlab
        )
        box_results = _voc_eval_to_box_results(voc_eval)
    else:
        raise NotImplementedError(
            'No evaluator for dataset: {}'.format(dataset.name)
        )
    return OrderedDict([(dataset.name, box_results)]) 
开发者ID:ruotianluo,项目名称:Context-aware-ZSR,代码行数:35,代码来源:task_evaluation.py

示例6: evaluate_boxes

# 需要导入模块: from datasets import voc_dataset_evaluator [as 别名]
# 或者: from datasets.voc_dataset_evaluator import evaluate_boxes [as 别名]
def evaluate_boxes(dataset, all_boxes, output_dir, use_matlab=False):
    """Evaluate bounding box detection."""
    logger.info('Evaluating detections')
    not_comp = not cfg.TEST.COMPETITION_MODE
    if _use_json_dataset_evaluator(dataset):
        coco_eval = json_dataset_evaluator.evaluate_boxes(
            dataset, all_boxes, output_dir, use_salt=not_comp, cleanup=not_comp
        )
        box_results = _coco_eval_to_box_results(coco_eval)
    elif _use_cityscapes_evaluator(dataset):
        logger.warn('Cityscapes bbox evaluated using COCO metrics/conversions')
        coco_eval = json_dataset_evaluator.evaluate_boxes(
            dataset, all_boxes, output_dir, use_salt=not_comp, cleanup=not_comp
        )
        box_results = _coco_eval_to_box_results(coco_eval)
    elif _use_voc_evaluator(dataset):
        # For VOC, always use salt and always cleanup because results are
        # written to the shared VOCdevkit results directory
        voc_eval = voc_dataset_evaluator.evaluate_boxes(
            dataset, all_boxes, output_dir, use_matlab=use_matlab
        )
        box_results = _voc_eval_to_box_results(voc_eval)
    elif _use_no_evaluator(dataset):
        box_results = _empty_box_results()
    else:
        raise NotImplementedError(
            'No evaluator for dataset: {}'.format(dataset.name)
        )
    return OrderedDict([(dataset.name, box_results)]) 
开发者ID:ronghanghu,项目名称:seg_every_thing,代码行数:31,代码来源:task_evaluation.py

示例7: evaluate_all

# 需要导入模块: from datasets import voc_dataset_evaluator [as 别名]
# 或者: from datasets.voc_dataset_evaluator import evaluate_boxes [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


注:本文中的datasets.voc_dataset_evaluator.evaluate_boxes方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。