本文整理汇总了Python中object_detection.utils.config_util.get_spatial_image_size方法的典型用法代码示例。如果您正苦于以下问题:Python config_util.get_spatial_image_size方法的具体用法?Python config_util.get_spatial_image_size怎么用?Python config_util.get_spatial_image_size使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类object_detection.utils.config_util
的用法示例。
在下文中一共展示了config_util.get_spatial_image_size方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: testGetSpatialImageSizeFromFixedShapeResizerConfig
# 需要导入模块: from object_detection.utils import config_util [as 别名]
# 或者: from object_detection.utils.config_util import get_spatial_image_size [as 别名]
def testGetSpatialImageSizeFromFixedShapeResizerConfig(self):
image_resizer_config = image_resizer_pb2.ImageResizer()
image_resizer_config.fixed_shape_resizer.height = 100
image_resizer_config.fixed_shape_resizer.width = 200
image_shape = config_util.get_spatial_image_size(image_resizer_config)
self.assertAllEqual(image_shape, [100, 200])
示例2: testGetSpatialImageSizeFromAspectPreservingResizerConfig
# 需要导入模块: from object_detection.utils import config_util [as 别名]
# 或者: from object_detection.utils.config_util import get_spatial_image_size [as 别名]
def testGetSpatialImageSizeFromAspectPreservingResizerConfig(self):
image_resizer_config = image_resizer_pb2.ImageResizer()
image_resizer_config.keep_aspect_ratio_resizer.min_dimension = 100
image_resizer_config.keep_aspect_ratio_resizer.max_dimension = 600
image_resizer_config.keep_aspect_ratio_resizer.pad_to_max_dimension = True
image_shape = config_util.get_spatial_image_size(image_resizer_config)
self.assertAllEqual(image_shape, [600, 600])
示例3: testGetSpatialImageSizeFromAspectPreservingResizerDynamic
# 需要导入模块: from object_detection.utils import config_util [as 别名]
# 或者: from object_detection.utils.config_util import get_spatial_image_size [as 别名]
def testGetSpatialImageSizeFromAspectPreservingResizerDynamic(self):
image_resizer_config = image_resizer_pb2.ImageResizer()
image_resizer_config.keep_aspect_ratio_resizer.min_dimension = 100
image_resizer_config.keep_aspect_ratio_resizer.max_dimension = 600
image_shape = config_util.get_spatial_image_size(image_resizer_config)
self.assertAllEqual(image_shape, [-1, -1])
示例4: test_get_spatial_image_size_from_fixed_shape_resizer_config
# 需要导入模块: from object_detection.utils import config_util [as 别名]
# 或者: from object_detection.utils.config_util import get_spatial_image_size [as 别名]
def test_get_spatial_image_size_from_fixed_shape_resizer_config(self):
image_resizer_config = image_resizer_pb2.ImageResizer()
image_resizer_config.fixed_shape_resizer.height = 100
image_resizer_config.fixed_shape_resizer.width = 200
image_shape = config_util.get_spatial_image_size(image_resizer_config)
self.assertAllEqual(image_shape, [100, 200])
示例5: test_get_spatial_image_size_from_aspect_preserving_resizer_config
# 需要导入模块: from object_detection.utils import config_util [as 别名]
# 或者: from object_detection.utils.config_util import get_spatial_image_size [as 别名]
def test_get_spatial_image_size_from_aspect_preserving_resizer_config(self):
image_resizer_config = image_resizer_pb2.ImageResizer()
image_resizer_config.keep_aspect_ratio_resizer.min_dimension = 100
image_resizer_config.keep_aspect_ratio_resizer.max_dimension = 600
image_resizer_config.keep_aspect_ratio_resizer.pad_to_max_dimension = True
image_shape = config_util.get_spatial_image_size(image_resizer_config)
self.assertAllEqual(image_shape, [600, 600])
示例6: test_get_spatial_image_size_from_aspect_preserving_resizer_dynamic
# 需要导入模块: from object_detection.utils import config_util [as 别名]
# 或者: from object_detection.utils.config_util import get_spatial_image_size [as 别名]
def test_get_spatial_image_size_from_aspect_preserving_resizer_dynamic(self):
image_resizer_config = image_resizer_pb2.ImageResizer()
image_resizer_config.keep_aspect_ratio_resizer.min_dimension = 100
image_resizer_config.keep_aspect_ratio_resizer.max_dimension = 600
image_shape = config_util.get_spatial_image_size(image_resizer_config)
self.assertAllEqual(image_shape, [-1, -1])
示例7: testGetSpatialImageSizeFromConditionalShapeResizer
# 需要导入模块: from object_detection.utils import config_util [as 别名]
# 或者: from object_detection.utils.config_util import get_spatial_image_size [as 别名]
def testGetSpatialImageSizeFromConditionalShapeResizer(self):
image_resizer_config = image_resizer_pb2.ImageResizer()
image_resizer_config.conditional_shape_resizer.size_threshold = 100
image_shape = config_util.get_spatial_image_size(image_resizer_config)
self.assertAllEqual(image_shape, [-1, -1])
开发者ID:ShivangShekhar,项目名称:Live-feed-object-device-identification-using-Tensorflow-and-OpenCV,代码行数:7,代码来源:config_util_test.py