當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。