当前位置: 首页>>代码示例>>Python>>正文


Python proposal_layer.proposal_layer方法代码示例

本文整理汇总了Python中layer_utils.proposal_layer.proposal_layer方法的典型用法代码示例。如果您正苦于以下问题:Python proposal_layer.proposal_layer方法的具体用法?Python proposal_layer.proposal_layer怎么用?Python proposal_layer.proposal_layer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在layer_utils.proposal_layer的用法示例。


在下文中一共展示了proposal_layer.proposal_layer方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _proposal_layer

# 需要导入模块: from layer_utils import proposal_layer [as 别名]
# 或者: from layer_utils.proposal_layer import proposal_layer [as 别名]
def _proposal_layer(self, rpn_cls_prob, rpn_bbox_pred, target_name, name):
        with tf.variable_scope(name) as scope:
            if cfg.USE_E2E_TF:
                rois, rpn_scores = proposal_layer_tf(
                    rpn_cls_prob,
                    rpn_bbox_pred,
                    self._im_info,
                    self._mode,
                    self._feat_stride[target_name],
                    self._anchors,
                    self._num_anchors[target_name]
                )
            else:
                rois, rpn_scores = tf.py_func(proposal_layer,
                                              [rpn_cls_prob, rpn_bbox_pred, self._im_info, self._mode,
                                               self._feat_stride[target_name], self._anchors, self._num_anchors[target_name]],
                                              [tf.float32, tf.float32], name="proposal")

            rois.set_shape([None, 5])
            rpn_scores.set_shape([None, 1])

        return rois, rpn_scores 
开发者ID:wanjinchang,项目名称:SSH-TensorFlow,代码行数:24,代码来源:network.py

示例2: _proposal_layer

# 需要导入模块: from layer_utils import proposal_layer [as 别名]
# 或者: from layer_utils.proposal_layer import proposal_layer [as 别名]
def _proposal_layer(self, rpn_cls_prob, rpn_bbox_pred, name):
    with tf.variable_scope(name) as scope:
      if cfg.USE_E2E_TF:
        rois, rpn_scores = proposal_layer_tf(
          rpn_cls_prob,
          rpn_bbox_pred,
          self._im_info,
          self._mode,
          self._feat_stride,
          self._anchors,
          self._num_anchors
        )
      else:
        rois, rpn_scores = tf.py_func(proposal_layer,
                              [rpn_cls_prob, rpn_bbox_pred, self._im_info, self._mode,
                               self._feat_stride, self._anchors, self._num_anchors],
                              [tf.float32, tf.float32], name="proposal")

      rois.set_shape([None, 5])
      rpn_scores.set_shape([None, 1])

    return rois, rpn_scores

  # Only use it if you have roi_pooling op written in tf.image 
开发者ID:endernewton,项目名称:tf-faster-rcnn,代码行数:26,代码来源:network.py

示例3: _proposal_layer

# 需要导入模块: from layer_utils import proposal_layer [as 别名]
# 或者: from layer_utils.proposal_layer import proposal_layer [as 别名]
def _proposal_layer(self, rpn_cls_prob, rpn_bbox_pred):
    rois, rpn_scores = proposal_layer(\
                                    rpn_cls_prob, rpn_bbox_pred, self._im_info, self._mode,
                                     self._feat_stride, self._anchors, self._num_anchors)

    return rois, rpn_scores 
开发者ID:Sunarker,项目名称:Collaborative-Learning-for-Weakly-Supervised-Object-Detection,代码行数:8,代码来源:network.py

示例4: _proposal_layer

# 需要导入模块: from layer_utils import proposal_layer [as 别名]
# 或者: from layer_utils.proposal_layer import proposal_layer [as 别名]
def _proposal_layer(self, rpn_cls_prob, rpn_bbox_pred, name):
        """
        Do nms -> topN -> apply rpn_bbox_pred to anchors(bbox_transform_inv)
        """
        with tf.variable_scope(name) as scope:
            rois, rpn_scores = tf.py_func(proposal_layer,
                                          [rpn_cls_prob, rpn_bbox_pred, self._im_info, self._mode,
                                           self._anchors, self._num_anchors],
                                          [tf.float32, tf.float32], name="proposal")
            rois.set_shape([None, 5])
            rpn_scores.set_shape([None, 1])

        return rois, rpn_scores 
开发者ID:Sanster,项目名称:tf_ctpn,代码行数:15,代码来源:network.py

示例5: _proposal_layer

# 需要导入模块: from layer_utils import proposal_layer [as 别名]
# 或者: from layer_utils.proposal_layer import proposal_layer [as 别名]
def _proposal_layer(self, rpn_cls_prob, rpn_bbox_pred, name):
    with tf.variable_scope(name) as scope:
      rois, rpn_scores = tf.py_func(proposal_layer,
                                    [rpn_cls_prob, rpn_bbox_pred, self._im_info, self._mode,
                                     self._feat_stride, self._anchors, self._num_anchors],
                                    [tf.float32, tf.float32])
      rois.set_shape([None, 5])
      rpn_scores.set_shape([None, 1])

    return rois, rpn_scores

  # Only use it if you have roi_pooling op written in tf.image 
开发者ID:pengzhou1108,项目名称:RGB-N,代码行数:14,代码来源:network_fusion.py

示例6: _proposal_layer

# 需要导入模块: from layer_utils import proposal_layer [as 别名]
# 或者: from layer_utils.proposal_layer import proposal_layer [as 别名]
def _proposal_layer(self, rpn_cls_prob, rpn_bbox_pred, rpn_cls_score, mode, name):
    with tf.variable_scope(name) as scope:
      rois, roi_scores, rpn_scores = tf.py_func(proposal_layer,
                                                [rpn_cls_prob, rpn_bbox_pred, rpn_cls_score, self._im_info, mode,
                                                 self._anchors, self._num_anchors],
                                                [tf.float32, tf.float32, tf.float32], name="proposal")
      rois.set_shape([None, 5])
      roi_scores.set_shape([None, 1])
      rpn_scores.set_shape([None, 2])
    return rois, roi_scores, rpn_scores 
开发者ID:Li-Chengyang,项目名称:MSDS-RCNN,代码行数:12,代码来源:network.py


注:本文中的layer_utils.proposal_layer.proposal_layer方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。