當前位置: 首頁>>代碼示例>>Python>>正文


Python config_util.get_spatial_image_size方法代碼示例

本文整理匯總了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]) 
開發者ID:ahmetozlu,項目名稱:vehicle_counting_tensorflow,代碼行數:8,代碼來源:config_util_test.py

示例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]) 
開發者ID:ahmetozlu,項目名稱:vehicle_counting_tensorflow,代碼行數:9,代碼來源:config_util_test.py

示例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]) 
開發者ID:ahmetozlu,項目名稱:vehicle_counting_tensorflow,代碼行數:8,代碼來源:config_util_test.py

示例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]) 
開發者ID:cagbal,項目名稱:ros_people_object_detection_tensorflow,代碼行數:8,代碼來源:config_util_test.py

示例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]) 
開發者ID:cagbal,項目名稱:ros_people_object_detection_tensorflow,代碼行數:9,代碼來源:config_util_test.py

示例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]) 
開發者ID:cagbal,項目名稱:ros_people_object_detection_tensorflow,代碼行數:8,代碼來源:config_util_test.py

示例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


注:本文中的object_detection.utils.config_util.get_spatial_image_size方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。