當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。