本文整理匯總了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