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


Python matcher.Matcher方法代码示例

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


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

示例1: __init__

# 需要导入模块: from object_detection.core import matcher [as 别名]
# 或者: from object_detection.core.matcher import Matcher [as 别名]
def __init__(self, similarity_calc, matcher, box_coder,
               positive_class_weight=1.0, negative_class_weight=1.0,
               unmatched_cls_target=None):
    """Construct Multibox Target Assigner.

    Args:
      similarity_calc: a RegionSimilarityCalculator
      matcher: an object_detection.core.Matcher used to match groundtruth to
        anchors.
      box_coder: an object_detection.core.BoxCoder used to encode matching
        groundtruth boxes with respect to anchors.
      positive_class_weight: classification weight to be associated to positive
        anchors (default: 1.0)
      negative_class_weight: classification weight to be associated to negative
        anchors (default: 1.0)
      unmatched_cls_target: a float32 tensor with shape [d_1, d_2, ..., d_k]
        which is consistent with the classification target for each
        anchor (and can be empty for scalar targets).  This shape must thus be
        compatible with the groundtruth labels that are passed to the "assign"
        function (which have shape [num_gt_boxes, d_1, d_2, ..., d_k]).
        If set to None, unmatched_cls_target is set to be [0] for each anchor.

    Raises:
      ValueError: if similarity_calc is not a RegionSimilarityCalculator or
        if matcher is not a Matcher or if box_coder is not a BoxCoder
    """
    if not isinstance(similarity_calc, sim_calc.RegionSimilarityCalculator):
      raise ValueError('similarity_calc must be a RegionSimilarityCalculator')
    if not isinstance(matcher, mat.Matcher):
      raise ValueError('matcher must be a Matcher')
    if not isinstance(box_coder, bcoder.BoxCoder):
      raise ValueError('box_coder must be a BoxCoder')
    self._similarity_calc = similarity_calc
    self._matcher = matcher
    self._box_coder = box_coder
    self._positive_class_weight = positive_class_weight
    self._negative_class_weight = negative_class_weight
    if unmatched_cls_target is None:
      self._unmatched_cls_target = tf.constant([0], tf.float32)
    else:
      self._unmatched_cls_target = unmatched_cls_target 
开发者ID:ringringyi,项目名称:DOTA_models,代码行数:43,代码来源:target_assigner.py

示例2: __init__

# 需要导入模块: from object_detection.core import matcher [as 别名]
# 或者: from object_detection.core.matcher import Matcher [as 别名]
def __init__(self, use_matmul_gather=False):
    """Constructs a Matcher.

    Args:
      use_matmul_gather: Force constructed match objects to use matrix
        multiplication based gather instead of standard tf.gather.
        (Default: False).
    """
    super(GreedyBipartiteMatcher, self).__init__(
        use_matmul_gather=use_matmul_gather) 
开发者ID:ahmetozlu,项目名称:vehicle_counting_tensorflow,代码行数:12,代码来源:bipartite_matcher.py

示例3: __init__

# 需要导入模块: from object_detection.core import matcher [as 别名]
# 或者: from object_detection.core.matcher import Matcher [as 别名]
def __init__(self,
               similarity_calc,
               matcher,
               box_coder,
               negative_class_weight=1.0,
               weight_regression_loss_by_score=False):
    """Construct Object Detection Target Assigner.

    Args:
      similarity_calc: a RegionSimilarityCalculator
      matcher: an object_detection.core.Matcher used to match groundtruth to
        anchors.
      box_coder: an object_detection.core.BoxCoder used to encode matching
        groundtruth boxes with respect to anchors.
      negative_class_weight: classification weight to be associated to negative
        anchors (default: 1.0). The weight must be in [0., 1.].
      weight_regression_loss_by_score: Whether to weight the regression loss by
        ground truth box score.

    Raises:
      ValueError: if similarity_calc is not a RegionSimilarityCalculator or
        if matcher is not a Matcher or if box_coder is not a BoxCoder
    """
    if not isinstance(similarity_calc, sim_calc.RegionSimilarityCalculator):
      raise ValueError('similarity_calc must be a RegionSimilarityCalculator')
    if not isinstance(matcher, mat.Matcher):
      raise ValueError('matcher must be a Matcher')
    if not isinstance(box_coder, bcoder.BoxCoder):
      raise ValueError('box_coder must be a BoxCoder')
    self._similarity_calc = similarity_calc
    self._matcher = matcher
    self._box_coder = box_coder
    self._negative_class_weight = negative_class_weight
    self._weight_regression_loss_by_score = weight_regression_loss_by_score 
开发者ID:ahmetozlu,项目名称:vehicle_counting_tensorflow,代码行数:36,代码来源:target_assigner.py

示例4: __init__

# 需要导入模块: from object_detection.core import matcher [as 别名]
# 或者: from object_detection.core.matcher import Matcher [as 别名]
def __init__(self, similarity_calc, matcher, box_coder,
               negative_class_weight=1.0, unmatched_cls_target=None):
    """Construct Object Detection Target Assigner.

    Args:
      similarity_calc: a RegionSimilarityCalculator
      matcher: an object_detection.core.Matcher used to match groundtruth to
        anchors.
      box_coder: an object_detection.core.BoxCoder used to encode matching
        groundtruth boxes with respect to anchors.
      negative_class_weight: classification weight to be associated to negative
        anchors (default: 1.0). The weight must be in [0., 1.].
      unmatched_cls_target: a float32 tensor with shape [d_1, d_2, ..., d_k]
        which is consistent with the classification target for each
        anchor (and can be empty for scalar targets).  This shape must thus be
        compatible with the groundtruth labels that are passed to the "assign"
        function (which have shape [num_gt_boxes, d_1, d_2, ..., d_k]).
        If set to None, unmatched_cls_target is set to be [0] for each anchor.

    Raises:
      ValueError: if similarity_calc is not a RegionSimilarityCalculator or
        if matcher is not a Matcher or if box_coder is not a BoxCoder
    """
    if not isinstance(similarity_calc, sim_calc.RegionSimilarityCalculator):
      raise ValueError('similarity_calc must be a RegionSimilarityCalculator')
    if not isinstance(matcher, mat.Matcher):
      raise ValueError('matcher must be a Matcher')
    if not isinstance(box_coder, bcoder.BoxCoder):
      raise ValueError('box_coder must be a BoxCoder')
    self._similarity_calc = similarity_calc
    self._matcher = matcher
    self._box_coder = box_coder
    self._negative_class_weight = negative_class_weight
    if unmatched_cls_target is None:
      self._unmatched_cls_target = tf.constant([0], tf.float32)
    else:
      self._unmatched_cls_target = unmatched_cls_target 
开发者ID:cagbal,项目名称:ros_people_object_detection_tensorflow,代码行数:39,代码来源:target_assigner.py

示例5: __init__

# 需要导入模块: from object_detection.core import matcher [as 别名]
# 或者: from object_detection.core.matcher import Matcher [as 别名]
def __init__(self, similarity_calc, matcher, box_coder,
               positive_class_weight=1.0, negative_class_weight=1.0,
               unmatched_cls_target=None):
    """Construct Object Detection Target Assigner.

    Args:
      similarity_calc: a RegionSimilarityCalculator
      matcher: an object_detection.core.Matcher used to match groundtruth to
        anchors.
      box_coder: an object_detection.core.BoxCoder used to encode matching
        groundtruth boxes with respect to anchors.
      positive_class_weight: classification weight to be associated to positive
        anchors (default: 1.0)
      negative_class_weight: classification weight to be associated to negative
        anchors (default: 1.0)
      unmatched_cls_target: a float32 tensor with shape [d_1, d_2, ..., d_k]
        which is consistent with the classification target for each
        anchor (and can be empty for scalar targets).  This shape must thus be
        compatible with the groundtruth labels that are passed to the "assign"
        function (which have shape [num_gt_boxes, d_1, d_2, ..., d_k]).
        If set to None, unmatched_cls_target is set to be [0] for each anchor.

    Raises:
      ValueError: if similarity_calc is not a RegionSimilarityCalculator or
        if matcher is not a Matcher or if box_coder is not a BoxCoder
    """
    if not isinstance(similarity_calc, sim_calc.RegionSimilarityCalculator):
      raise ValueError('similarity_calc must be a RegionSimilarityCalculator')
    if not isinstance(matcher, mat.Matcher):
      raise ValueError('matcher must be a Matcher')
    if not isinstance(box_coder, bcoder.BoxCoder):
      raise ValueError('box_coder must be a BoxCoder')
    self._similarity_calc = similarity_calc
    self._matcher = matcher
    self._box_coder = box_coder
    self._positive_class_weight = positive_class_weight
    self._negative_class_weight = negative_class_weight
    if unmatched_cls_target is None:
      self._unmatched_cls_target = tf.constant([0], tf.float32)
    else:
      self._unmatched_cls_target = unmatched_cls_target 
开发者ID:rky0930,项目名称:yolo_v2,代码行数:43,代码来源:target_assigner.py

示例6: __init__

# 需要导入模块: from object_detection.core import matcher [as 别名]
# 或者: from object_detection.core.matcher import Matcher [as 别名]
def __init__(self, similarity_calc, matcher, box_coder,
                 negative_class_weight=1.0, unmatched_cls_target=None):
        """Construct Object Detection Target Assigner.

        Args:
          similarity_calc: a RegionSimilarityCalculator
          matcher: an object_detection.core.Matcher used to match groundtruth to
            anchors.
          box_coder: an object_detection.core.BoxCoder used to encode matching
            groundtruth boxes with respect to anchors.
          negative_class_weight: classification weight to be associated to negative
            anchors (default: 1.0). The weight must be in [0., 1.].
          unmatched_cls_target: a float32 tensor with shape [d_1, d_2, ..., d_k]
            which is consistent with the classification target for each
            anchor (and can be empty for scalar targets).  This shape must thus be
            compatible with the groundtruth labels that are passed to the "assign"
            function (which have shape [num_gt_boxes, d_1, d_2, ..., d_k]).
            If set to None, unmatched_cls_target is set to be [0] for each anchor.

        Raises:
          ValueError: if similarity_calc is not a RegionSimilarityCalculator or
            if matcher is not a Matcher or if box_coder is not a BoxCoder
        """
        if not isinstance(similarity_calc, sim_calc.RegionSimilarityCalculator):
            raise ValueError('similarity_calc must be a RegionSimilarityCalculator')
        if not isinstance(matcher, mat.Matcher):
            raise ValueError('matcher must be a Matcher')
        if not isinstance(box_coder, bcoder.BoxCoder):
            raise ValueError('box_coder must be a BoxCoder')
        self._similarity_calc = similarity_calc
        self._matcher = matcher
        self._box_coder = box_coder
        self._negative_class_weight = negative_class_weight
        if unmatched_cls_target is None:
            self._unmatched_cls_target = tf.constant([0], tf.float32)
        else:
            self._unmatched_cls_target = unmatched_cls_target 
开发者ID:kujason,项目名称:monopsr,代码行数:39,代码来源:target_assigner.py


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