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


Python per_image_vrd_evaluation.PerImageVRDEvaluation方法代码示例

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


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

示例1: __init__

# 需要导入模块: from object_detection.utils import per_image_vrd_evaluation [as 别名]
# 或者: from object_detection.utils.per_image_vrd_evaluation import PerImageVRDEvaluation [as 别名]
def __init__(self, matching_iou_threshold=0.5):
    """Constructor.

    Args:
      matching_iou_threshold: IOU threshold to use for matching groundtruth
        boxes to detection boxes.
    """
    self._per_image_eval = per_image_vrd_evaluation.PerImageVRDEvaluation(
        matching_iou_threshold=matching_iou_threshold)

    self._groundtruth_box_tuples = {}
    self._groundtruth_class_tuples = {}
    self._num_gt_instances = 0
    self._num_gt_imgs = 0
    self._num_gt_instances_per_relationship = {}

    self.clear_detections() 
开发者ID:ahmetozlu,项目名称:vehicle_counting_tensorflow,代码行数:19,代码来源:vrd_evaluation.py

示例2: setUp

# 需要导入模块: from object_detection.utils import per_image_vrd_evaluation [as 别名]
# 或者: from object_detection.utils.per_image_vrd_evaluation import PerImageVRDEvaluation [as 别名]
def setUp(self):
    matching_iou_threshold = 0.5
    self.eval = per_image_vrd_evaluation.PerImageVRDEvaluation(
        matching_iou_threshold)
    box_data_type = np.dtype([('subject', 'f4', (4,)), ('object', 'f4', (4,))])
    label_data_type = np.dtype([('subject', 'i4'), ('object', 'i4'),
                                ('relation', 'i4')])

    self.detected_box_tuples = np.array(
        [([0, 0, 1, 1], [1, 1, 2, 2]), ([0, 0, 1.1, 1], [1, 1, 2, 2]),
         ([1, 1, 2, 2], [0, 0, 1.1, 1]), ([0, 0, 1, 1], [3, 4, 5, 6])],
        dtype=box_data_type)
    self.detected_class_tuples = np.array(
        [(1, 2, 3), (1, 2, 3), (1, 2, 3), (1, 4, 5)], dtype=label_data_type)
    self.detected_scores = np.array([0.2, 0.8, 0.1, 0.5], dtype=float)

    self.groundtruth_box_tuples = np.array(
        [([0, 0, 1, 1], [1, 1, 2, 2]), ([1, 1, 2, 2], [0, 0, 1.1, 1]),
         ([0, 0, 1, 1], [3, 4, 5, 5.5])],
        dtype=box_data_type)
    self.groundtruth_class_tuples = np.array(
        [(1, 2, 3), (1, 7, 3), (1, 4, 5)], dtype=label_data_type) 
开发者ID:ahmetozlu,项目名称:vehicle_counting_tensorflow,代码行数:24,代码来源:per_image_vrd_evaluation_test.py


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