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


Python feature_map_generators.KerasMultiResolutionFeatureMaps方法代碼示例

本文整理匯總了Python中object_detection.models.feature_map_generators.KerasMultiResolutionFeatureMaps方法的典型用法代碼示例。如果您正苦於以下問題:Python feature_map_generators.KerasMultiResolutionFeatureMaps方法的具體用法?Python feature_map_generators.KerasMultiResolutionFeatureMaps怎麽用?Python feature_map_generators.KerasMultiResolutionFeatureMaps使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在object_detection.models.feature_map_generators的用法示例。


在下文中一共展示了feature_map_generators.KerasMultiResolutionFeatureMaps方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: _build_feature_map_generator

# 需要導入模塊: from object_detection.models import feature_map_generators [as 別名]
# 或者: from object_detection.models.feature_map_generators import KerasMultiResolutionFeatureMaps [as 別名]
def _build_feature_map_generator(self, feature_map_layout, use_keras,
                                   pool_residual=False):
    if use_keras:
      return feature_map_generators.KerasMultiResolutionFeatureMaps(
          feature_map_layout=feature_map_layout,
          depth_multiplier=1,
          min_depth=32,
          insert_1x1_conv=True,
          freeze_batchnorm=False,
          is_training=True,
          conv_hyperparams=self._build_conv_hyperparams(),
          name='FeatureMaps'
      )
    else:
      def feature_map_generator(image_features):
        return feature_map_generators.multi_resolution_feature_maps(
            feature_map_layout=feature_map_layout,
            depth_multiplier=1,
            min_depth=32,
            insert_1x1_conv=True,
            image_features=image_features,
            pool_residual=pool_residual)
      return feature_map_generator 
開發者ID:ahmetozlu,項目名稱:vehicle_counting_tensorflow,代碼行數:25,代碼來源:feature_map_generators_test.py

示例2: _build_feature_map_generator

# 需要導入模塊: from object_detection.models import feature_map_generators [as 別名]
# 或者: from object_detection.models.feature_map_generators import KerasMultiResolutionFeatureMaps [as 別名]
def _build_feature_map_generator(self, feature_map_layout,
                                   pool_residual=False):
    if tf_version.is_tf2():
      return feature_map_generators.KerasMultiResolutionFeatureMaps(
          feature_map_layout=feature_map_layout,
          depth_multiplier=1,
          min_depth=32,
          insert_1x1_conv=True,
          freeze_batchnorm=False,
          is_training=True,
          conv_hyperparams=self._build_conv_hyperparams(),
          name='FeatureMaps'
      )
    else:
      def feature_map_generator(image_features):
        return feature_map_generators.multi_resolution_feature_maps(
            feature_map_layout=feature_map_layout,
            depth_multiplier=1,
            min_depth=32,
            insert_1x1_conv=True,
            image_features=image_features,
            pool_residual=pool_residual)
      return feature_map_generator 
開發者ID:tensorflow,項目名稱:models,代碼行數:25,代碼來源:feature_map_generators_test.py

示例3: build

# 需要導入模塊: from object_detection.models import feature_map_generators [as 別名]
# 或者: from object_detection.models.feature_map_generators import KerasMultiResolutionFeatureMaps [as 別名]
def build(self, input_shape):
    full_mobilenet_v2 = mobilenet_v2.mobilenet_v2(
        batchnorm_training=(self._is_training and not self._freeze_batchnorm),
        conv_hyperparams=(self._conv_hyperparams
                          if self._override_base_feature_extractor_hyperparams
                          else None),
        weights=None,
        use_explicit_padding=self._use_explicit_padding,
        alpha=self._depth_multiplier,
        min_depth=self._min_depth,
        include_top=False)
    conv2d_11_pointwise = full_mobilenet_v2.get_layer(
        name='block_13_expand_relu').output
    conv2d_13_pointwise = full_mobilenet_v2.get_layer(name='out_relu').output
    self.mobilenet_v2 = tf.keras.Model(
        inputs=full_mobilenet_v2.inputs,
        outputs=[conv2d_11_pointwise, conv2d_13_pointwise])
    self.feature_map_generator = (
        feature_map_generators.KerasMultiResolutionFeatureMaps(
            feature_map_layout=self._feature_map_layout,
            depth_multiplier=self._depth_multiplier,
            min_depth=self._min_depth,
            insert_1x1_conv=True,
            is_training=self._is_training,
            conv_hyperparams=self._conv_hyperparams,
            freeze_batchnorm=self._freeze_batchnorm,
            name='FeatureMaps'))
    self.built = True 
開發者ID:ahmetozlu,項目名稱:vehicle_counting_tensorflow,代碼行數:30,代碼來源:ssd_mobilenet_v2_keras_feature_extractor.py

示例4: build

# 需要導入模塊: from object_detection.models import feature_map_generators [as 別名]
# 或者: from object_detection.models.feature_map_generators import KerasMultiResolutionFeatureMaps [as 別名]
def build(self, input_shape):
    full_mobilenet_v1 = mobilenet_v1.mobilenet_v1(
        batchnorm_training=(self._is_training and not self._freeze_batchnorm),
        conv_hyperparams=(self._conv_hyperparams
                          if self._override_base_feature_extractor_hyperparams
                          else None),
        weights=None,
        use_explicit_padding=self._use_explicit_padding,
        alpha=self._depth_multiplier,
        min_depth=self._min_depth,
        include_top=False)
    conv2d_11_pointwise = full_mobilenet_v1.get_layer(
        name='conv_pw_11_relu').output
    conv2d_13_pointwise = full_mobilenet_v1.get_layer(
        name='conv_pw_13_relu').output
    self._mobilenet_v1 = tf.keras.Model(
        inputs=full_mobilenet_v1.inputs,
        outputs=[conv2d_11_pointwise, conv2d_13_pointwise])
    self._feature_map_generator = (
        feature_map_generators.KerasMultiResolutionFeatureMaps(
            feature_map_layout=self._feature_map_layout,
            depth_multiplier=self._depth_multiplier,
            min_depth=self._min_depth,
            insert_1x1_conv=True,
            is_training=self._is_training,
            conv_hyperparams=self._conv_hyperparams,
            freeze_batchnorm=self._freeze_batchnorm,
            name='FeatureMaps'))
    self.built = True 
開發者ID:ShivangShekhar,項目名稱:Live-feed-object-device-identification-using-Tensorflow-and-OpenCV,代碼行數:31,代碼來源:ssd_mobilenet_v1_keras_feature_extractor.py

示例5: build

# 需要導入模塊: from object_detection.models import feature_map_generators [as 別名]
# 或者: from object_detection.models.feature_map_generators import KerasMultiResolutionFeatureMaps [as 別名]
def build(self, input_shape):
    full_mobilenet_v1 = mobilenet_v1.mobilenet_v1(
        batchnorm_training=(self._is_training and not self._freeze_batchnorm),
        conv_hyperparams=(self._conv_hyperparams
                          if self._override_base_feature_extractor_hyperparams
                          else None),
        weights=None,
        use_explicit_padding=self._use_explicit_padding,
        alpha=self._depth_multiplier,
        min_depth=self._min_depth,
        include_top=False)
    conv2d_11_pointwise = full_mobilenet_v1.get_layer(
        name='conv_pw_11_relu').output
    conv2d_13_pointwise = full_mobilenet_v1.get_layer(
        name='conv_pw_13_relu').output
    self.classification_backbone = tf.keras.Model(
        inputs=full_mobilenet_v1.inputs,
        outputs=[conv2d_11_pointwise, conv2d_13_pointwise])
    self._feature_map_generator = (
        feature_map_generators.KerasMultiResolutionFeatureMaps(
            feature_map_layout=self._feature_map_layout,
            depth_multiplier=self._depth_multiplier,
            min_depth=self._min_depth,
            insert_1x1_conv=True,
            is_training=self._is_training,
            conv_hyperparams=self._conv_hyperparams,
            freeze_batchnorm=self._freeze_batchnorm,
            name='FeatureMaps'))
    self.built = True 
開發者ID:tensorflow,項目名稱:models,代碼行數:31,代碼來源:ssd_mobilenet_v1_keras_feature_extractor.py

示例6: build

# 需要導入模塊: from object_detection.models import feature_map_generators [as 別名]
# 或者: from object_detection.models.feature_map_generators import KerasMultiResolutionFeatureMaps [as 別名]
def build(self, input_shape):
    full_mobilenet_v2 = mobilenet_v2.mobilenet_v2(
        batchnorm_training=(self._is_training and not self._freeze_batchnorm),
        conv_hyperparams=(self._conv_hyperparams
                          if self._override_base_feature_extractor_hyperparams
                          else None),
        weights=None,
        use_explicit_padding=self._use_explicit_padding,
        alpha=self._depth_multiplier,
        min_depth=self._min_depth,
        include_top=False)
    conv2d_11_pointwise = full_mobilenet_v2.get_layer(
        name='block_13_expand_relu').output
    conv2d_13_pointwise = full_mobilenet_v2.get_layer(name='out_relu').output
    self.classification_backbone = tf.keras.Model(
        inputs=full_mobilenet_v2.inputs,
        outputs=[conv2d_11_pointwise, conv2d_13_pointwise])
    self.feature_map_generator = (
        feature_map_generators.KerasMultiResolutionFeatureMaps(
            feature_map_layout=self._feature_map_layout,
            depth_multiplier=self._depth_multiplier,
            min_depth=self._min_depth,
            insert_1x1_conv=True,
            is_training=self._is_training,
            conv_hyperparams=self._conv_hyperparams,
            freeze_batchnorm=self._freeze_batchnorm,
            name='FeatureMaps'))
    self.built = True 
開發者ID:tensorflow,項目名稱:models,代碼行數:30,代碼來源:ssd_mobilenet_v2_keras_feature_extractor.py


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