本文整理汇总了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()
示例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)