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


Python train.get_training_roidb方法代碼示例

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


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

示例1: combined_roidb

# 需要導入模塊: from fast_rcnn import train [as 別名]
# 或者: from fast_rcnn.train import get_training_roidb [as 別名]
def combined_roidb(imdb_names):
    def get_roidb(imdb_name):
        imdb = get_imdb(imdb_name)
        print 'Loaded dataset `{:s}` for training'.format(imdb.name)
        imdb.set_proposal_method(cfg.TRAIN.PROPOSAL_METHOD)
        print 'Set proposal method: {:s}'.format(cfg.TRAIN.PROPOSAL_METHOD)
        roidb = get_training_roidb(imdb)
        return roidb

    roidbs = [get_roidb(s) for s in imdb_names.split('+')]
    roidb = roidbs[0]
    if len(roidbs) > 1:
        for r in roidbs[1:]:
            roidb.extend(r)
        imdb = datasets.imdb.imdb(imdb_names)
    else:
        imdb = get_imdb(imdb_names)
    return imdb, roidb 
開發者ID:playerkk,項目名稱:face-py-faster-rcnn,代碼行數:20,代碼來源:train_net.py

示例2: get_roidb

# 需要導入模塊: from fast_rcnn import train [as 別名]
# 或者: from fast_rcnn.train import get_training_roidb [as 別名]
def get_roidb(imdb_name, rpn_file=None):
    imdb = get_imdb(imdb_name)
    print 'Loaded dataset `{:s}` for training'.format(imdb.name)
    imdb.set_proposal_method(cfg.TRAIN.PROPOSAL_METHOD)
    print 'Set proposal method: {:s}'.format(cfg.TRAIN.PROPOSAL_METHOD)
    if rpn_file is not None:
        imdb.config['rpn_file'] = rpn_file
    roidb = get_training_roidb(imdb)
    return roidb, imdb 
開發者ID:playerkk,項目名稱:face-py-faster-rcnn,代碼行數:11,代碼來源:train_faster_rcnn_alt_opt.py

示例3: get_roidb

# 需要導入模塊: from fast_rcnn import train [as 別名]
# 或者: from fast_rcnn.train import get_training_roidb [as 別名]
def get_roidb(imdb_name, rpn_file=None):
    imdb = get_imdb(imdb_name)
    print 'Loaded dataset `{:s}` for training'.format(imdb.name)
    imdb.set_proposal_method(cfg.TRAIN.PROPOSAL_METHOD)
    print 'Set proposal method: {:s}'.format(cfg.TRAIN.PROPOSAL_METHOD)
    if rpn_file is not None:
        imdb.config['rpn_file'] = rpn_file
    roidb = get_training_roidb(imdb)
    return roidb, imdb

# ------------------------------------------------------------------------------
# Pycaffe doesn't reliably free GPU memory when instantiated nets are discarded
# (e.g. "del net" in Python code) . To work around this issue, each training
# stage is executed in a separate process using multiprocessing.Process.
# ------------------------------------------------------------------------------ 
開發者ID:djdam,項目名稱:faster-rcnn-scenarios,代碼行數:17,代碼來源:train.py


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