本文整理汇总了Python中object_detection.dataset_tools.oid_hierarchical_labels_expansion.OIDHierarchicalLabelsExpansion方法的典型用法代码示例。如果您正苦于以下问题:Python oid_hierarchical_labels_expansion.OIDHierarchicalLabelsExpansion方法的具体用法?Python oid_hierarchical_labels_expansion.OIDHierarchicalLabelsExpansion怎么用?Python oid_hierarchical_labels_expansion.OIDHierarchicalLabelsExpansion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类object_detection.dataset_tools.oid_hierarchical_labels_expansion
的用法示例。
在下文中一共展示了oid_hierarchical_labels_expansion.OIDHierarchicalLabelsExpansion方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_bbox_expansion
# 需要导入模块: from object_detection.dataset_tools import oid_hierarchical_labels_expansion [as 别名]
# 或者: from object_detection.dataset_tools.oid_hierarchical_labels_expansion import OIDHierarchicalLabelsExpansion [as 别名]
def test_bbox_expansion(self):
hierarchy, bbox_rows, _ = create_test_data()
expansion_generator = (
oid_hierarchical_labels_expansion.OIDHierarchicalLabelsExpansion(
hierarchy))
all_result_rows = []
for row in bbox_rows:
all_result_rows.extend(expansion_generator.expand_boxes_from_csv(row))
self.assertItemsEqual([
'123,xclick,b,1,0.1,0.2,0.1,0.2,1,1,0,0,0',
'123,xclick,d,1,0.2,0.3,0.1,0.2,1,1,0,0,0',
'123,xclick,f,1,0.2,0.3,0.1,0.2,1,1,0,0,0',
'123,xclick,c,1,0.2,0.3,0.1,0.2,1,1,0,0,0'
], all_result_rows)
开发者ID:ahmetozlu,项目名称:vehicle_counting_tensorflow,代码行数:16,代码来源:oid_hierarchical_labels_expansion_test.py
示例2: test_labels_expansion
# 需要导入模块: from object_detection.dataset_tools import oid_hierarchical_labels_expansion [as 别名]
# 或者: from object_detection.dataset_tools.oid_hierarchical_labels_expansion import OIDHierarchicalLabelsExpansion [as 别名]
def test_labels_expansion(self):
hierarchy, _, label_rows = create_test_data()
expansion_generator = (
oid_hierarchical_labels_expansion.OIDHierarchicalLabelsExpansion(
hierarchy))
all_result_rows = []
for row in label_rows:
all_result_rows.extend(expansion_generator.expand_labels_from_csv(row))
self.assertItemsEqual([
'123,verification,b,0', '123,verification,c,0', '123,verification,d,0',
'123,verification,e,0', '124,verification,d,1', '124,verification,f,1',
'124,verification,c,1'
], all_result_rows)
开发者ID:ahmetozlu,项目名称:vehicle_counting_tensorflow,代码行数:15,代码来源:oid_hierarchical_labels_expansion_test.py
示例3: test_bbox_expansion
# 需要导入模块: from object_detection.dataset_tools import oid_hierarchical_labels_expansion [as 别名]
# 或者: from object_detection.dataset_tools.oid_hierarchical_labels_expansion import OIDHierarchicalLabelsExpansion [as 别名]
def test_bbox_expansion(self):
hierarchy, bbox_rows, _, _ = create_test_data()
expansion_generator = (
oid_hierarchical_labels_expansion.OIDHierarchicalLabelsExpansion(
hierarchy))
all_result_rows = []
for row in bbox_rows:
all_result_rows.extend(
expansion_generator.expand_boxes_or_segments_from_csv(row, 2))
self.assertItemsEqual([
'123,xclick,b,1,0.1,0.2,0.1,0.2,1,1,0,0,0',
'123,xclick,d,1,0.2,0.3,0.1,0.2,1,1,0,0,0',
'123,xclick,f,1,0.2,0.3,0.1,0.2,1,1,0,0,0',
'123,xclick,c,1,0.2,0.3,0.1,0.2,1,1,0,0,0'
], all_result_rows)
示例4: test_segm_expansion
# 需要导入模块: from object_detection.dataset_tools import oid_hierarchical_labels_expansion [as 别名]
# 或者: from object_detection.dataset_tools.oid_hierarchical_labels_expansion import OIDHierarchicalLabelsExpansion [as 别名]
def test_segm_expansion(self):
hierarchy, _, segm_rows, _ = create_test_data()
expansion_generator = (
oid_hierarchical_labels_expansion.OIDHierarchicalLabelsExpansion(
hierarchy))
all_result_rows = []
for row in segm_rows:
all_result_rows.extend(
expansion_generator.expand_boxes_or_segments_from_csv(row, 2))
self.assertItemsEqual([
'123,cc,b,100,100,0.1,0.2,0.1,0.2,0,MASK',
'123,cc,d,100,100,0.2,0.3,0.1,0.2,0,MASK',
'123,cc,f,100,100,0.2,0.3,0.1,0.2,0,MASK',
'123,cc,c,100,100,0.2,0.3,0.1,0.2,0,MASK'
], all_result_rows)
示例5: test_labels_expansion
# 需要导入模块: from object_detection.dataset_tools import oid_hierarchical_labels_expansion [as 别名]
# 或者: from object_detection.dataset_tools.oid_hierarchical_labels_expansion import OIDHierarchicalLabelsExpansion [as 别名]
def test_labels_expansion(self):
hierarchy, _, _, label_rows = create_test_data()
expansion_generator = (
oid_hierarchical_labels_expansion.OIDHierarchicalLabelsExpansion(
hierarchy))
all_result_rows = []
for row in label_rows:
all_result_rows.extend(
expansion_generator.expand_labels_from_csv(row, 2, 3))
self.assertItemsEqual([
'123,verification,b,0', '123,verification,c,0', '123,verification,d,0',
'123,verification,f,0', '123,verification,e,0', '124,verification,d,1',
'124,verification,f,1', '124,verification,c,1'
], all_result_rows)