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


Python matcher_pb2.Matcher方法代码示例

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


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

示例1: test_build_arg_max_matcher_with_non_default_parameters

# 需要导入模块: from object_detection.protos import matcher_pb2 [as 别名]
# 或者: from object_detection.protos.matcher_pb2 import Matcher [as 别名]
def test_build_arg_max_matcher_with_non_default_parameters(self):
    matcher_text_proto = """
      argmax_matcher {
        matched_threshold: 0.7
        unmatched_threshold: 0.3
        negatives_lower_than_unmatched: false
        force_match_for_each_row: true
      }
    """
    matcher_proto = matcher_pb2.Matcher()
    text_format.Merge(matcher_text_proto, matcher_proto)
    matcher_object = matcher_builder.build(matcher_proto)
    self.assertTrue(isinstance(matcher_object, argmax_matcher.ArgMaxMatcher))
    self.assertAlmostEqual(matcher_object._matched_threshold, 0.7)
    self.assertAlmostEqual(matcher_object._unmatched_threshold, 0.3)
    self.assertFalse(matcher_object._negatives_lower_than_unmatched)
    self.assertTrue(matcher_object._force_match_for_each_row) 
开发者ID:ringringyi,项目名称:DOTA_models,代码行数:19,代码来源:matcher_builder_test.py

示例2: test_build_arg_max_matcher_with_non_default_parameters

# 需要导入模块: from object_detection.protos import matcher_pb2 [as 别名]
# 或者: from object_detection.protos.matcher_pb2 import Matcher [as 别名]
def test_build_arg_max_matcher_with_non_default_parameters(self):
    matcher_text_proto = """
      argmax_matcher {
        matched_threshold: 0.7
        unmatched_threshold: 0.3
        negatives_lower_than_unmatched: false
        force_match_for_each_row: true
        use_matmul_gather: true
      }
    """
    matcher_proto = matcher_pb2.Matcher()
    text_format.Merge(matcher_text_proto, matcher_proto)
    matcher_object = matcher_builder.build(matcher_proto)
    self.assertTrue(isinstance(matcher_object, argmax_matcher.ArgMaxMatcher))
    self.assertAlmostEqual(matcher_object._matched_threshold, 0.7)
    self.assertAlmostEqual(matcher_object._unmatched_threshold, 0.3)
    self.assertFalse(matcher_object._negatives_lower_than_unmatched)
    self.assertTrue(matcher_object._force_match_for_each_row)
    self.assertTrue(matcher_object._use_matmul_gather) 
开发者ID:ahmetozlu,项目名称:vehicle_counting_tensorflow,代码行数:21,代码来源:matcher_builder_test.py

示例3: test_build_arg_max_matcher_with_defaults

# 需要导入模块: from object_detection.protos import matcher_pb2 [as 别名]
# 或者: from object_detection.protos.matcher_pb2 import Matcher [as 别名]
def test_build_arg_max_matcher_with_defaults(self):
    matcher_text_proto = """
      argmax_matcher {
      }
    """
    matcher_proto = matcher_pb2.Matcher()
    text_format.Merge(matcher_text_proto, matcher_proto)
    matcher_object = matcher_builder.build(matcher_proto)
    self.assertTrue(isinstance(matcher_object, argmax_matcher.ArgMaxMatcher))
    self.assertAlmostEqual(matcher_object._matched_threshold, 0.5)
    self.assertAlmostEqual(matcher_object._unmatched_threshold, 0.5)
    self.assertTrue(matcher_object._negatives_lower_than_unmatched)
    self.assertFalse(matcher_object._force_match_for_each_row) 
开发者ID:ringringyi,项目名称:DOTA_models,代码行数:15,代码来源:matcher_builder_test.py

示例4: test_build_arg_max_matcher_without_thresholds

# 需要导入模块: from object_detection.protos import matcher_pb2 [as 别名]
# 或者: from object_detection.protos.matcher_pb2 import Matcher [as 别名]
def test_build_arg_max_matcher_without_thresholds(self):
    matcher_text_proto = """
      argmax_matcher {
        ignore_thresholds: true
      }
    """
    matcher_proto = matcher_pb2.Matcher()
    text_format.Merge(matcher_text_proto, matcher_proto)
    matcher_object = matcher_builder.build(matcher_proto)
    self.assertTrue(isinstance(matcher_object, argmax_matcher.ArgMaxMatcher))
    self.assertEqual(matcher_object._matched_threshold, None)
    self.assertEqual(matcher_object._unmatched_threshold, None)
    self.assertTrue(matcher_object._negatives_lower_than_unmatched)
    self.assertFalse(matcher_object._force_match_for_each_row) 
开发者ID:ringringyi,项目名称:DOTA_models,代码行数:16,代码来源:matcher_builder_test.py

示例5: test_build_bipartite_matcher

# 需要导入模块: from object_detection.protos import matcher_pb2 [as 别名]
# 或者: from object_detection.protos.matcher_pb2 import Matcher [as 别名]
def test_build_bipartite_matcher(self):
    matcher_text_proto = """
      bipartite_matcher {
      }
    """
    matcher_proto = matcher_pb2.Matcher()
    text_format.Merge(matcher_text_proto, matcher_proto)
    matcher_object = matcher_builder.build(matcher_proto)
    self.assertTrue(
        isinstance(matcher_object, bipartite_matcher.GreedyBipartiteMatcher)) 
开发者ID:ringringyi,项目名称:DOTA_models,代码行数:12,代码来源:matcher_builder_test.py

示例6: test_raise_error_on_empty_matcher

# 需要导入模块: from object_detection.protos import matcher_pb2 [as 别名]
# 或者: from object_detection.protos.matcher_pb2 import Matcher [as 别名]
def test_raise_error_on_empty_matcher(self):
    matcher_text_proto = """
    """
    matcher_proto = matcher_pb2.Matcher()
    text_format.Merge(matcher_text_proto, matcher_proto)
    with self.assertRaises(ValueError):
      matcher_builder.build(matcher_proto) 
开发者ID:ringringyi,项目名称:DOTA_models,代码行数:9,代码来源:matcher_builder_test.py


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