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


Python generate_anchor.generate_anchors方法代碼示例

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


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

示例1: __init__

# 需要導入模塊: from rpn import generate_anchor [as 別名]
# 或者: from rpn.generate_anchor import generate_anchors [as 別名]
def __init__(self, feat_stride, scales, ratios, output_score,
                 rpn_pre_nms_top_n, rpn_post_nms_top_n, threshold, rpn_min_size):
        super(ProposalOperator, self).__init__()
        self._feat_stride = feat_stride
        self._scales = np.fromstring(scales[1:-1], dtype=float, sep=',')
        self._ratios = np.fromstring(ratios[1:-1], dtype=float, sep=',')
        self._anchors = generate_anchors(base_size=self._feat_stride, scales=self._scales, ratios=self._ratios)
        self._num_anchors = self._anchors.shape[0]
        self._output_score = output_score
        self._rpn_pre_nms_top_n = rpn_pre_nms_top_n
        self._rpn_post_nms_top_n = rpn_post_nms_top_n
        self._threshold = threshold
        self._rpn_min_size = rpn_min_size

        if DEBUG:
            print 'feat_stride: {}'.format(self._feat_stride)
            print 'anchors:'
            print self._anchors 
開發者ID:i-pan,項目名稱:kaggle-rsna18,代碼行數:20,代碼來源:proposal.py

示例2: __init__

# 需要導入模塊: from rpn import generate_anchor [as 別名]
# 或者: from rpn.generate_anchor import generate_anchors [as 別名]
def __init__(self, feat_stride, scales, ratios, output_score,
                 rpn_pre_nms_top_n, rpn_post_nms_top_n, threshold, rpn_min_size):
        super(ProposalQuadrangleOperator, self).__init__()
        self._feat_stride = feat_stride
        self._scales = np.fromstring(scales[1:-1], dtype=float, sep=',')
        self._ratios = np.fromstring(ratios[1:-1], dtype=float, sep=',')
        self._anchors = generate_anchors(base_size=self._feat_stride, scales=self._scales, ratios=self._ratios)
        self._num_anchors = self._anchors.shape[0]
        self._output_score = output_score
        self._rpn_pre_nms_top_n = rpn_pre_nms_top_n
        self._rpn_post_nms_top_n = rpn_post_nms_top_n
        self._threshold = threshold
        self._rpn_min_size = rpn_min_size

        if DEBUG:
            print 'feat_stride: {}'.format(self._feat_stride)
            print 'anchors:'
            print self._anchors 
開發者ID:jessemelpolio,項目名稱:Faster_RCNN_for_DOTA,代碼行數:20,代碼來源:proposal_quadrangle.py


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